Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Simon Peyton Jones's avatar
    e4c73514
    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
    History
    Fix kind-checking for data/newtypes
    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.)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.