Skip to content

Better compiler error message for GADTs #7238

@zliu41

Description

@zliu41
data Foo a where
  Foo1 :: Integer -> Foo String
  Foo2 :: Bool -> Foo Int

foo :: Foo String -> Bool
foo (Foo1 x) = x PlutusTx.== 42
{-# INLINABLE foo #-}

Compiling foo leads to the following error:

Error: Unsupported feature: Kind: forall k0 k1.
             k0 -> k1 -> GHC.Prim.CONSTRAINT GHC.Types.ZeroBitRep

which is not very informative.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions