'ghcup whereis' subcommand
Motivation
Although ghcup install locations are mostly predictable, as in ~/.ghcup/ghc/<ver>/bin
, there's no command to get the isolated GHC bin directory, for use in e.g. a HOOK.
Example
A hook could be e.g. something like stack or cabal hook that is agnostic of ghcup, but wants its hook script to output the bin location, so it knows where to find GHC. A ghcup style hook would then do something like:
#!/bin/sh
set -x
ver=$1
ghcup install ghc $ver &> /dev/null
ghcup whereis ghc $ver