summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Validity.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Validity.hs')
-rw-r--r--compiler/GHC/Tc/Validity.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Validity.hs b/compiler/GHC/Tc/Validity.hs
index 18474d41b1..1a5f2f6a41 100644
--- a/compiler/GHC/Tc/Validity.hs
+++ b/compiler/GHC/Tc/Validity.hs
@@ -1788,7 +1788,6 @@ checkInstTermination theta head_pred
check foralld_tvs pred
= case classifyPredType pred of
EqPred {} -> return () -- See #4200.
- SpecialPred {} -> return ()
IrredPred {} -> check2 foralld_tvs pred (sizeType pred)
ClassPred cls tys
| isTerminatingClass cls
@@ -1807,6 +1806,10 @@ checkInstTermination theta head_pred
-> check (foralld_tvs `extendVarSetList` tvs) head_pred'
-- Termination of the quantified predicate itself is checked
-- when the predicates are individually checked for validity
+ SpecialPred {} ->
+ pprPanic "checkInstTermination: unexpected special constraint" $
+ vcat [ text "pred:" <+> ppr pred
+ , text "theta:" <+> ppr theta ]
check2 foralld_tvs pred pred_size
| not (null bad_tvs) = failWithTc $ TcRnUnknownMessage $ mkPlainError noHints $