How do I determine my GHC version?
ghc --version
did the trick on Ubuntu, thanks Karolis!
Edit: works on mac too (macOS Sierra 10.12.6)
To find which version my stack
is using, I ran
$ stack ghc -- --version
and got
$ stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.0.2
Depending on your install method and architecture, some commands may differ. Some people may have several versions installed. Here is a selection of information that may be useful:
stack version
❯ stack --version
Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2
ghc version (as noted by @mherzl)
❯ stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
standard ghc version command
❯ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.1
cabal version
❯ cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
GHC's repl
❯ ghci --version
The Glorious Glasgow Haskell Compilation System, version 8.8.1
If using llvm with -fllvm
flag
❯ llvm-gcc -v
Apple clang version 11.0.0 (clang-1100.0.33.16)
Target: x86_64-apple-darwin19.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin