Skip to content
Snippets Groups Projects
Commit e4c73514 authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Marge Bot
Browse files

Fix kind-checking for data/newtypes

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.)
parent 8a209384
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment