summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorDimitrios.Vytiniotis <dimitris@microsoft.com>2012-04-04 12:54:11 +0100
committerDimitrios.Vytiniotis <dimitris@microsoft.com>2012-04-04 12:54:11 +0100
commite3e740d972daef08e50235b2fb511b525b8dfe75 (patch)
tree72e0fcd522c7294709798aa054226c8a191d7151 /compiler
parent2183c8797ea7736ad90ff2bd4b922a1e52331f83 (diff)
downloadhaskell-e3e740d972daef08e50235b2fb511b525b8dfe75.tar.gz
Wibble: using original type for the dictionary if it has not changed (to preserve synonyms)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcCanonical.lhs9
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/typecheck/TcCanonical.lhs b/compiler/typecheck/TcCanonical.lhs
index 6bb6e99bf5..b24f76ce40 100644
--- a/compiler/typecheck/TcCanonical.lhs
+++ b/compiler/typecheck/TcCanonical.lhs
@@ -309,10 +309,13 @@ canClass d fl cls tys
xi = mkClassPred cls xis
; mb <- rewriteCtFlavor fl xi co
+
; case mb of
- Just new_fl -> continueWith $
- CDictCan { cc_flavor = new_fl
- , cc_tyargs = xis, cc_class = cls, cc_depth = d }
+ Just new_fl ->
+ let (ClassPred cls xis_for_dict) = classifyPredType (ctFlavPred new_fl)
+ in continueWith $
+ CDictCan { cc_flavor = new_fl
+ , cc_tyargs = xis_for_dict, cc_class = cls, cc_depth = d }
Nothing -> return Stop }
emitSuperclasses :: Ct -> TcS StopOrContinue