Semi-off, apologies in advance, but this thread had me trying GHC2021
and ran into the following:
{-# LANGUAGE GHC2021 #-}
module Main where
import Servant.API (type (:>))
main :: IO ()
main = undefined
gives:
~/w/test $ ghc Main.hs
bin/Main.hs:4:26: error:
Illegal keyword 'type' (use ExplicitNamespaces to enable)
|
3 | import Servant.API (type (:>))
| ^^^^
even though GHC2021
includes TypeOperators
:
https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html#extension-GHC2021
which implies ExplicitNamespaces
:
https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/type_operators.html#extension-TypeOperators
If I do add {-# LANGUAGE TypeOperators #-}
to the above then it compiles just fine:
~/w/test $ ghc Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
Anyone knows what I’m doing wrong?