Skip to content

Should GHC allow FUN in a GADT declaration?

If I write:

data D a where
  MkD :: FUN Many a (D a)

I get a rather confusing error message:

• Data constructor ‘MkD’ returns type ‘a -> D a’
    instead of an instance of its parent type ‘D a’
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information