Skip to content
Snippets Groups Projects
Commit 0fe1f41e authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Austin Seipp
Browse files

Lint should check that TyConAppCo doesn't have a synonym in the tycon position

That is why Lint didn't nail Trac #9102

(cherry picked from commit 4cfc1fae)
parent 4ca496c5
No related branches found
No related tags found
No related merge requests found
...@@ -856,6 +856,9 @@ lintCoercion co@(TyConAppCo r tc cos) ...@@ -856,6 +856,9 @@ lintCoercion co@(TyConAppCo r tc cos)
; checkRole co2 r r2 ; checkRole co2 r r2
; return (rk, mkFunTy s1 s2, mkFunTy t1 t2, r) } ; return (rk, mkFunTy s1 s2, mkFunTy t1 t2, r) }
| isSynTyCon tc
= failWithL (ptext (sLit "Synonym in TyConAppCo:") <+> ppr co)
| otherwise | otherwise
= do { (ks,ss,ts,rs) <- mapAndUnzip4M lintCoercion cos = do { (ks,ss,ts,rs) <- mapAndUnzip4M lintCoercion cos
; rk <- lint_co_app co (tyConKind tc) (ss `zip` ks) ; rk <- lint_co_app co (tyConKind tc) (ss `zip` ks)
......
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