# \[ANN\] Stack 2.9.1

**URL:** <https://discourse.haskell.org/t/ann-stack-2-9-1/5078>\
**Category:** Announcements\
**Created:** [September 19, 2022, 5:07pm UTC](https://discourse.haskell.org/t/ann-stack-2-9-1/5078 "2022-09-19T17:07:05Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [September 20, 2022, 1:44am UTC](https://discourse.haskell.org/t/ann-stack-2-9-1/5078/5 "2022-09-20T01:44:19Z")

</div>

The feature is documented here: [Configuration (project and global) - The Haskell Tool Stack](https://docs.haskellstack.org/en/stable/yaml_configuration/#ghc-installation-customisation-experimental)

You could already do it. Something like this (haven’t tested, am on mobile):

```haskell
#!/bin/bash

set -euo pipefail

case $HOOK_GHC_TYPE in
    bindist)
		echo "$(ghcup run --ghc "$HOOK_GHC_VERSION" --install)/ghc"
        ;;
    git)
		# TODO: should be somewhat possible
        >&2 echo "Hook doesn't support installing from source"
        exit 1
        ;;
    *)
        >&2 echo "Unsupported GHC installation type: $HOOK_GHC_TYPE"
        exit 2
        ;;
esac

```

Place these contents into `~/.stack/hooks/ghc-install.sh` and make the file executable. That should pipe installation through GHCup.

We will then update the [GHCup bootstrap script](https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/scripts/bootstrap/bootstrap-haskell) to:

1. Always install stack by default (you’ll still be able to disable it with an env var)
2. Ask the user if they want to install the new hook for better integration

---

_[View the full topic](https://discourse.haskell.org/t/ann-stack-2-9-1/5078)._
