-
Simon Peyton Jones authored
Template Haskell doesn't support GADTs directly but we can use equality constraints to do the job. Here's an example of the dump from splicing such a declaration: [d| data T a b where T1 :: Int -> T Int Char T2 :: a -> T a a T3 :: a -> T [a] a T4 :: a -> b -> T b [a] |] ======> T5217.hs:(6,3)-(9,53) data T a[aQW] b[aQX] = (b[aQX] ~ Char, a[aQW] ~ Int) => T1 Int | b[aQX] ~ a[aQW] => T2 a[aQW] | a[aQW] ~ [b[aQX]] => T3 b[aQX] | forall a[aQY]. b[aQX] ~ [a[aQY]] => T4 a[aQY] a[aQW]
5c4a4c4b