Skip to content
  • Simon Peyton Jones's avatar
    Allow reification of existentials and GADTs · 0237ed67
    Simon Peyton Jones authored
    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.
    0237ed67