Allow type families to use GADT syntax (and be GADTs)
authorsimonpj@microsoft.com <unknown>
Tue, 23 Sep 2008 14:05:35 +0000 (14:05 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 23 Sep 2008 14:05:35 +0000 (14:05 +0000)
commit7299e42cc5214458ba16034dbfbf58de55f7121b
tree61c5ca082fad04056f3f2b567056e3850c5045f9
parent35fb5c6ff0861be5ab72df799df536982d3966b8
Allow type families to use GADT syntax (and be GADTs)

We've always intended to allow you to use GADT syntax for
data families:
data instance T [a] where
  T1 :: a -> T [a]
and indeed to allow data instances to *be* GADTs
data intsance T [a] where
  T1 :: Int -> T [Int]
  T2 :: a -> b -> T [(a,b)]

This patch fixes the renamer and type checker to allow this.
compiler/basicTypes/DataCon.lhs
compiler/iface/BuildTyCl.lhs
compiler/iface/TcIface.lhs
compiler/prelude/TysWiredIn.lhs
compiler/rename/RnSource.lhs
compiler/typecheck/TcTyClsDecls.lhs
compiler/vectorise/VectType.hs