Commit e20884be authored by dreixel's avatar dreixel
Browse files

Minor fix, and transform a failure into a warning

This warning has to be addressed later, though. It is only
relevant when using -XPolyKinds.
parent 33f8608a
......@@ -680,7 +680,7 @@ lintKind (FunTy k1 k2)
= lintKind k1 >> lintKind k2
lintKind kind@(TyConApp tc kis)
= do { unless (tyConArity tc == length kis || isSuperKindTyCon tc)
= do { unless (isSuperKindTyCon tc || tyConArity tc == length kis)
(addErrL malformed_kind)
; mapM_ lintKind kis }
where
......@@ -863,8 +863,8 @@ lintType (TyVarTy tv)
= do { checkTyCoVarInScope tv
; let kind = tyVarKind tv
; lintKind kind
; if (isSuperKind kind) then failWithL msg
else return kind }
; WARN( isSuperKind kind, msg )
return kind }
where msg = hang (ptext (sLit "Expecting a type, but got a kind"))
2 (ptext (sLit "Offending kind:") <+> ppr tv)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment