Skip to content

TypeApplications and record syntax don't mix

Let's fire up GHCi:

$ ~/Software/ghc-8.2.0.20170507/bin/ghci
GHCi, version 8.2.0.20170507: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /Users/rscott/.ghci
λ> :set -XTypeApplications -fprint-explicit-foralls 
λ> import Data.Functor.Identity

I can use TypeApplications on Identity like so:

λ> Identity @Int 42
Identity 42

But not if I try to use record syntax:

λ> Identity @Int { runIdentity = 42 }

<interactive>:4:15: error: parse error on input ‘{’
Edited by Ryan Scott
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information