summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2016-05-18 10:36:49 -0700
committerBartosz Nitka <niteria@gmail.com>2016-05-18 16:43:49 -0700
commit6282bc31808e335cd8386dd20d469bc2457f84de (patch)
treee719c05fed4ea0aa9bab174c25571fe34687c597
parentf18e8d8db6246340c8840bd0ca2c43767009f14c (diff)
downloadhaskell-6282bc31808e335cd8386dd20d469bc2457f84de.tar.gz
Kill varSetElems in tidyFreeTyCoVars
I haven't observed this to have an effect on nondeterminism, but tidyOccName appears to modify the TidyOccEnv in a way dependent on the order of inputs. It's easy enough to change it to be deterministic to be on the safe side. Test Plan: ./validate Reviewers: simonmar, austin, bgamari, simonpj Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2238 GHC Trac Issues: #4012
-rw-r--r--compiler/typecheck/TcErrors.hs8
-rw-r--r--compiler/typecheck/TcRnMonad.hs2
-rw-r--r--compiler/typecheck/TcValidity.hs8
-rw-r--r--compiler/types/TyCoRep.hs8
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2693.stderr4
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr46
-rw-r--r--testsuite/tests/parser/should_fail/T7848.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/T10618.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T11355.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T5684.stderr286
-rw-r--r--testsuite/tests/typecheck/should_fail/T7851.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail001.stderr2
12 files changed, 188 insertions, 188 deletions
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index cdd77f1112..e7fb82757b 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -175,10 +175,10 @@ report_unsolved mb_binds_var err_as_warn type_errors expr_holes type_holes wante
-- If we are deferring we are going to need /all/ evidence around,
-- including the evidence produced by unflattening (zonkWC)
; let tidy_env = tidyFreeTyCoVars env0 free_tvs
- free_tvs = tyCoVarsOfWC wanted
+ free_tvs = tyCoVarsOfWCList wanted
; traceTc "reportUnsolved (after zonking and tidying):" $
- vcat [ pprVarSet free_tvs pprTvBndrs
+ vcat [ pprTvBndrs free_tvs
, ppr wanted ]
; warn_redundant <- woptM Opt_WarnRedundantConstraints
@@ -2631,7 +2631,7 @@ warnDefaulting wanteds default_ty
= do { warn_default <- woptM Opt_WarnTypeDefaults
; env0 <- tcInitTidyEnv
; let tidy_env = tidyFreeTyCoVars env0 $
- foldr (unionVarSet . tyCoVarsOfCt) emptyVarSet wanteds
+ tyCoVarsOfCtsList (listToBag wanteds)
tidy_wanteds = map (tidyCt tidy_env) wanteds
(loc, ppr_wanteds) = pprWithArising tidy_wanteds
warn_msg =
@@ -2663,7 +2663,7 @@ solverDepthErrorTcS loc ty
= setCtLocM loc $
do { ty <- zonkTcType ty
; env0 <- tcInitTidyEnv
- ; let tidy_env = tidyFreeTyCoVars env0 (tyCoVarsOfType ty)
+ ; let tidy_env = tidyFreeTyCoVars env0 (tyCoVarsOfTypeList ty)
tidy_ty = tidyType tidy_env ty
msg
= vcat [ text "Reduction stack overflow; size =" <+> ppr depth
diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs
index 2691c82638..c4e66a0216 100644
--- a/compiler/typecheck/TcRnMonad.hs
+++ b/compiler/typecheck/TcRnMonad.hs
@@ -1148,7 +1148,7 @@ tcInitTidyEnv
-- | Get a 'TidyEnv' that includes mappings for all vars free in the given
-- type. Useful when tidying open types.
-tcInitOpenTidyEnv :: TyCoVarSet -> TcM TidyEnv
+tcInitOpenTidyEnv :: [TyCoVar] -> TcM TidyEnv
tcInitOpenTidyEnv tvs
= do { env1 <- tcInitTidyEnv
; let env2 = tidyFreeTyCoVars env1 tvs
diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs
index d9f43d39c3..83f64f3783 100644
--- a/compiler/typecheck/TcValidity.hs
+++ b/compiler/typecheck/TcValidity.hs
@@ -349,7 +349,7 @@ checkValidType ctxt ty
_ -> panic "checkValidType"
-- Can't happen; not used for *user* sigs
- ; env <- tcInitOpenTidyEnv (tyCoVarsOfType ty)
+ ; env <- tcInitOpenTidyEnv (tyCoVarsOfTypeList ty)
-- Check the internal validity of the type itself
; check_type env ctxt rank ty
@@ -371,7 +371,7 @@ checkValidType ctxt ty
checkValidMonoType :: Type -> TcM ()
-- Assumes arguemt is fully zonked
checkValidMonoType ty
- = do { env <- tcInitOpenTidyEnv (tyCoVarsOfType ty)
+ = do { env <- tcInitOpenTidyEnv (tyCoVarsOfTypeList ty)
; check_type env SigmaCtxt MustBeMonoType ty }
check_kind :: TidyEnv -> UserTypeCtxt -> TcType -> TcM ()
@@ -471,7 +471,7 @@ kind system should check for uses of unlifted types. So I've
removed the check. See Trac #11120 comment:19.
check_lifted ty
- = do { env <- tcInitOpenTidyEnv (tyCoVarsOfType ty)
+ = do { env <- tcInitOpenTidyEnv (tyCoVarsOfTypeList ty)
; checkTcM (not (isUnliftedType ty)) (unliftedArgErr env ty) }
unliftedArgErr :: TidyEnv -> Type -> (TidyEnv, SDoc)
@@ -707,7 +707,7 @@ applying the instance decl would show up two uses of ?x. Trac #8912.
checkValidTheta :: UserTypeCtxt -> ThetaType -> TcM ()
-- Assumes arguemt is fully zonked
checkValidTheta ctxt theta
- = do { env <- tcInitOpenTidyEnv (tyCoVarsOfTypes theta)
+ = do { env <- tcInitOpenTidyEnv (tyCoVarsOfTypesList theta)
; addErrCtxtM (checkThetaCtxt ctxt theta) $
check_valid_theta env ctxt theta }
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 04badbd533..9f792437d5 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -3155,11 +3155,11 @@ tidyTyBinders :: TidyEnv -> [TyBinder] -> (TidyEnv, [TyBinder])
tidyTyBinders = mapAccumL tidyTyBinder
---------------
-tidyFreeTyCoVars :: TidyEnv -> TyCoVarSet -> TidyEnv
+tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv
-- ^ Add the free 'TyVar's to the env in tidy form,
-- so that we can tidy the type they are free in
tidyFreeTyCoVars (full_occ_env, var_env) tyvars
- = fst (tidyOpenTyCoVars (full_occ_env, var_env) (varSetElems tyvars))
+ = fst (tidyOpenTyCoVars (full_occ_env, var_env) tyvars)
---------------
tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
@@ -3174,8 +3174,8 @@ tidyOpenTyCoVar env@(_, subst) tyvar
= case lookupVarEnv subst tyvar of
Just tyvar' -> (env, tyvar') -- Already substituted
Nothing ->
- let env' = tidyFreeTyCoVars env (tyCoVarsOfType (tyVarKind tyvar)) in
- tidyTyCoVarBndr env' tyvar -- Treat it as a binder
+ let env' = tidyFreeTyCoVars env (tyCoVarsOfTypeList (tyVarKind tyvar))
+ in tidyTyCoVarBndr env' tyvar -- Treat it as a binder
---------------
tidyTyVarOcc :: TidyEnv -> TyVar -> TyVar
diff --git a/testsuite/tests/indexed-types/should_fail/T2693.stderr b/testsuite/tests/indexed-types/should_fail/T2693.stderr
index a0ac4eaeb6..c0bd7329fd 100644
--- a/testsuite/tests/indexed-types/should_fail/T2693.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2693.stderr
@@ -24,8 +24,8 @@ T2693.hs:19:15: error:
• Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
T2693.hs:19:23: error:
- • Couldn't match expected type ‘(a3, a5)’ with actual type ‘TFn a4’
- The type variables ‘a4’, ‘a3’, ‘a5’ are ambiguous
+ • Couldn't match expected type ‘(a4, a5)’ with actual type ‘TFn a3’
+ The type variables ‘a3’, ‘a4’, ‘a5’ are ambiguous
• In the first argument of ‘snd’, namely ‘x’
In the second argument of ‘(+)’, namely ‘snd x’
In the expression: fst x + snd x
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr
index b9d3bba31b..f938d03169 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr
@@ -1,31 +1,31 @@
overloadedlabelsfail01.hs:6:5: error:
- No instance for (IsLabel "x" t2)
- arising from the overloaded label ‘#x’
- In the expression: #x
- In an equation for ‘a’: a = #x
+ • No instance for (IsLabel "x" t2)
+ arising from the overloaded label ‘#x’
+ • In the expression: #x
+ In an equation for ‘a’: a = #x
overloadedlabelsfail01.hs:9:5: error:
- No instance for (IsLabel "x" (t0 -> t1))
- arising from the overloaded label ‘#x’
- (maybe you haven't applied a function to enough arguments?)
- In the expression: #x
- In the expression: #x #y
- In an equation for ‘b’: b = #x #y
+ • No instance for (IsLabel "x" (t1 -> t0))
+ arising from the overloaded label ‘#x’
+ (maybe you haven't applied a function to enough arguments?)
+ • In the expression: #x
+ In the expression: #x #y
+ In an equation for ‘b’: b = #x #y
overloadedlabelsfail01.hs:9:8: error:
- No instance for (IsLabel "y" t0)
- arising from the overloaded label ‘#y’
- In the first argument of ‘#x’, namely ‘#y’
- In the expression: #x #y
- In an equation for ‘b’: b = #x #y
+ • No instance for (IsLabel "y" t1)
+ arising from the overloaded label ‘#y’
+ • In the first argument of ‘#x’, namely ‘#y’
+ In the expression: #x #y
+ In an equation for ‘b’: b = #x #y
overloadedlabelsfail01.hs:13:5: error:
- Could not deduce (IsLabel "y" t)
- arising from the overloaded label ‘#y’
- from the context: IsLabel "x" t
- bound by the type signature for:
- c :: IsLabel "x" t => t
- at overloadedlabelsfail01.hs:12:1-23
- In the expression: #y
- In an equation for ‘c’: c = #y
+ • Could not deduce (IsLabel "y" t)
+ arising from the overloaded label ‘#y’
+ from the context: IsLabel "x" t
+ bound by the type signature for:
+ c :: IsLabel "x" t => t
+ at overloadedlabelsfail01.hs:12:1-23
+ • In the expression: #y
+ In an equation for ‘c’: c = #y
diff --git a/testsuite/tests/parser/should_fail/T7848.stderr b/testsuite/tests/parser/should_fail/T7848.stderr
index f7617ee606..e1a64e4668 100644
--- a/testsuite/tests/parser/should_fail/T7848.stderr
+++ b/testsuite/tests/parser/should_fail/T7848.stderr
@@ -1,9 +1,9 @@
T7848.hs:6:1: error:
• Occurs check: cannot construct the infinite type:
- t ~ t0 -> t1 -> A -> A -> A -> A -> t2 -> t
+ t ~ t2 -> t1 -> A -> A -> A -> A -> t0 -> t
• When checking that:
- t0 -> t1 -> A -> A -> A -> A -> forall t2. t2 -> t
+ t2 -> t1 -> A -> A -> A -> A -> forall t4. t4 -> t
is more polymorphic than: t
• Relevant bindings include x :: t (bound at T7848.hs:6:1)
diff --git a/testsuite/tests/rename/should_fail/T10618.stderr b/testsuite/tests/rename/should_fail/T10618.stderr
index 8b4dc2c28d..21c35471dd 100644
--- a/testsuite/tests/rename/should_fail/T10618.stderr
+++ b/testsuite/tests/rename/should_fail/T10618.stderr
@@ -1,6 +1,6 @@
T10618.hs:3:22: error:
- • Variable not in scope: (<>) :: Maybe (Maybe a0) -> Maybe a1 -> t
+ • Variable not in scope: (<>) :: Maybe (Maybe a1) -> Maybe a0 -> t
• Perhaps you meant one of these:
‘<$>’ (imported from Prelude), ‘*>’ (imported from Prelude),
‘<$’ (imported from Prelude)
diff --git a/testsuite/tests/typecheck/should_fail/T11355.stderr b/testsuite/tests/typecheck/should_fail/T11355.stderr
index 68375400a8..6c649e4187 100644
--- a/testsuite/tests/typecheck/should_fail/T11355.stderr
+++ b/testsuite/tests/typecheck/should_fail/T11355.stderr
@@ -1,6 +1,6 @@
T11355.hs:5:7: error:
- • Illegal polymorphic type: forall (a :: TYPE t0). a
+ • Illegal polymorphic type: forall (a :: TYPE t1). a
GHC doesn't yet support impredicative polymorphism
• In the expression:
const @_ @((forall a. a) -> forall a. a) () (id @(forall a. a))
diff --git a/testsuite/tests/typecheck/should_fail/T5684.stderr b/testsuite/tests/typecheck/should_fail/T5684.stderr
index b2d0b01c46..673b7de92c 100644
--- a/testsuite/tests/typecheck/should_fail/T5684.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5684.stderr
@@ -1,144 +1,144 @@
-T5684.hs:20:12:
- No instance for (A Bool) arising from a use of ‘op’
- In the expression: op False False
- In the expression:
- [op False False, op 'c' undefined, op True undefined]
- In an equation for ‘flop1’:
- flop1 = [op False False, op 'c' undefined, op True undefined]
-
-T5684.hs:24:12:
- No instance for (B Char b10) arising from a use of ‘op’
- In the expression: op 'c' undefined
- In the expression:
- [op False False, op 'c' undefined, op True undefined]
- In an equation for ‘flop1’:
- flop1 = [op False False, op 'c' undefined, op True undefined]
-
-T5684.hs:25:12:
- No instance for (A b11) arising from a use of ‘op’
- In the expression: op True undefined
- In the expression:
- [op False False, op 'c' undefined, op True undefined]
- In an equation for ‘flop1’:
- flop1 = [op False False, op 'c' undefined, op True undefined]
-
-T5684.hs:29:12:
- No instance for (A Bool) arising from a use of ‘op’
- In the expression: op False False
- In the expression:
- [op False False, op True undefined, op 'c' undefined]
- In an equation for ‘flop2’:
- flop2 = [op False False, op True undefined, op 'c' undefined]
-
-T5684.hs:30:12:
- No instance for (A b8) arising from a use of ‘op’
- In the expression: op True undefined
- In the expression:
- [op False False, op True undefined, op 'c' undefined]
- In an equation for ‘flop2’:
- flop2 = [op False False, op True undefined, op 'c' undefined]
-
-T5684.hs:31:12:
- No instance for (B Char b9) arising from a use of ‘op’
- In the expression: op 'c' undefined
- In the expression:
- [op False False, op True undefined, op 'c' undefined]
- In an equation for ‘flop2’:
- flop2 = [op False False, op True undefined, op 'c' undefined]
-
-T5684.hs:35:12:
- No instance for (B Char b6) arising from a use of ‘op’
- In the expression: op 'c' undefined
- In the expression:
- [op 'c' undefined, op True undefined, op False False]
- In an equation for ‘flop3’:
- flop3 = [op 'c' undefined, op True undefined, op False False]
-
-T5684.hs:36:12:
- No instance for (A b7) arising from a use of ‘op’
- In the expression: op True undefined
- In the expression:
- [op 'c' undefined, op True undefined, op False False]
- In an equation for ‘flop3’:
- flop3 = [op 'c' undefined, op True undefined, op False False]
-
-T5684.hs:37:12:
- No instance for (A Bool) arising from a use of ‘op’
- In the expression: op False False
- In the expression:
- [op 'c' undefined, op True undefined, op False False]
- In an equation for ‘flop3’:
- flop3 = [op 'c' undefined, op True undefined, op False False]
-
-T5684.hs:40:12:
- No instance for (B Char b4) arising from a use of ‘op’
- In the expression: op 'c' undefined
- In the expression:
- [op 'c' undefined, op False False, op True undefined]
- In an equation for ‘flop4’:
- flop4 = [op 'c' undefined, op False False, op True undefined]
-
-T5684.hs:41:12:
- No instance for (A Bool) arising from a use of ‘op’
- In the expression: op False False
- In the expression:
- [op 'c' undefined, op False False, op True undefined]
- In an equation for ‘flop4’:
- flop4 = [op 'c' undefined, op False False, op True undefined]
-
-T5684.hs:42:12:
- No instance for (A b5) arising from a use of ‘op’
- In the expression: op True undefined
- In the expression:
- [op 'c' undefined, op False False, op True undefined]
- In an equation for ‘flop4’:
- flop4 = [op 'c' undefined, op False False, op True undefined]
-
-T5684.hs:46:12:
- No instance for (A b2) arising from a use of ‘op’
- In the expression: op True undefined
- In the expression:
- [op True undefined, op 'c' undefined, op False False]
- In an equation for ‘flop5’:
- flop5 = [op True undefined, op 'c' undefined, op False False]
-
-T5684.hs:47:12:
- No instance for (B Char b3) arising from a use of ‘op’
- In the expression: op 'c' undefined
- In the expression:
- [op True undefined, op 'c' undefined, op False False]
- In an equation for ‘flop5’:
- flop5 = [op True undefined, op 'c' undefined, op False False]
-
-T5684.hs:48:12:
- No instance for (A Bool) arising from a use of ‘op’
- In the expression: op False False
- In the expression:
- [op True undefined, op 'c' undefined, op False False]
- In an equation for ‘flop5’:
- flop5 = [op True undefined, op 'c' undefined, op False False]
-
-T5684.hs:52:12:
- No instance for (A b0) arising from a use of ‘op’
- In the expression: op True undefined
- In the expression:
- [op True undefined, op False False, op 'c' undefined]
- In an equation for ‘flop6’:
- flop6 = [op True undefined, op False False, op 'c' undefined]
-
-T5684.hs:53:12:
- No instance for (A Bool) arising from a use of ‘op’
- In the expression: op False False
- In the expression:
- [op True undefined, op False False, op 'c' undefined]
- In an equation for ‘flop6’:
- flop6 = [op True undefined, op False False, op 'c' undefined]
-
-T5684.hs:54:12:
- No instance for (B Char b1) arising from a use of ‘op’
- In the expression: op 'c' undefined
- In the expression:
- [op True undefined, op False False, op 'c' undefined]
- In an equation for ‘flop6’:
- flop6 = [op True undefined, op False False, op 'c' undefined]
+T5684.hs:20:12: error:
+ • No instance for (A Bool) arising from a use of ‘op’
+ • In the expression: op False False
+ In the expression:
+ [op False False, op 'c' undefined, op True undefined]
+ In an equation for ‘flop1’:
+ flop1 = [op False False, op 'c' undefined, op True undefined]
+
+T5684.hs:24:12: error:
+ • No instance for (B Char b10) arising from a use of ‘op’
+ • In the expression: op 'c' undefined
+ In the expression:
+ [op False False, op 'c' undefined, op True undefined]
+ In an equation for ‘flop1’:
+ flop1 = [op False False, op 'c' undefined, op True undefined]
+
+T5684.hs:25:12: error:
+ • No instance for (A b11) arising from a use of ‘op’
+ • In the expression: op True undefined
+ In the expression:
+ [op False False, op 'c' undefined, op True undefined]
+ In an equation for ‘flop1’:
+ flop1 = [op False False, op 'c' undefined, op True undefined]
+
+T5684.hs:29:12: error:
+ • No instance for (A Bool) arising from a use of ‘op’
+ • In the expression: op False False
+ In the expression:
+ [op False False, op True undefined, op 'c' undefined]
+ In an equation for ‘flop2’:
+ flop2 = [op False False, op True undefined, op 'c' undefined]
+
+T5684.hs:30:12: error:
+ • No instance for (A b8) arising from a use of ‘op’
+ • In the expression: op True undefined
+ In the expression:
+ [op False False, op True undefined, op 'c' undefined]
+ In an equation for ‘flop2’:
+ flop2 = [op False False, op True undefined, op 'c' undefined]
+
+T5684.hs:31:12: error:
+ • No instance for (B Char b9) arising from a use of ‘op’
+ • In the expression: op 'c' undefined
+ In the expression:
+ [op False False, op True undefined, op 'c' undefined]
+ In an equation for ‘flop2’:
+ flop2 = [op False False, op True undefined, op 'c' undefined]
+
+T5684.hs:35:12: error:
+ • No instance for (B Char b6) arising from a use of ‘op’
+ • In the expression: op 'c' undefined
+ In the expression:
+ [op 'c' undefined, op True undefined, op False False]
+ In an equation for ‘flop3’:
+ flop3 = [op 'c' undefined, op True undefined, op False False]
+
+T5684.hs:36:12: error:
+ • No instance for (A b7) arising from a use of ‘op’
+ • In the expression: op True undefined
+ In the expression:
+ [op 'c' undefined, op True undefined, op False False]
+ In an equation for ‘flop3’:
+ flop3 = [op 'c' undefined, op True undefined, op False False]
+
+T5684.hs:37:12: error:
+ • No instance for (A Bool) arising from a use of ‘op’
+ • In the expression: op False False
+ In the expression:
+ [op 'c' undefined, op True undefined, op False False]
+ In an equation for ‘flop3’:
+ flop3 = [op 'c' undefined, op True undefined, op False False]
+
+T5684.hs:40:12: error:
+ • No instance for (B Char b4) arising from a use of ‘op’
+ • In the expression: op 'c' undefined
+ In the expression:
+ [op 'c' undefined, op False False, op True undefined]
+ In an equation for ‘flop4’:
+ flop4 = [op 'c' undefined, op False False, op True undefined]
+
+T5684.hs:41:12: error:
+ • No instance for (A Bool) arising from a use of ‘op’
+ • In the expression: op False False
+ In the expression:
+ [op 'c' undefined, op False False, op True undefined]
+ In an equation for ‘flop4’:
+ flop4 = [op 'c' undefined, op False False, op True undefined]
+
+T5684.hs:42:12: error:
+ • No instance for (A b5) arising from a use of ‘op’
+ • In the expression: op True undefined
+ In the expression:
+ [op 'c' undefined, op False False, op True undefined]
+ In an equation for ‘flop4’:
+ flop4 = [op 'c' undefined, op False False, op True undefined]
+
+T5684.hs:46:12: error:
+ • No instance for (A b3) arising from a use of ‘op’
+ • In the expression: op True undefined
+ In the expression:
+ [op True undefined, op 'c' undefined, op False False]
+ In an equation for ‘flop5’:
+ flop5 = [op True undefined, op 'c' undefined, op False False]
+
+T5684.hs:47:12: error:
+ • No instance for (B Char b2) arising from a use of ‘op’
+ • In the expression: op 'c' undefined
+ In the expression:
+ [op True undefined, op 'c' undefined, op False False]
+ In an equation for ‘flop5’:
+ flop5 = [op True undefined, op 'c' undefined, op False False]
+
+T5684.hs:48:12: error:
+ • No instance for (A Bool) arising from a use of ‘op’
+ • In the expression: op False False
+ In the expression:
+ [op True undefined, op 'c' undefined, op False False]
+ In an equation for ‘flop5’:
+ flop5 = [op True undefined, op 'c' undefined, op False False]
+
+T5684.hs:52:12: error:
+ • No instance for (A b0) arising from a use of ‘op’
+ • In the expression: op True undefined
+ In the expression:
+ [op True undefined, op False False, op 'c' undefined]
+ In an equation for ‘flop6’:
+ flop6 = [op True undefined, op False False, op 'c' undefined]
+
+T5684.hs:53:12: error:
+ • No instance for (A Bool) arising from a use of ‘op’
+ • In the expression: op False False
+ In the expression:
+ [op True undefined, op False False, op 'c' undefined]
+ In an equation for ‘flop6’:
+ flop6 = [op True undefined, op False False, op 'c' undefined]
+
+T5684.hs:54:12: error:
+ • No instance for (B Char b1) arising from a use of ‘op’
+ • In the expression: op 'c' undefined
+ In the expression:
+ [op True undefined, op False False, op 'c' undefined]
+ In an equation for ‘flop6’:
+ flop6 = [op True undefined, op False False, op 'c' undefined]
diff --git a/testsuite/tests/typecheck/should_fail/T7851.stderr b/testsuite/tests/typecheck/should_fail/T7851.stderr
index 14efa7c7c9..b8ec6b8f32 100644
--- a/testsuite/tests/typecheck/should_fail/T7851.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7851.stderr
@@ -1,7 +1,7 @@
T7851.hs:5:10: error:
- • Couldn't match expected type ‘IO a0’
- with actual type ‘a1 -> IO ()’
+ • Couldn't match expected type ‘IO a1’
+ with actual type ‘a0 -> IO ()’
• Probable cause: ‘print’ is applied to too few arguments
In a stmt of a 'do' block: print
In the expression:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail001.stderr b/testsuite/tests/typecheck/should_fail/tcfail001.stderr
index 0b0a799c04..61604469e5 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail001.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail001.stderr
@@ -1,7 +1,7 @@
tcfail001.hs:9:2: error:
• Couldn't match expected type ‘[a]’
- with actual type ‘[t0] -> [t1]’
+ with actual type ‘[t1] -> [t0]’
• The equation(s) for ‘op’ have one argument,
but its type ‘[a]’ has none
In the instance declaration for ‘A [a]’