Kind and type checking of indexed types
[ghc-hetmet.git] / compiler / typecheck / TcClassDcl.lhs
index 25795ce..9fb530d 100644 (file)
@@ -739,8 +739,12 @@ tcAddDeclCtxt decl thing_inside
      thing = case decl of
                ClassDecl {}              -> "class"
                TySynonym {}              -> "type synonym"
-               TyData {tcdND = NewType}  -> "newtype"
-               TyData {tcdND = DataType} -> "data type"
+               TyFunction {}             -> "type function signature"
+               TyData {tcdND = NewType}  -> "newtype" ++ maybeSig
+               TyData {tcdND = DataType} -> "data type" ++ maybeSig
+
+     maybeSig | isKindSigDecl decl = " signature"
+             | otherwise          = ""
 
      ctxt = hsep [ptext SLIT("In the"), text thing, 
                  ptext SLIT("declaration for"), quotes (ppr (tcdName decl))]