[commit: ghc] wip/T2893: Add missing cases for ForAllPred (8c3a134)
git at git.haskell.org
git at git.haskell.org
Wed Jan 31 12:01:49 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T2893
Link : http://ghc.haskell.org/trac/ghc/changeset/8c3a134045ad4f25080996917b3fe77cb506b17b/ghc
>---------------------------------------------------------------
commit 8c3a134045ad4f25080996917b3fe77cb506b17b
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jan 31 12:00:43 2018 +0000
Add missing cases for ForAllPred
Should fix Trac #14744
>---------------------------------------------------------------
8c3a134045ad4f25080996917b3fe77cb506b17b
compiler/specialise/Specialise.hs | 1 +
compiler/typecheck/TcCanonical.hs | 0
compiler/typecheck/TcType.hs | 2 ++
3 files changed, 3 insertions(+)
diff --git a/compiler/specialise/Specialise.hs b/compiler/specialise/Specialise.hs
index c4fe042..bc3e27f 100644
--- a/compiler/specialise/Specialise.hs
+++ b/compiler/specialise/Specialise.hs
@@ -2011,6 +2011,7 @@ mkCallUDs' env f args
EqPred {} -> True
IrredPred {} -> True -- Things like (D []) where D is a
-- Constraint-ranged family; Trac #7785
+ ForAllPred {} -> True
{-
Note [Type determines value]
diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs
index de37aa8..ab0519d 100644
--- a/compiler/typecheck/TcType.hs
+++ b/compiler/typecheck/TcType.hs
@@ -1983,6 +1983,7 @@ pickQuantifiablePreds qtvs theta
EqPred NomEq ty1 ty2 -> quant_fun ty1 || quant_fun ty2
IrredPred ty -> tyCoVarsOfType ty `intersectsVarSet` qtvs
+ ForAllPred {} -> False
pick_cls_pred flex_ctxt cls tys
= tyCoVarsOfTypes tys `intersectsVarSet` qtvs
@@ -2087,6 +2088,7 @@ isImprovementPred ty
EqPred ReprEq _ _ -> False
ClassPred cls _ -> classHasFds cls
IrredPred {} -> True -- Might have equalities after reduction?
+ ForAllPred {} -> False
{- Note [Expanding superclasses]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the ghc-commits
mailing list