- This works
cabal build
- This fails
ghc --make Main.hs
- This fixes
ghc
buildghc --make -XHaskell2010 Main.hs
GHC2021 is used by GHC if neither Haskell98 nor Haskell2010 is turned on explicitly.
- Reference
- Tips
cabal build --verbose
to see what being passed to GHC