Allow reification of existentials and GADTs
authorsimonpj@microsoft.com <unknown>
Wed, 21 Jul 2010 09:04:37 +0000 (09:04 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 21 Jul 2010 09:04:37 +0000 (09:04 +0000)
commit0237ed6762fc86d0eb5db02a8e02ebe35d8d7272
treea3e06857c249152fbc5b0cbbc83b3fee2db92d81
parent971c88597b0972053975c9c99aa51764ab75b143
Allow reification of existentials and GADTs

It turns out that TH.Syntax is rich enough to express even GADTs,
provided we express them in equality-predicate form.  So for
example

  data T a where
     MkT1 :: a -> T [a]
     MkT2 :: T Int

will appear in TH syntax like this

  data T a = forall b. (a ~ [b]) => MkT1 b
           | (a ~ Int) => MkT2

While I was at it I also improved the reification of types,
so that we use TH.TupleT and TH.ListT when we can.
compiler/typecheck/TcSplice.lhs