Will I run into problems using typeclasses with GADTs? I've come up with this 
to model a fragment of ASN.1. I'd hate to spend a lot of time on this only to 
find out it's well known that these two features don't mix very well.

Thanks, Dominic.

data Type :: * -> * where
   INTEGER             :: Type Int
   BOOLEAN             :: Type Bool
   BITSTRING           :: Type BitString
   NUMERICSTRING       :: Type NumericString
   ReferencedType      :: Type () -- for now
   ConstrainedType     :: Type a -> Constraint a -> Type a
   SizeConstrainedType :: Size a => Type a -> Constraint Int -> Type a
   FromConstrainedType :: From a => Type a -> Constraint a -> Type a

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to