summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsListComp.lhs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-12-05 04:44:13 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2011-12-05 04:44:13 +0000
commit2e6dcdf711ebd50eef230a878014a5a9abd20e07 (patch)
treed12c9675c1910b39224927a084e5685c8a1e1797 /compiler/deSugar/DsListComp.lhs
parent22b317b1812cbb35d86872d7607de034bcf66fb2 (diff)
downloadhaskell-2e6dcdf711ebd50eef230a878014a5a9abd20e07.tar.gz
Allow full constraint solving under a for-all (Trac #5595)
The main idea is that when we unify forall a. t1 ~ forall a. t2 we get constraints from unifying t1~t2 that mention a. We are producing a coercion witnessing the equivalence of the for-alls, and inside *that* coercion we need bindings for the solved constraints arising from t1~t2. We didn't have way to do this before. The big change is that here's a new type TcEvidence.TcCoercion, which is much like Coercion.Coercion except that there's a slot for TcEvBinds in it. This has a wave of follow-on changes. Not deep but broad. * New module TcEvidence, which now contains the HsWrapper TcEvBinds, EvTerm etc types that used to be in HsBinds * The typechecker works exclusively in terms of TcCoercion. * The desugarer converts TcCoercion to Coercion * The main payload is in TcUnify.unifySigmaTy. This is the function that had a gross hack before, but is now beautiful. * LCoercion is gone! Hooray. Many many fiddly changes in conssequence. But it's nice.
Diffstat (limited to 'compiler/deSugar/DsListComp.lhs')
-rw-r--r--compiler/deSugar/DsListComp.lhs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/deSugar/DsListComp.lhs b/compiler/deSugar/DsListComp.lhs
index 63d96fd465..4ad8006b39 100644
--- a/compiler/deSugar/DsListComp.lhs
+++ b/compiler/deSugar/DsListComp.lhs
@@ -19,6 +19,7 @@ import TcHsSyn
import CoreSyn
import MkCore
+import TcEvidence
import DsMonad -- the monadery used in the desugarer
import DsUtils