Skip to content

GADTs in Haskell98 style

it would be nice if it is possible to write GADTs in Haskell98 style, like this:

data Expr a = I Int   :: Expr Int
            | B Bool  :: Expr Bool         
            | Add (Expr Int) (Expr Int)  :: Expr Int
            | Mul (Expr Int) (Expr Int)  :: Expr Int
            | Eq  (Expr Int) (Expr Int)  :: Expr Bool 
            | Magic  (Expr a) (Expr a)  
Trac metadata
Trac field Value
Version 7.6.3
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information