Commit 04d0ebc9 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Vital follow-up to fix of Trac #2045

Sorry -- my 'validate' didn't work right and I missed a trick.
This patch must accompany

 * Fix Trac #2045: use big-tuple machiney for implication constraints
parent 4edf8929
...@@ -61,6 +61,7 @@ import InstEnv ...@@ -61,6 +61,7 @@ import InstEnv
import FunDeps import FunDeps
import TcMType import TcMType
import TcType import TcType
import DsUtils
import Type import Type
import TypeRep import TypeRep
import Class import Class
...@@ -76,7 +77,6 @@ import Var ( Var, TyVar ) ...@@ -76,7 +77,6 @@ import Var ( Var, TyVar )
import qualified Var import qualified Var
import VarEnv import VarEnv
import VarSet import VarSet
import TysWiredIn
import PrelNames import PrelNames
import BasicTypes import BasicTypes
import SrcLoc import SrcLoc
...@@ -137,10 +137,7 @@ mkImplicTy tvs givens wanteds -- The type of an implication constraint ...@@ -137,10 +137,7 @@ mkImplicTy tvs givens wanteds -- The type of an implication constraint
in in
mkForAllTys tvs $ mkForAllTys tvs $
mkPhiTy (map dictPred givens) $ mkPhiTy (map dictPred givens) $
if isSingleton dict_wanteds then mkBigCoreTupTy (map instType dict_wanteds)
instType (head dict_wanteds)
else
mkTupleTy Boxed (length dict_wanteds) (map instType dict_wanteds)
dictPred :: Inst -> TcPredType dictPred :: Inst -> TcPredType
dictPred (Dict {tci_pred = pred}) = pred dictPred (Dict {tci_pred = pred}) = pred
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment