summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2018-04-02 15:32:04 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2018-04-02 17:24:29 -0400
commitd8d4266bf73790f65b223ec16f645763eaed8be3 (patch)
treed43a1607c057f2d56b862ced3ca4f0012d0f4986 /compiler
parentddf895577173106646cfc6f6d21be3d5651067bc (diff)
downloadhaskell-d8d4266bf73790f65b223ec16f645763eaed8be3.tar.gz
Fix #14991.
It turns out that solveEqualities really does need to use simpl_top. I thought that solveWanteds would be enough, and no existing test case showed up the different. #14991 shows that we need simpl_top. Easy enough to fix. test case: dependent/should_compile/T14991
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcSimplify.hs4
-rw-r--r--compiler/typecheck/TcTyClsDecls.hs2
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index 7307f74396..ccb7ef5056 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -165,7 +165,9 @@ solveEqualities thing_inside
= checkNoErrs $ -- See Note [Fail fast on kind errors]
do { (result, wanted) <- captureConstraints thing_inside
; traceTc "solveEqualities {" $ text "wanted = " <+> ppr wanted
- ; final_wc <- runTcSEqualities $ solveWanteds wanted
+ ; final_wc <- runTcSEqualities $ simpl_top wanted
+ -- NB: Use simpl_top here so that we potentially default RuntimeRep
+ -- vars to LiftedRep. This is needed to avoid #14991.
; traceTc "End solveEqualities }" empty
; traceTc "reportAllUnsolved {" empty
diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs
index 6598942533..cdcc3bda01 100644
--- a/compiler/typecheck/TcTyClsDecls.hs
+++ b/compiler/typecheck/TcTyClsDecls.hs
@@ -1485,7 +1485,7 @@ So, the kind-checker must return both the new args (that is, Type
Because we don't need this information in the kind-checking phase of
checking closed type families, we don't require these extra pieces of
-information in tc_fam_ty_pats. See also Note [tc_fam_ty_pats vs tcFamTyPats].
+information in tc_fam_ty_pats.
Note [Failing early in kcDataDefn]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~