[commit: ghc] master: Lint should check that TyConAppCo doesn't have a synonym in the tycon position (4cfc1fa)
git at git.haskell.org
git at git.haskell.org
Tue May 13 12:17:48 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/4cfc1fae11ec9a5c4b34ac747f0ce50f52423eba/ghc
>---------------------------------------------------------------
commit 4cfc1fae11ec9a5c4b34ac747f0ce50f52423eba
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue May 13 13:15:45 2014 +0100
Lint should check that TyConAppCo doesn't have a synonym in the tycon position
That is why Lint didn't nail Trac #9102
>---------------------------------------------------------------
4cfc1fae11ec9a5c4b34ac747f0ce50f52423eba
compiler/coreSyn/CoreLint.lhs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs
index b5c7985..3d3deab 100644
--- a/compiler/coreSyn/CoreLint.lhs
+++ b/compiler/coreSyn/CoreLint.lhs
@@ -856,6 +856,9 @@ lintCoercion co@(TyConAppCo r tc cos)
; checkRole co2 r r2
; return (rk, mkFunTy s1 s2, mkFunTy t1 t2, r) }
+ | isSynTyCon tc
+ = failWithL (ptext (sLit "Synonym in TyConAppCo:") <+> ppr co)
+
| otherwise
= do { (ks,ss,ts,rs) <- mapAndUnzip4M lintCoercion cos
; rk <- lint_co_app co (tyConKind tc) (ss `zip` ks)
More information about the ghc-commits
mailing list