Skip to content
  • Simon Peyton Jones's avatar
    Fix kind-checking for data/newtypes · e4c73514
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    In one spot in kcConDecl we were passing in the return
    kind signature rether than the return kind. e.g. #16828
    
       newtype instance Foo :: Type -> Type where
         MkFoo :: a -> Foo a
    
    We were giving kcConDecl the kind (Type -> Type), whereas it
    was expecting the ultimate return kind, namely Type.
    
    This "looking past arrows" was being done, independently,
    in several places, but we'd missed one.  This patch moves it all
    to one place -- the new function kcConDecls (note the plural).
    
    I also took the opportunity to rename
      tcDataFamHeader  to   tcDataFamInstHeader
    
    (The previous name was consistently a source of confusion.)
    e4c73514