summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-09-04 22:27:17 +0100
committerRichard Eisenberg <rae@cs.brynmawr.edu>2018-03-31 23:16:46 -0400
commitfaec8d358985e5d0bf363bd96f23fe76c9e281f7 (patch)
tree9aebd4566f5787dbbe08ca8fd9dc720958610345 /testsuite
parentca535f95a742d885c4082c9dc296c151fb3c1e12 (diff)
downloadhaskell-faec8d358985e5d0bf363bd96f23fe76c9e281f7.tar.gz
Track type variable scope more carefully.
The main job of this commit is to track more accurately the scope of tyvars introduced by user-written foralls. For example, it would be to have something like this: forall a. Int -> (forall k (b :: k). Proxy '[a, b]) -> Bool In that type, a's kind must be k, but k isn't in scope. We had a terrible way of doing this before (not worth repeating or describing here, but see the old tcImplicitTKBndrs and friends), but now we have a principled approach: make an Implication when kind-checking a forall. Doing so then hooks into the existing machinery for preventing skolem-escape, performing floating, etc. This also means that we bump the TcLevel whenever going into a forall. The new behavior is done in TcHsType.scopeTyVars, but see also TcHsType.tc{Im,Ex}plicitTKBndrs, which have undergone significant rewriting. There are several Notes near there to guide you. Of particular interest there is that Implication constraints can now have skolems that are out of order; this situation is reported in TcErrors. A major consequence of this is a slightly tweaked process for type- checking type declarations. The new Note [Use SigTvs in kind-checking pass] in TcTyClsDecls lays it out. The error message for dependent/should_fail/TypeSkolEscape has become noticeably worse. However, this is because the code in TcErrors goes to some length to preserve pre-8.0 error messages for kind errors. It's time to rip off that plaster and get rid of much of the kind-error-specific error messages. I tried this, and doing so led to a lovely error message for TypeSkolEscape. So: I'm accepting the error message quality regression for now, but will open up a new ticket to fix it, along with a larger error-message improvement I've been pondering. This applies also to dependent/should_fail/{BadTelescope2,T14066,T14066e}, polykinds/T11142. Other minor changes: - isUnliftedTypeKind didn't look for tuples and sums. It does now. - check_type used check_arg_type on both sides of an AppTy. But the left side of an AppTy isn't an arg, and this was causing a bad error message. I've changed it to use check_type on the left-hand side. - Some refactoring around when we print (TYPE blah) in error messages. The changes decrease the times when we do so, to good effect. Of course, this is still all controlled by -fprint-explicit-runtime-reps Fixes #14066 #14749 Test cases: dependent/should_compile/{T14066a,T14749}, dependent/should_fail/T14066{,c,d,e,f,g,h}
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/codeGen/should_fail/T13233.stderr4
-rw-r--r--testsuite/tests/dependent/should_compile/InferDependency.hs6
-rw-r--r--testsuite/tests/dependent/should_compile/T11635.hs2
-rw-r--r--testsuite/tests/dependent/should_compile/T14066a.hs82
-rw-r--r--testsuite/tests/dependent/should_compile/T14066a.stderr5
-rw-r--r--testsuite/tests/dependent/should_compile/T14749.hs (renamed from testsuite/tests/typecheck/should_compile/T14749.hs)0
-rw-r--r--testsuite/tests/dependent/should_compile/all.T2
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope.stderr5
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope2.stderr13
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope3.stderr2
-rw-r--r--testsuite/tests/dependent/should_fail/BadTelescope4.stderr4
-rw-r--r--testsuite/tests/dependent/should_fail/InferDependency.stderr10
-rw-r--r--testsuite/tests/dependent/should_fail/T13601.stderr3
-rw-r--r--testsuite/tests/dependent/should_fail/T13780c.stderr2
-rw-r--r--testsuite/tests/dependent/should_fail/T14066.hs17
-rw-r--r--testsuite/tests/dependent/should_fail/T14066.stderr11
-rw-r--r--testsuite/tests/dependent/should_fail/T14066c.hs9
-rw-r--r--testsuite/tests/dependent/should_fail/T14066c.stderr6
-rw-r--r--testsuite/tests/dependent/should_fail/T14066d.hs17
-rw-r--r--testsuite/tests/dependent/should_fail/T14066d.stderr21
-rw-r--r--testsuite/tests/dependent/should_fail/T14066e.hs13
-rw-r--r--testsuite/tests/dependent/should_fail/T14066e.stderr11
-rw-r--r--testsuite/tests/dependent/should_fail/T14066f.hs8
-rw-r--r--testsuite/tests/dependent/should_fail/T14066f.stderr6
-rw-r--r--testsuite/tests/dependent/should_fail/T14066g.hs9
-rw-r--r--testsuite/tests/dependent/should_fail/T14066g.stderr7
-rw-r--r--testsuite/tests/dependent/should_fail/T14066h.hs11
-rw-r--r--testsuite/tests/dependent/should_fail/T14066h.stderr16
-rw-r--r--testsuite/tests/dependent/should_fail/TypeSkolEscape.hs1
-rw-r--r--testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr10
-rw-r--r--testsuite/tests/dependent/should_fail/all.T11
-rw-r--r--testsuite/tests/deriving/should_compile/T11732c.hs7
-rw-r--r--testsuite/tests/gadt/T12468.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/T10248.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/T10249.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/T8353.stderr20
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7938.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T8129.stdout1
-rw-r--r--testsuite/tests/module/mod71.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T12531.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10615.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T11976.stderr18
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T14040a.stderr37
-rw-r--r--testsuite/tests/perf/haddock/all.T5
-rw-r--r--testsuite/tests/polykinds/SigTvKinds3.hs9
-rw-r--r--testsuite/tests/polykinds/SigTvKinds3.stderr6
-rw-r--r--testsuite/tests/polykinds/T11142.stderr9
-rw-r--r--testsuite/tests/polykinds/T12593.stderr59
-rw-r--r--testsuite/tests/polykinds/T13985.stderr6
-rw-r--r--testsuite/tests/polykinds/T14563.hs2
-rw-r--r--testsuite/tests/polykinds/T14846.stderr25
-rw-r--r--testsuite/tests/polykinds/T7230.stderr4
-rw-r--r--testsuite/tests/polykinds/T8566.stderr2
-rw-r--r--testsuite/tests/polykinds/T9222.stderr2
-rw-r--r--testsuite/tests/polykinds/all.T6
-rw-r--r--testsuite/tests/th/T10267.stderr16
-rw-r--r--testsuite/tests/typecheck/should_compile/T13050.stderr30
-rw-r--r--testsuite/tests/typecheck/should_compile/T13343.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/T14590.stderr40
-rw-r--r--testsuite/tests/typecheck/should_compile/T2494.stderr6
-rw-r--r--testsuite/tests/typecheck/should_compile/T9497a.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.stderr244
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
-rw-r--r--testsuite/tests/typecheck/should_compile/hole_constraints.stderr20
-rw-r--r--testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/holes.stderr26
-rw-r--r--testsuite/tests/typecheck/should_compile/holes3.stderr26
-rw-r--r--testsuite/tests/typecheck/should_compile/refinement_substitutions.stderr190
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_substitutions.stderr30
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T11355.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T12177.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/T14350.stderr27
-rw-r--r--testsuite/tests/typecheck/should_fail/T14607.hs4
-rw-r--r--testsuite/tests/typecheck/should_fail/T14607.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/T9497d.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T2
-rw-r--r--testsuite/tests/typecheck/should_run/T9497a-run.stderr4
-rw-r--r--testsuite/tests/typecheck/should_run/T9497b-run.stderr4
-rw-r--r--testsuite/tests/typecheck/should_run/T9497c-run.stderr4
80 files changed, 889 insertions, 399 deletions
diff --git a/testsuite/tests/codeGen/should_fail/T13233.stderr b/testsuite/tests/codeGen/should_fail/T13233.stderr
index c1cbb97d21..c3683138f8 100644
--- a/testsuite/tests/codeGen/should_fail/T13233.stderr
+++ b/testsuite/tests/codeGen/should_fail/T13233.stderr
@@ -8,7 +8,9 @@ T13233.hs:14:11: error:
T13233.hs:22:16: error:
Cannot use primitive with levity-polymorphic arguments:
- GHC.Prim.(#,#) :: forall (a :: TYPE rep1) (b :: TYPE rep2).
+ GHC.Prim.(#,#) :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep) (a :: TYPE
+ rep1) (b :: TYPE
+ rep2).
a -> b -> (# a, b #)
Levity-polymorphic arguments:
a :: TYPE rep1
diff --git a/testsuite/tests/dependent/should_compile/InferDependency.hs b/testsuite/tests/dependent/should_compile/InferDependency.hs
new file mode 100644
index 0000000000..47957d47d6
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/InferDependency.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE TypeInType #-}
+
+module InferDependency where
+
+data Proxy k (a :: k)
+data Proxy2 k a = P (Proxy k a)
diff --git a/testsuite/tests/dependent/should_compile/T11635.hs b/testsuite/tests/dependent/should_compile/T11635.hs
index 1cbdbafb90..2292def966 100644
--- a/testsuite/tests/dependent/should_compile/T11635.hs
+++ b/testsuite/tests/dependent/should_compile/T11635.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TypeInType, KindSignatures, ExplicitForAll #-}
+{-# LANGUAGE TypeInType, KindSignatures, ExplicitForAll, RankNTypes #-}
module T11635 where
diff --git a/testsuite/tests/dependent/should_compile/T14066a.hs b/testsuite/tests/dependent/should_compile/T14066a.hs
new file mode 100644
index 0000000000..e1a6255520
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/T14066a.hs
@@ -0,0 +1,82 @@
+{-# LANGUAGE TypeFamilies, TypeInType, ExplicitForAll, GADTs,
+ UndecidableInstances, RankNTypes, ScopedTypeVariables #-}
+
+module T14066a where
+
+import Data.Proxy
+import Data.Kind
+import Data.Type.Bool
+
+
+type family Bar x y where
+ Bar (x :: a) (y :: b) = Int
+ Bar (x :: c) (y :: d) = Bool -- a,b,c,d should be SigTvs and unify appropriately
+
+
+ -- the two k's, even though they have different scopes, should unify in the
+ -- kind-check and then work in the type-check because Prox3 has been generalized
+
+data Prox3 a where
+ MkProx3a :: Prox3 (a :: k1)
+ MkProx3b :: Prox3 (a :: k2)
+
+ -- This probably should be rejected, as it's polymorphic recursion without a CUSK.
+ -- But GHC accepts it because the polymorphic occurrence is at a type variable.
+data T0 a = forall k (b :: k). MkT0 (T0 b) Int
+
+ -- k and j should unify
+type family G x a where
+ G Int (b :: k) = Int
+ G Bool (c :: j) = Bool
+
+-- this last example just checks that GADT pattern-matching on kinds still works.
+-- nothing new here.
+data T (a :: k) where
+ MkT :: T (a :: Type -> Type)
+
+data S (a :: Type -> Type) where
+ MkS :: S a
+
+f :: forall k (a :: k). Proxy a -> T a -> ()
+f _ MkT = let y :: S a
+ y = MkS
+ in ()
+
+-- This is questionable. Should we use the RHS to determine dependency? It works
+-- now, but if it stops working in the future, that's not a deal-breaker.
+type P k a = Proxy (a :: k)
+
+
+-- This is a challenge. It should be accepted, but only because c's kind is learned
+-- to be Proxy True, allowing b to be assigned kind `a`. If we don't know c's kind,
+-- then GHC would need to be convinced that If (c's kind) b d always has kind `a`.
+-- Naively, we don't know about c's kind early enough.
+
+data SameKind :: forall k. k -> k -> Type
+type family IfK (e :: Proxy (j :: Bool)) (f :: m) (g :: n) :: If j m n where
+ IfK (_ :: Proxy True) f _ = f
+ IfK (_ :: Proxy False) _ g = g
+x :: forall c. (forall a b (d :: a). SameKind (IfK c b d) d) -> (Proxy (c :: Proxy True))
+x _ = Proxy
+
+
+f2 :: forall b. b -> Proxy Maybe
+f2 x = fstOf3 y :: Proxy Maybe
+ where
+ y :: (Proxy a, Proxy c, b)
+ y = (Proxy, Proxy, x)
+
+fstOf3 (x, _, _) = x
+
+f3 :: forall b. b -> Proxy Maybe
+f3 x = fst y :: Proxy Maybe
+ where
+ y :: (Proxy a, b)
+ y = (Proxy, x)
+
+-- cf. dependent/should_fail/T14066h. Here, y's type does *not* capture any variables,
+-- so it is generalized, even with MonoLocalBinds.
+f4 x = (fst y :: Proxy Int, fst y :: Proxy Maybe)
+ where
+ y :: (Proxy a, Int)
+ y = (Proxy, x)
diff --git a/testsuite/tests/dependent/should_compile/T14066a.stderr b/testsuite/tests/dependent/should_compile/T14066a.stderr
new file mode 100644
index 0000000000..906695f3f7
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/T14066a.stderr
@@ -0,0 +1,5 @@
+
+T14066a.hs:13:3: warning:
+ Type family instance equation is overlapped:
+ forall c d (x :: c) (y :: d).
+ Bar x y = Bool -- Defined at T14066a.hs:13:3
diff --git a/testsuite/tests/typecheck/should_compile/T14749.hs b/testsuite/tests/dependent/should_compile/T14749.hs
index 79bcce66ff..79bcce66ff 100644
--- a/testsuite/tests/typecheck/should_compile/T14749.hs
+++ b/testsuite/tests/dependent/should_compile/T14749.hs
diff --git a/testsuite/tests/dependent/should_compile/all.T b/testsuite/tests/dependent/should_compile/all.T
index da25b22799..070e1203f8 100644
--- a/testsuite/tests/dependent/should_compile/all.T
+++ b/testsuite/tests/dependent/should_compile/all.T
@@ -32,3 +32,5 @@ test('T13938', [extra_files(['T13938a.hs'])], run_command,
['$MAKE -s --no-print-directory T13938'])
test('T14556', normal, compile, [''])
test('T14720', normal, compile, [''])
+test('T14066a', normal, compile, [''])
+test('T14749', normal, compile, [''])
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope.stderr b/testsuite/tests/dependent/should_fail/BadTelescope.stderr
index 2fbc35a9ba..5fa8efd502 100644
--- a/testsuite/tests/dependent/should_fail/BadTelescope.stderr
+++ b/testsuite/tests/dependent/should_fail/BadTelescope.stderr
@@ -1,9 +1,6 @@
BadTelescope.hs:9:1: error:
- • These kind and type variables: (a :: k)
- k
- (b :: k)
- (c :: SameKind a b)
+ • These kind and type variables: a k (b :: k) (c :: SameKind a b)
are out of dependency order. Perhaps try this ordering:
k (a :: k) (b :: k) (c :: SameKind a b)
• In the data type declaration for ‘X’
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope2.stderr b/testsuite/tests/dependent/should_fail/BadTelescope2.stderr
index 2a9dc76310..55a484910c 100644
--- a/testsuite/tests/dependent/should_fail/BadTelescope2.stderr
+++ b/testsuite/tests/dependent/should_fail/BadTelescope2.stderr
@@ -3,14 +3,11 @@ BadTelescope2.hs:10:8: error:
• These kind and type variables: a k (b :: k)
are out of dependency order. Perhaps try this ordering:
k (a :: k) (b :: k)
- • In the type signature:
- foo :: forall a k (b :: k). SameKind a b
+ • In the type signature: foo :: forall a k (b :: k). SameKind a b
-BadTelescope2.hs:13:8: error:
- • The kind of variable ‘b’, namely ‘Proxy a’,
- depends on variable ‘a’ from an inner scope
- Perhaps bind ‘b’ sometime after binding ‘a’
- NB: Implicitly-bound variables always come before other ones.
- • In the type signature:
+BadTelescope2.hs:13:70: error:
+ • Expected kind ‘k0’, but ‘d’ has kind ‘Proxy a’
+ • In the second argument of ‘SameKind’, namely ‘d’
+ In the type signature:
bar :: forall a (c :: Proxy b) (d :: Proxy a).
Proxy c -> SameKind b d
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope3.stderr b/testsuite/tests/dependent/should_fail/BadTelescope3.stderr
index 4ea7458bb2..1137f28c4d 100644
--- a/testsuite/tests/dependent/should_fail/BadTelescope3.stderr
+++ b/testsuite/tests/dependent/should_fail/BadTelescope3.stderr
@@ -1,6 +1,6 @@
BadTelescope3.hs:9:1: error:
- • These kind and type variables: (a :: k) k (b :: k)
+ • These kind and type variables: a k (b :: k)
are out of dependency order. Perhaps try this ordering:
k (a :: k) (b :: k)
• In the type synonym declaration for ‘S’
diff --git a/testsuite/tests/dependent/should_fail/BadTelescope4.stderr b/testsuite/tests/dependent/should_fail/BadTelescope4.stderr
index 2394f896ad..f7c281e983 100644
--- a/testsuite/tests/dependent/should_fail/BadTelescope4.stderr
+++ b/testsuite/tests/dependent/should_fail/BadTelescope4.stderr
@@ -1,6 +1,6 @@
BadTelescope4.hs:9:1: error:
- • These kind and type variables: (a :: k)
+ • These kind and type variables: a
(c :: Proxy b)
(d :: Proxy a)
(x :: SameKind b d)
@@ -11,5 +11,5 @@ BadTelescope4.hs:9:1: error:
(c :: Proxy b)
(d :: Proxy a)
(x :: SameKind b d)
- NB: Implicitly declared kind variables are put first.
+ NB: Implicitly declared variables come before others.
• In the data type declaration for ‘Bad’
diff --git a/testsuite/tests/dependent/should_fail/InferDependency.stderr b/testsuite/tests/dependent/should_fail/InferDependency.stderr
index 7fa900a889..cc852ee58c 100644
--- a/testsuite/tests/dependent/should_fail/InferDependency.stderr
+++ b/testsuite/tests/dependent/should_fail/InferDependency.stderr
@@ -1,8 +1,10 @@
-InferDependency.hs:6:1: error:
- • Invalid declaration for ‘Proxy2’; you must explicitly
- declare which variables are dependent on which others.
- Inferred variable kinds:
+InferDependency.hs:6:13: error:
+ • Type constructor argument ‘k’ is used dependently.
+ Any dependent arguments must be obviously so, not inferred
+ by the type-checker.
+ Inferred argument kinds:
k :: *
a :: k
+ Suggestion: use ‘k’ in a kind to make the dependency clearer.
• In the data type declaration for ‘Proxy2’
diff --git a/testsuite/tests/dependent/should_fail/T13601.stderr b/testsuite/tests/dependent/should_fail/T13601.stderr
index c1c9803e5a..bc2877c3e6 100644
--- a/testsuite/tests/dependent/should_fail/T13601.stderr
+++ b/testsuite/tests/dependent/should_fail/T13601.stderr
@@ -1,6 +1,5 @@
T13601.hs:18:16: error:
- • Expected kind ‘TYPE (Rep 'LiftedRep)’,
- but ‘Logic a’ has kind ‘TYPE (Rep rep)’
+ • Expected a type, but ‘Logic a’ has kind ‘TYPE (Rep rep)’
• In the first argument of ‘Boolean’, namely ‘(Logic a)’
In the class declaration for ‘Eq’
diff --git a/testsuite/tests/dependent/should_fail/T13780c.stderr b/testsuite/tests/dependent/should_fail/T13780c.stderr
index f91d7a3236..065c700dfc 100644
--- a/testsuite/tests/dependent/should_fail/T13780c.stderr
+++ b/testsuite/tests/dependent/should_fail/T13780c.stderr
@@ -2,7 +2,7 @@
[2 of 2] Compiling T13780c ( T13780c.hs, T13780c.o )
T13780c.hs:11:16: error:
- • Expected kind ‘Sing _’, but ‘SFalse’ has kind ‘Sing 'False’
+ • Expected kind ‘Sing _1’, but ‘SFalse’ has kind ‘Sing 'False’
• In the third argument of ‘ElimBool’, namely ‘SFalse’
In the type family declaration for ‘ElimBool’
diff --git a/testsuite/tests/dependent/should_fail/T14066.hs b/testsuite/tests/dependent/should_fail/T14066.hs
new file mode 100644
index 0000000000..58396df591
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE TypeInType #-}
+{-# LANGUAGE KindSignatures #-}
+
+module T14066 where
+
+import Data.Kind ( Type )
+import Data.Type.Equality
+import Data.Proxy
+import GHC.Exts
+
+data SameKind :: k -> k -> Type
+
+f (x :: Proxy a) = let g :: forall k (b :: k). SameKind a b
+ g = undefined
+ in ()
diff --git a/testsuite/tests/dependent/should_fail/T14066.stderr b/testsuite/tests/dependent/should_fail/T14066.stderr
new file mode 100644
index 0000000000..cd0142f5c1
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066.stderr
@@ -0,0 +1,11 @@
+
+T14066.hs:15:59: error:
+ • Expected kind ‘k0’, but ‘b’ has kind ‘k’
+ • In the second argument of ‘SameKind’, namely ‘b’
+ In the type signature: g :: forall k (b :: k). SameKind a b
+ In the expression:
+ let
+ g :: forall k (b :: k). SameKind a b
+ g = undefined
+ in ()
+ • Relevant bindings include x :: Proxy a (bound at T14066.hs:15:4)
diff --git a/testsuite/tests/dependent/should_fail/T14066c.hs b/testsuite/tests/dependent/should_fail/T14066c.hs
new file mode 100644
index 0000000000..b4597d2cec
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066c.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TypeFamilies, TypeInType, UndecidableInstances #-}
+
+module T14066c where
+
+type family H a b where
+ H a b = H b a
+
+type X = H True Nothing -- this should fail to kind-check.
+ -- if it's accepted, then we've inferred polymorphic recursion for H
diff --git a/testsuite/tests/dependent/should_fail/T14066c.stderr b/testsuite/tests/dependent/should_fail/T14066c.stderr
new file mode 100644
index 0000000000..dc5ba30a4f
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066c.stderr
@@ -0,0 +1,6 @@
+
+T14066c.hs:8:17: error:
+ • Expected kind ‘Bool’, but ‘Nothing’ has kind ‘Maybe a0’
+ • In the second argument of ‘H’, namely ‘Nothing’
+ In the type ‘H True Nothing’
+ In the type declaration for ‘X’
diff --git a/testsuite/tests/dependent/should_fail/T14066d.hs b/testsuite/tests/dependent/should_fail/T14066d.hs
new file mode 100644
index 0000000000..ea47644688
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066d.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE RankNTypes, ScopedTypeVariables, TypeInType #-}
+
+module T14066d where
+
+import Data.Proxy
+
+g :: (forall c b (a :: c). (Proxy a, Proxy c, b)) -> ()
+g _ = ()
+
+f :: forall b. b -> (Proxy Maybe, ())
+f x = (fstOf3 y :: Proxy Maybe, g y)
+ where
+ y :: (Proxy a, Proxy c, b) -- this should NOT generalize over b
+ -- meaning the call to g is ill-typed
+ y = (Proxy, Proxy, x)
+
+fstOf3 (x, _, _) = x
diff --git a/testsuite/tests/dependent/should_fail/T14066d.stderr b/testsuite/tests/dependent/should_fail/T14066d.stderr
new file mode 100644
index 0000000000..3a8b90edce
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066d.stderr
@@ -0,0 +1,21 @@
+
+T14066d.hs:11:35: error:
+ • Couldn't match type ‘b’ with ‘b1’
+ ‘b’ is a rigid type variable bound by
+ the type signature for:
+ f :: forall b. b -> (Proxy Maybe, ())
+ at T14066d.hs:10:1-37
+ ‘b1’ is a rigid type variable bound by
+ a type expected by the context:
+ forall c b1 (a :: c). (Proxy a, Proxy c, b1)
+ at T14066d.hs:11:33-35
+ Expected type: (Proxy a, Proxy c, b1)
+ Actual type: (Proxy a, Proxy c, b)
+ • In the first argument of ‘g’, namely ‘y’
+ In the expression: g y
+ In the expression: (fstOf3 y :: Proxy Maybe, g y)
+ • Relevant bindings include
+ y :: forall k1 k2 (a :: k2) (c :: k1). (Proxy a, Proxy c, b)
+ (bound at T14066d.hs:15:5)
+ x :: b (bound at T14066d.hs:11:3)
+ f :: b -> (Proxy Maybe, ()) (bound at T14066d.hs:11:1)
diff --git a/testsuite/tests/dependent/should_fail/T14066e.hs b/testsuite/tests/dependent/should_fail/T14066e.hs
new file mode 100644
index 0000000000..9b799e542c
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066e.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE MonoLocalBinds, TypeInType, ScopedTypeVariables #-}
+
+module T14066e where
+
+import Data.Proxy
+
+-- this should fail because the dependency between b and c can't be
+-- determined in the type signature
+h :: forall a. a -> ()
+h x = ()
+ where
+ j :: forall c b. Proxy a -> Proxy b -> Proxy c -> Proxy b
+ j _ (p1 :: Proxy b') (p2 :: Proxy c') = (p1 :: Proxy (b' :: c'))
diff --git a/testsuite/tests/dependent/should_fail/T14066e.stderr b/testsuite/tests/dependent/should_fail/T14066e.stderr
new file mode 100644
index 0000000000..504ca5a80e
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066e.stderr
@@ -0,0 +1,11 @@
+
+T14066e.hs:13:59: error:
+ • Expected kind ‘c’, but ‘b'’ has kind ‘k0’
+ • In the first argument of ‘Proxy’, namely ‘(b' :: c')’
+ In an expression type signature: Proxy (b' :: c')
+ In the expression: (p1 :: Proxy (b' :: c'))
+ • Relevant bindings include
+ p2 :: Proxy c (bound at T14066e.hs:13:27)
+ p1 :: Proxy b (bound at T14066e.hs:13:10)
+ j :: Proxy a -> Proxy b -> Proxy c -> Proxy b
+ (bound at T14066e.hs:13:5)
diff --git a/testsuite/tests/dependent/should_fail/T14066f.hs b/testsuite/tests/dependent/should_fail/T14066f.hs
new file mode 100644
index 0000000000..ccb7ceac0e
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066f.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TypeInType #-}
+
+module T14066f where
+
+import Data.Proxy
+
+-- a can't come before k.
+type P a k = Proxy (a :: k)
diff --git a/testsuite/tests/dependent/should_fail/T14066f.stderr b/testsuite/tests/dependent/should_fail/T14066f.stderr
new file mode 100644
index 0000000000..44c4ed293c
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066f.stderr
@@ -0,0 +1,6 @@
+
+T14066f.hs:8:1: error:
+ • These kind and type variables: a k
+ are out of dependency order. Perhaps try this ordering:
+ k (a :: k)
+ • In the type synonym declaration for ‘P’
diff --git a/testsuite/tests/dependent/should_fail/T14066g.hs b/testsuite/tests/dependent/should_fail/T14066g.hs
new file mode 100644
index 0000000000..df0e03b173
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066g.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TypeInType #-}
+
+module T14066g where
+
+import Data.Kind
+
+data SameKind :: k -> k -> Type
+
+data Q a (b :: a) (d :: SameKind c b)
diff --git a/testsuite/tests/dependent/should_fail/T14066g.stderr b/testsuite/tests/dependent/should_fail/T14066g.stderr
new file mode 100644
index 0000000000..22ca786343
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066g.stderr
@@ -0,0 +1,7 @@
+
+T14066g.hs:9:1: error:
+ • These kind and type variables: a (b :: a) (d :: SameKind c b)
+ are out of dependency order. Perhaps try this ordering:
+ a (c :: a) (b :: a) (d :: SameKind c b)
+ NB: Implicitly declared variables come before others.
+ • In the data type declaration for ‘Q’
diff --git a/testsuite/tests/dependent/should_fail/T14066h.hs b/testsuite/tests/dependent/should_fail/T14066h.hs
new file mode 100644
index 0000000000..7e7ecd31c9
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066h.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE ScopedTypeVariables, TypeInType, MonoLocalBinds #-}
+
+module T14066h where
+
+import Data.Proxy
+
+f :: forall b. b -> (Proxy Int, Proxy Maybe)
+f x = (fst y :: Proxy Int, fst y :: Proxy Maybe)
+ where
+ y :: (Proxy a, b) -- MonoLocalBinds means this won't generalize over the kind of a
+ y = (Proxy, x)
diff --git a/testsuite/tests/dependent/should_fail/T14066h.stderr b/testsuite/tests/dependent/should_fail/T14066h.stderr
new file mode 100644
index 0000000000..bfd33693b6
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T14066h.stderr
@@ -0,0 +1,16 @@
+
+T14066h.hs:8:28: error:
+ • Couldn't match kind ‘* -> *’ with ‘*’
+ When matching types
+ a0 :: *
+ Maybe :: * -> *
+ Expected type: Proxy Maybe
+ Actual type: Proxy a0
+ • In the expression: fst y :: Proxy Maybe
+ In the expression: (fst y :: Proxy Int, fst y :: Proxy Maybe)
+ In an equation for ‘f’:
+ f x
+ = (fst y :: Proxy Int, fst y :: Proxy Maybe)
+ where
+ y :: (Proxy a, b)
+ y = (Proxy, x)
diff --git a/testsuite/tests/dependent/should_fail/TypeSkolEscape.hs b/testsuite/tests/dependent/should_fail/TypeSkolEscape.hs
index bbec037487..02b7737499 100644
--- a/testsuite/tests/dependent/should_fail/TypeSkolEscape.hs
+++ b/testsuite/tests/dependent/should_fail/TypeSkolEscape.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE RankNTypes, PolyKinds, TypeInType #-}
+-- NB: -fprint-explicit-runtime-reps enabled in all.T
module TypeSkolEscape where
diff --git a/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr b/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr
index 88539858cf..e2ef266914 100644
--- a/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr
+++ b/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr
@@ -1,7 +1,5 @@
-TypeSkolEscape.hs:8:1: error:
- • Quantified type's kind mentions quantified type variable
- (skolem escape)
- type: forall (a1 :: TYPE v1). a1
- of kind: TYPE v
- • In the type synonym declaration for ‘Bad’
+TypeSkolEscape.hs:9:52: error:
+ • Expected kind ‘k0’, but ‘a’ has kind ‘TYPE v’
+ • In the type ‘forall (v :: RuntimeRep) (a :: TYPE v). a’
+ In the type declaration for ‘Bad’
diff --git a/testsuite/tests/dependent/should_fail/all.T b/testsuite/tests/dependent/should_fail/all.T
index e28b2df5cd..7273445548 100644
--- a/testsuite/tests/dependent/should_fail/all.T
+++ b/testsuite/tests/dependent/should_fail/all.T
@@ -1,6 +1,6 @@
test('DepFail1', normal, compile_fail, [''])
test('RAE_T32a', normal, compile_fail, [''])
-test('TypeSkolEscape', normal, compile_fail, [''])
+test('TypeSkolEscape', normal, compile_fail, ['-fprint-explicit-runtime-reps'])
test('BadTelescope', normal, compile_fail, [''])
test('BadTelescope2', normal, compile_fail, [''])
test('BadTelescope3', normal, compile_fail, [''])
@@ -10,7 +10,6 @@ test('BadTelescope4', normal, compile_fail, [''])
test('RenamingStar', normal, compile_fail, [''])
test('T11407', normal, compile_fail, [''])
test('T11334b', normal, compile_fail, [''])
-test('InferDependency', normal, compile_fail, [''])
test('KindLevelsB', normal, compile_fail, [''])
test('T11473', normal, compile_fail, [''])
test('T11471', normal, compile_fail, [''])
@@ -21,3 +20,11 @@ test('T13601', normal, compile_fail, [''])
test('T13780a', normal, compile_fail, [''])
test('T13780c', [extra_files(['T13780b.hs'])],
multimod_compile_fail, ['T13780c', ''])
+test('T14066', normal, compile_fail, [''])
+test('T14066c', normal, compile_fail, [''])
+test('T14066d', normal, compile_fail, [''])
+test('T14066e', normal, compile_fail, [''])
+test('T14066f', normal, compile_fail, [''])
+test('T14066g', normal, compile_fail, [''])
+test('T14066h', normal, compile_fail, [''])
+test('InferDependency', normal, compile_fail, [''])
diff --git a/testsuite/tests/deriving/should_compile/T11732c.hs b/testsuite/tests/deriving/should_compile/T11732c.hs
index e013383f22..a3034ad867 100644
--- a/testsuite/tests/deriving/should_compile/T11732c.hs
+++ b/testsuite/tests/deriving/should_compile/T11732c.hs
@@ -14,5 +14,10 @@ instance Cat * (->) where
catId = id
catComp = (.)
-newtype Fun1 a b = Fun1 (a -> b) deriving (Cat k)
newtype Fun2 a b = Fun2 (a -> b) deriving (Cat *)
+
+-- The ticket says this should work:
+-- newtype Fun1 a b = Fun1 (a -> b) deriving (Cat k)
+-- But that requires that the kind of (Cat k) to depend on k, where k is local
+-- This is all due for an update, anyway, when #14331 is done, and it's unclear
+-- what the correct behavior here is, anyway. (Richard thinks: reject!)
diff --git a/testsuite/tests/gadt/T12468.stderr b/testsuite/tests/gadt/T12468.stderr
index 6585f663d0..3f540931ec 100644
--- a/testsuite/tests/gadt/T12468.stderr
+++ b/testsuite/tests/gadt/T12468.stderr
@@ -11,8 +11,6 @@ T12468.hs:9:7: error:
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at T12468.hs:3:8-13
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T12468.hs:3:8-13
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/ghci/scripts/T10248.stderr b/testsuite/tests/ghci/scripts/T10248.stderr
index 283ccdddc4..d6428c5cbd 100644
--- a/testsuite/tests/ghci/scripts/T10248.stderr
+++ b/testsuite/tests/ghci/scripts/T10248.stderr
@@ -10,7 +10,5 @@
• Relevant bindings include
it :: f (Maybe a) (bound at <interactive>:2:1)
Valid substitutions include
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/ghci/scripts/T10249.stderr b/testsuite/tests/ghci/scripts/T10249.stderr
index 66ce87cd01..d495994e95 100644
--- a/testsuite/tests/ghci/scripts/T10249.stderr
+++ b/testsuite/tests/ghci/scripts/T10249.stderr
@@ -8,7 +8,5 @@
In an equation for ‘it’: it = _
• Relevant bindings include it :: t (bound at <interactive>:1:1)
Valid substitutions include
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/ghci/scripts/T8353.stderr b/testsuite/tests/ghci/scripts/T8353.stderr
index 15dbdaf47e..4cac123c96 100644
--- a/testsuite/tests/ghci/scripts/T8353.stderr
+++ b/testsuite/tests/ghci/scripts/T8353.stderr
@@ -18,9 +18,7 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Err’))
@@ -43,9 +41,7 @@ Defer03.hs:7:5: error:
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Err’))
@@ -68,9 +64,7 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Err’))
@@ -93,9 +87,7 @@ Defer03.hs:7:5: error:
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Err’))
@@ -118,8 +110,6 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/indexed-types/should_fail/T7938.stderr b/testsuite/tests/indexed-types/should_fail/T7938.stderr
index 2816e2f9f8..d0c199b804 100644
--- a/testsuite/tests/indexed-types/should_fail/T7938.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7938.stderr
@@ -1,6 +1,6 @@
T7938.hs:12:16: error:
- • Expected a type, but ‘(KP :: KProxy k2)’ has kind ‘KProxy k2’
+ • Expected a type, but ‘(KP :: KProxy k2)’ has kind ‘KProxy k4’
• In the type ‘(KP :: KProxy k2)’
In the type instance declaration for ‘Bar’
In the instance declaration for ‘Foo (a :: k1) (b :: k2)’
diff --git a/testsuite/tests/indexed-types/should_fail/T8129.stdout b/testsuite/tests/indexed-types/should_fail/T8129.stdout
index 8a0fb29814..b23febd728 100644
--- a/testsuite/tests/indexed-types/should_fail/T8129.stdout
+++ b/testsuite/tests/indexed-types/should_fail/T8129.stdout
@@ -1,3 +1,2 @@
• Could not deduce (C x0 (F x0))
• Could not deduce (C x0 (F x0))
- \ \\226\\128\\162 Could not deduce (C x0 (F x0))\n\
diff --git a/testsuite/tests/module/mod71.stderr b/testsuite/tests/module/mod71.stderr
index 4d592cea84..52d0ae3e86 100644
--- a/testsuite/tests/module/mod71.stderr
+++ b/testsuite/tests/module/mod71.stderr
@@ -11,8 +11,6 @@ mod71.hs:4:9: error:
x :: t1 -> t -> t2 (bound at mod71.hs:4:3)
f :: (t1 -> t -> t2) -> t2 (bound at mod71.hs:4:1)
Valid substitutions include
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at mod71.hs:3:8
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/partial-sigs/should_compile/T12531.stderr b/testsuite/tests/partial-sigs/should_compile/T12531.stderr
index df83c1a2ed..20c44ecb12 100644
--- a/testsuite/tests/partial-sigs/should_compile/T12531.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T12531.stderr
@@ -8,8 +8,6 @@ T12531.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
x :: Int# (bound at T12531.hs:6:3)
f :: Int# -> Int (bound at T12531.hs:6:1)
Valid substitutions include
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T12531.hs:3:8-13
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.stderr b/testsuite/tests/partial-sigs/should_fail/T10615.stderr
index c17759a531..0b9bcb811c 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr
@@ -8,7 +8,8 @@ T10615.hs:4:7: error:
T10615.hs:5:6: error:
• Couldn't match type ‘f’ with ‘b1 -> a1’
‘f’ is a rigid type variable bound by
- the inferred type of f1 :: a1 -> f at T10615.hs:5:1-10
+ the inferred type of f1 :: a1 -> f
+ at T10615.hs:5:1-10
Expected type: a1 -> f
Actual type: a1 -> b1 -> a1
• In the expression: const
@@ -24,7 +25,8 @@ T10615.hs:7:7: error:
T10615.hs:8:6: error:
• Couldn't match type ‘_f’ with ‘b0 -> a0’
‘_f’ is a rigid type variable bound by
- the inferred type of f2 :: a0 -> _f at T10615.hs:8:1-10
+ the inferred type of f2 :: a0 -> _f
+ at T10615.hs:8:1-10
Expected type: a0 -> _f
Actual type: a0 -> b0 -> a0
• In the expression: const
diff --git a/testsuite/tests/partial-sigs/should_fail/T11976.stderr b/testsuite/tests/partial-sigs/should_fail/T11976.stderr
index f0e2784f6f..28104625e1 100644
--- a/testsuite/tests/partial-sigs/should_fail/T11976.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T11976.stderr
@@ -1,7 +1,17 @@
+T11976.hs:7:7: error:
+ • Cannot instantiate unification variable ‘a0’
+ with a type involving foralls: Lens w3 w4 w5
+ GHC doesn't yet support impredicative polymorphism
+ • In the expression: undefined :: Lens _ _ _
+ In an equation for ‘foo’: foo = undefined :: Lens _ _ _
+ • Relevant bindings include
+ foo :: Lens w w1 w2 (bound at T11976.hs:7:1)
+
T11976.hs:7:20: error:
- • Illegal polymorphic type: Lens w0 w1
- GHC doesn't yet support impredicative polymorphism
- • In an expression type signature: Lens _ _ _
+ • Expected kind ‘k0 -> *’, but ‘Lens _ _’ has kind ‘*’
+ • In the type ‘Lens _ _ _’
+ In an expression type signature: Lens _ _ _
In the expression: undefined :: Lens _ _ _
- In an equation for ‘foo’: foo = undefined :: Lens _ _ _
+ • Relevant bindings include
+ foo :: Lens w w1 w2 (bound at T11976.hs:7:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/T14040a.stderr b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr
index ac9ad8a1bd..cc0d0ca708 100644
--- a/testsuite/tests/partial-sigs/should_fail/T14040a.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr
@@ -1,9 +1,30 @@
T14040a.hs:21:18: error:
- • The kind of variable ‘wl1’, namely ‘WeirdList a1’,
- depends on variable ‘a1’ from an inner scope
- Perhaps bind ‘wl1’ sometime after binding ‘a1’
- • In the type signature:
+ • Couldn't match type ‘k0’ with ‘a’
+ because type variable ‘a’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ elimWeirdList :: forall a1 (wl :: WeirdList a1) (p :: forall x.
+ x -> WeirdList x -> *).
+ Sing wl
+ -> (forall y. p k0 w0 'WeirdNil)
+ -> (forall z1 (x :: z1) (xs :: WeirdList (WeirdList z1)).
+ Sing x -> Sing xs -> p k1 w1 xs -> p k2 w2 ('WeirdCons x xs))
+ -> p k3 w3 wl
+ at T14040a.hs:(21,18)-(28,23)
+ Expected type: Sing wl
+ -> (forall y. p k1 w0 'WeirdNil)
+ -> (forall z1 (x :: z1) (xs :: WeirdList (WeirdList z1)).
+ Sing x -> Sing xs -> p k0 w1 xs -> p k2 w2 ('WeirdCons x xs))
+ -> p k3 w3 wl
+ Actual type: Sing wl
+ -> (forall y. p k1 w0 'WeirdNil)
+ -> (forall z1 (x :: z1) (xs :: WeirdList (WeirdList z1)).
+ Sing x -> Sing xs -> p k0 w1 xs -> p k2 w2 ('WeirdCons x xs))
+ -> p k3 w3 wl
+ • In the ambiguity check for ‘elimWeirdList’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature:
elimWeirdList :: forall (a :: Type)
(wl :: WeirdList a)
(p :: forall (x :: Type). x -> WeirdList x -> Type).
@@ -15,13 +36,11 @@ T14040a.hs:21:18: error:
T14040a.hs:34:8: error:
• Cannot apply expression of type ‘Sing wl
- -> (forall y. p x0 w0 'WeirdNil)
+ -> (forall y. p k0 w0 'WeirdNil)
-> (forall z1 (x :: z1) (xs :: WeirdList (WeirdList z1)).
Sing x
- -> Sing xs
- -> p (WeirdList z1) w1 xs
- -> p z1 w2 ('WeirdCons x xs))
- -> p a1 w3 wl’
+ -> Sing xs -> p k1 w1 xs -> p k2 w2 ('WeirdCons x xs))
+ -> p k3 w3 wl’
to a visible type argument ‘(WeirdList z)’
• In the sixth argument of ‘pWeirdCons’, namely
‘(elimWeirdList @(WeirdList z) @xs @p xs pWeirdNil pWeirdCons)’
diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T
index db378fe178..941adf1ee8 100644
--- a/testsuite/tests/perf/haddock/all.T
+++ b/testsuite/tests/perf/haddock/all.T
@@ -10,7 +10,7 @@ test('haddock.base',
# 2017-02-19 24286343184 (x64/Windows) - Generalize kind of (->)
# 2017-12-24 18733710728 (x64/Windows) - Unknown
- ,(wordsize(64), 19694554424, 5)
+ ,(wordsize(64), 20980255200, 5)
# 2012-08-14: 5920822352 (amd64/Linux)
# 2012-09-20: 5829972376 (amd64/Linux)
# 2012-10-08: 5902601224 (amd64/Linux)
@@ -44,6 +44,9 @@ test('haddock.base',
# 2017-06-06: 25173968808 (x86_64/Linux) - Don't pass on -dcore-lint in Haddock.mk
# 2017-07-12: 23677299848 (x86_64/Linux) - Use getNameToInstancesIndex
# 2017-08-22: 19694554424 (x86_64/Linux) - Various Haddock optimizations
+ # 2018-03-31: 20980255200 (x86_64/Linux) - Track type variable scope more carefully
+ # previous to this last commit, the allocations were right below the top
+ # of the range. This commit adds only ~1.5% allocations.
,(platform('i386-unknown-mingw32'), 2885173512, 5)
# 2013-02-10: 3358693084 (x86/Windows)
diff --git a/testsuite/tests/polykinds/SigTvKinds3.hs b/testsuite/tests/polykinds/SigTvKinds3.hs
new file mode 100644
index 0000000000..b27be2e9c6
--- /dev/null
+++ b/testsuite/tests/polykinds/SigTvKinds3.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE GADTs, ExplicitForAll, TypeInType #-}
+
+module SigTvKinds3 where
+
+import Data.Kind
+
+data SameKind :: k -> k -> Type
+data Bad a where
+ MkBad :: forall k1 k2 (a :: k1) (b :: k2). Bad (SameKind a b)
diff --git a/testsuite/tests/polykinds/SigTvKinds3.stderr b/testsuite/tests/polykinds/SigTvKinds3.stderr
new file mode 100644
index 0000000000..b498c03187
--- /dev/null
+++ b/testsuite/tests/polykinds/SigTvKinds3.stderr
@@ -0,0 +1,6 @@
+
+SigTvKinds3.hs:9:62: error:
+ • Expected kind ‘k1’, but ‘b’ has kind ‘k2’
+ • In the second argument of ‘SameKind’, namely ‘b’
+ In the first argument of ‘Bad’, namely ‘(SameKind a b)’
+ In the type ‘Bad (SameKind a b)’
diff --git a/testsuite/tests/polykinds/T11142.stderr b/testsuite/tests/polykinds/T11142.stderr
index 2cb4e61f19..ea687c3247 100644
--- a/testsuite/tests/polykinds/T11142.stderr
+++ b/testsuite/tests/polykinds/T11142.stderr
@@ -1,7 +1,6 @@
-T11142.hs:9:8: error:
- • The kind of variable ‘b’, namely ‘k’,
- depends on variable ‘k’ from an inner scope
- Perhaps bind ‘b’ sometime after binding ‘k’
- • In the type signature:
+T11142.hs:9:49: error:
+ • Expected kind ‘k’, but ‘b’ has kind ‘k0’
+ • In the second argument of ‘SameKind’, namely ‘b’
+ In the type signature:
foo :: forall b. (forall k (a :: k). SameKind a b) -> ()
diff --git a/testsuite/tests/polykinds/T12593.stderr b/testsuite/tests/polykinds/T12593.stderr
index 4dda0cddd5..e30599dd27 100644
--- a/testsuite/tests/polykinds/T12593.stderr
+++ b/testsuite/tests/polykinds/T12593.stderr
@@ -10,8 +10,7 @@ T12593.hs:12:31: error:
• Expecting one more argument to ‘k’
Expected a type, but
‘k’ has kind
- ‘(((k0 -> k1 -> *) -> Constraint) -> (k2 -> k3 -> *) -> *)
- -> Constraint’
+ ‘(((k0 -> k1 -> TYPE t1) -> Constraint) -> k2 -> *) -> Constraint’
• In the kind ‘k’
In the type signature:
run :: k2 q =>
@@ -22,65 +21,21 @@ T12593.hs:12:40: error:
• Expecting two more arguments to ‘k1’
Expected a type, but
‘k1’ has kind
- ‘((k0 -> k1 -> *) -> Constraint) -> (k2 -> k3 -> *) -> *’
+ ‘((k0 -> k1 -> TYPE t1) -> Constraint) -> k2 -> *’
• In the kind ‘k1’
In the type signature:
run :: k2 q =>
Free k k1 k2 p a b
-> (forall (c :: k) (d :: k1). p c d -> q c d) -> q a b
-T12593.hs:12:47: error:
- • Couldn't match kind ‘(((k0 -> k1 -> *) -> Constraint)
- -> (k2 -> k3 -> *) -> *)
- -> Constraint’
+T12593.hs:12:54: error:
+ • Couldn't match kind ‘((k0 -> k1 -> *) -> Constraint) -> k2 -> *’
with ‘*’
When matching kinds
- k :: (((k0 -> k1 -> *) -> Constraint) -> (k2 -> k3 -> *) -> *)
- -> Constraint
- k2 :: *
- • In the first argument of ‘p’, namely ‘c’
- In the type signature:
- run :: k2 q =>
- Free k k1 k2 p a b
- -> (forall (c :: k) (d :: k1). p c d -> q c d) -> q a b
-
-T12593.hs:12:49: error:
- • Couldn't match kind ‘((k0 -> k1 -> *) -> Constraint)
- -> (k2 -> k3 -> *) -> *’
- with ‘*’
- When matching kinds
- k4 :: ((k0 -> k1 -> *) -> Constraint) -> (k2 -> k3 -> *) -> *
- k3 :: *
- • In the second argument of ‘p’, namely ‘d’
- In the type signature:
- run :: k2 q =>
- Free k k1 k2 p a b
- -> (forall (c :: k) (d :: k1). p c d -> q c d) -> q a b
-
-T12593.hs:12:56: error:
- • Couldn't match kind ‘(((k0 -> k1 -> *) -> Constraint)
- -> (k2 -> k3 -> *) -> *)
- -> Constraint’
- with ‘*’
- When matching kinds
- k :: (((k0 -> k1 -> *) -> Constraint) -> (k2 -> k3 -> *) -> *)
- -> Constraint
- k0 :: *
- • In the first argument of ‘q’, namely ‘c’
- In the type signature:
- run :: k2 q =>
- Free k k1 k2 p a b
- -> (forall (c :: k) (d :: k1). p c d -> q c d) -> q a b
-
-T12593.hs:12:58: error:
- • Couldn't match kind ‘((k0 -> k1 -> *) -> Constraint)
- -> (k2 -> k3 -> *) -> *’
- with ‘*’
- When matching kinds
- k4 :: ((k0 -> k1 -> *) -> Constraint) -> (k2 -> k3 -> *) -> *
+ k3 :: ((k0 -> k1 -> *) -> Constraint) -> k2 -> *
k1 :: *
- • In the second argument of ‘q’, namely ‘d’
- In the type signature:
+ Expected kind ‘k -> k3 -> *’, but ‘q’ has kind ‘k0 -> k1 -> *’
+ • In the type signature:
run :: k2 q =>
Free k k1 k2 p a b
-> (forall (c :: k) (d :: k1). p c d -> q c d) -> q a b
diff --git a/testsuite/tests/polykinds/T13985.stderr b/testsuite/tests/polykinds/T13985.stderr
index 954dae5dcd..ec829dec4d 100644
--- a/testsuite/tests/polykinds/T13985.stderr
+++ b/testsuite/tests/polykinds/T13985.stderr
@@ -14,7 +14,7 @@ T13985.hs:15:15: error:
• In the type instance declaration for ‘T’
T13985.hs:22:3: error:
- • Kind variable ‘k’ is implicitly bound in data family
+ • Kind variable ‘k’ is implicitly bound in associated data family
‘CD’, but does not appear as the kind of any
of its type variables. Perhaps you meant
to bind it (with TypeInType) explicitly somewhere?
@@ -22,7 +22,7 @@ T13985.hs:22:3: error:
In the instance declaration for ‘C Type’
T13985.hs:23:8: error:
- • Kind variable ‘a’ is implicitly bound in type family
+ • Kind variable ‘a’ is implicitly bound in associated type family
‘CT’, but does not appear as the kind of any
of its type variables. Perhaps you meant
to bind it (with TypeInType) explicitly somewhere?
@@ -30,7 +30,7 @@ T13985.hs:23:8: error:
In the instance declaration for ‘C Type’
T13985.hs:27:3: error:
- • Kind variable ‘x’ is implicitly bound in type family
+ • Kind variable ‘x’ is implicitly bound in associated type family
‘ZT’, but does not appear as the kind of any
of its type variables. Perhaps you meant
to bind it (with TypeInType) explicitly somewhere?
diff --git a/testsuite/tests/polykinds/T14563.hs b/testsuite/tests/polykinds/T14563.hs
index 7959d927c3..bedc99f54b 100644
--- a/testsuite/tests/polykinds/T14563.hs
+++ b/testsuite/tests/polykinds/T14563.hs
@@ -1,6 +1,6 @@
{-# Language TypeInType #-}
{-# Language RankNTypes, KindSignatures, PolyKinds #-}
-
+{-# OPTIONS_GHC -fprint-explicit-runtime-reps #-}
import GHC.Types (TYPE)
import Data.Kind
diff --git a/testsuite/tests/polykinds/T14846.stderr b/testsuite/tests/polykinds/T14846.stderr
index e1942a048e..828ddf6374 100644
--- a/testsuite/tests/polykinds/T14846.stderr
+++ b/testsuite/tests/polykinds/T14846.stderr
@@ -30,6 +30,31 @@ T14846.hs:38:8: error:
ríki a a
In the instance declaration for ‘Category (Hom ríki)’
+T14846.hs:39:12: error:
+ • Could not deduce (StructI xx1 (Structured a cls))
+ arising from a use of ‘struct’
+ from the context: Category ríki
+ bound by the instance declaration at T14846.hs:37:10-65
+ or from: StructI xx a
+ bound by the type signature for:
+ i :: forall (xx :: k0) (a :: Struct cls0).
+ StructI xx a =>
+ Hom ríki a a
+ at T14846.hs:38:8-48
+ The type variable ‘xx1’ is ambiguous
+ Relevant bindings include
+ i :: Hom ríki a a (bound at T14846.hs:39:3)
+ These potential instance exist:
+ instance forall k (xx :: k) (cls :: k
+ -> Constraint) (structured :: Struct cls).
+ (Structured xx cls ~ structured, cls xx) =>
+ StructI xx structured
+ -- Defined at T14846.hs:28:10
+ • In the expression: struct :: AStruct (Structured a cls)
+ In the expression: case struct :: AStruct (Structured a cls) of
+ In an equation for ‘i’:
+ i = case struct :: AStruct (Structured a cls) of
+
T14846.hs:39:44: error:
• Expected kind ‘Struct cls0 -> Constraint’,
but ‘cls’ has kind ‘k4 -> Constraint’
diff --git a/testsuite/tests/polykinds/T7230.stderr b/testsuite/tests/polykinds/T7230.stderr
index 48781e8f7f..53b8bcd8c3 100644
--- a/testsuite/tests/polykinds/T7230.stderr
+++ b/testsuite/tests/polykinds/T7230.stderr
@@ -9,13 +9,13 @@ T7230.hs:48:32: error:
at T7230.hs:47:1-68
or from: xs ~ (x : xs1)
bound by a pattern with constructor:
- SCons :: forall a (x :: a) (xs :: [a]).
+ SCons :: forall k (x :: k) (xs :: [k]).
Sing x -> Sing xs -> Sing (x : xs),
in an equation for ‘crash’
at T7230.hs:48:8-27
or from: xs1 ~ (x1 : xs2)
bound by a pattern with constructor:
- SCons :: forall a (x :: a) (xs :: [a]).
+ SCons :: forall k (x :: k) (xs :: [k]).
Sing x -> Sing xs -> Sing (x : xs),
in an equation for ‘crash’
at T7230.hs:48:17-26
diff --git a/testsuite/tests/polykinds/T8566.stderr b/testsuite/tests/polykinds/T8566.stderr
index 3e14ab4594..52a4b21490 100644
--- a/testsuite/tests/polykinds/T8566.stderr
+++ b/testsuite/tests/polykinds/T8566.stderr
@@ -6,7 +6,7 @@ T8566.hs:32:9: error:
bound by the instance declaration at T8566.hs:30:10-67
or from: 'AA t (a : as) ~ 'AA t1 as1
bound by a pattern with constructor:
- A :: forall v (t :: v) (as :: [U *]) (r :: [*]). I ('AA t as) r,
+ A :: forall k (t :: k) (as :: [U *]) (r :: [*]). I ('AA t as) r,
in an equation for ‘c’
at T8566.hs:32:5
The type variable ‘fs0’ is ambiguous
diff --git a/testsuite/tests/polykinds/T9222.stderr b/testsuite/tests/polykinds/T9222.stderr
index 604cc1b7ec..a019b9e117 100644
--- a/testsuite/tests/polykinds/T9222.stderr
+++ b/testsuite/tests/polykinds/T9222.stderr
@@ -8,7 +8,7 @@ T9222.hs:13:3: error:
at T9222.hs:13:3-43
‘c’ is a rigid type variable bound by
the type of the constructor ‘Want’:
- forall i1 j1 (a :: (i1, j1)) (b :: i1) (c :: j1).
+ forall k2 k3 (a :: (k2, k3)) (b :: k2) (c :: k3).
((a ~ '(b, c)) => Proxy b) -> Want a
at T9222.hs:13:3-43
• In the ambiguity check for ‘Want’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index ac46b2bf30..1f547ece57 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -178,12 +178,12 @@ test('T14174', normal, compile_fail, [''])
test('T14174a', normal, compile, [''])
test('T14520', normal, compile_fail, [''])
test('T11203', normal, compile_fail, [''])
-test('T14555', normal, compile_fail, [''])
-test('T14563', normal, compile_fail, [''])
+test('T14555', normal, compile_fail, ['-fprint-explicit-runtime-reps'])
+test('T14563', normal, compile_fail, ['-fprint-explicit-runtime-reps'])
test('T14561', normal, compile_fail, [''])
test('T14580', normal, compile_fail, [''])
test('T14515', normal, compile, [''])
test('T14723', normal, compile, [''])
test('T14846', normal, compile_fail, [''])
test('T14873', normal, compile, [''])
-
+test('SigTvKinds3', normal, compile_fail, [''])
diff --git a/testsuite/tests/th/T10267.stderr b/testsuite/tests/th/T10267.stderr
index ad163eed66..6ebda88797 100644
--- a/testsuite/tests/th/T10267.stderr
+++ b/testsuite/tests/th/T10267.stderr
@@ -11,9 +11,7 @@ T10267.hs:8:1: error:
x :: a (bound at T10267.hs:8:1)
j :: a -> a (bound at T10267.hs:8:1)
Valid substitutions include
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T10267.hs:3:8-13
(and originally defined in ‘GHC.Err’))
@@ -36,9 +34,7 @@ T10267.hs:8:1: error:
id :: forall a. a -> a
(imported from ‘Prelude’ at T10267.hs:3:8-13
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T10267.hs:3:8-13
(and originally defined in ‘GHC.Err’))
@@ -61,9 +57,7 @@ T10267.hs:14:3: error:
id :: forall a. a -> a
(imported from ‘Prelude’ at T10267.hs:3:8-13
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T10267.hs:3:8-13
(and originally defined in ‘GHC.Err’))
@@ -79,8 +73,6 @@ T10267.hs:23:3: error:
x :: a (bound at T10267.hs:23:3)
l :: a -> a (bound at T10267.hs:23:3)
Valid substitutions include
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T10267.hs:3:8-13
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/T13050.stderr b/testsuite/tests/typecheck/should_compile/T13050.stderr
index c9f7e22391..bb0b9effef 100644
--- a/testsuite/tests/typecheck/should_compile/T13050.stderr
+++ b/testsuite/tests/typecheck/should_compile/T13050.stderr
@@ -57,12 +57,16 @@ T13050.hs:4:9: warning: [-Wtyped-holes (in -Wdefault)]
const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Prim’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Err’))
@@ -124,12 +128,16 @@ T13050.hs:5:11: warning: [-Wtyped-holes (in -Wdefault)]
const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Prim’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Err’))
@@ -192,11 +200,15 @@ T13050.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Prim’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/T13343.hs b/testsuite/tests/typecheck/should_compile/T13343.hs
index ab259e3c45..a00655d5ef 100644
--- a/testsuite/tests/typecheck/should_compile/T13343.hs
+++ b/testsuite/tests/typecheck/should_compile/T13343.hs
@@ -5,3 +5,5 @@ module Bug where
import GHC.Exts
type Bad = forall (v1 :: RuntimeRep) (a1 :: TYPE v). a1
+
+-- should be accepted because GHC will generalize over v. Note v /= v1.
diff --git a/testsuite/tests/typecheck/should_compile/T14590.stderr b/testsuite/tests/typecheck/should_compile/T14590.stderr
index 6c5b672140..0c6e23affe 100644
--- a/testsuite/tests/typecheck/should_compile/T14590.stderr
+++ b/testsuite/tests/typecheck/should_compile/T14590.stderr
@@ -58,12 +58,16 @@ T14590.hs:4:13: warning: [-Wtyped-holes (in -Wdefault)]
const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Err’))
@@ -127,12 +131,16 @@ T14590.hs:5:13: warning: [-Wtyped-holes (in -Wdefault)]
const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Err’))
@@ -195,12 +203,16 @@ T14590.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Err’))
@@ -264,11 +276,15 @@ T14590.hs:7:11: warning: [-Wtyped-holes (in -Wdefault)]
const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/T2494.stderr b/testsuite/tests/typecheck/should_compile/T2494.stderr
index 5cf4fde746..4a9d3c0978 100644
--- a/testsuite/tests/typecheck/should_compile/T2494.stderr
+++ b/testsuite/tests/typecheck/should_compile/T2494.stderr
@@ -20,11 +20,11 @@ T2494.hs:15:14: error:
x :: Maybe a (bound at T2494.hs:14:65)
T2494.hs:15:30: error:
- • Couldn't match type ‘b’ with ‘a’
- ‘b’ is a rigid type variable bound by
+ • Couldn't match type ‘a’ with ‘b’
+ ‘a’ is a rigid type variable bound by
the RULE "foo/foo"
at T2494.hs:(12,1)-(15,33)
- ‘a’ is a rigid type variable bound by
+ ‘b’ is a rigid type variable bound by
the RULE "foo/foo"
at T2494.hs:(12,1)-(15,33)
Expected type: Maybe (m b) -> Maybe (m a)
diff --git a/testsuite/tests/typecheck/should_compile/T9497a.stderr b/testsuite/tests/typecheck/should_compile/T9497a.stderr
index 70a9310738..b095e5a3f1 100644
--- a/testsuite/tests/typecheck/should_compile/T9497a.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9497a.stderr
@@ -13,8 +13,6 @@ T9497a.hs:2:8: warning: [-Wtyped-holes (in -Wdefault)]
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497a.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T9497a.hs:1:1
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.stderr b/testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.stderr
index 1b8bfdec8a..21398bb3fb 100644
--- a/testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.stderr
+++ b/testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.stderr
@@ -37,12 +37,20 @@ abstract_refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)
last :: forall a. [a] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.List’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
Valid refinement substitutions include
+ (<$) _ _ :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. a -> f b -> f a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ (<*) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
foldr _ _ :: forall (t :: * -> *).
Foldable t =>
forall a b. (a -> b -> b) -> b -> t a -> b
@@ -66,10 +74,10 @@ abstract_refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)
last _ _ :: forall a. [a] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.List’))
- head _ _ :: forall a. [a] -> a
+ head _ :: forall a. [a] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.List’))
- head _ :: forall a. [a] -> a
+ head _ _ :: forall a. [a] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.List’))
last _ :: forall a. [a] -> a
@@ -78,25 +86,13 @@ abstract_refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)
(!!) _ _ :: forall a. [a] -> Int -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.List’))
- undefined _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ :: forall (a :: TYPE r). [Char] -> a
+ undefined _ :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
- error _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- [Char] -> a
+ errorWithoutStackTrace _ :: forall a. [Char] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
- error _ _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ _ :: forall (a :: TYPE r). [Char] -> a
+ error _ _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
id _ :: forall a. a -> a
@@ -114,10 +110,15 @@ abstract_refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)
const _ _ :: forall a b. a -> b -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
+ (=<<) _ _ :: forall (m :: * -> *) a b.
+ Monad m =>
+ (a -> m b) -> m a -> m b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
(.) _ _ :: forall b c a. (b -> c) -> (a -> b) -> a -> c
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
- ($!) _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ ($!) _ :: forall a b. (a -> b) -> a -> b
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
uncurry _ _ :: forall a b c. (a -> b -> c) -> (a, b) -> c
@@ -126,13 +127,71 @@ abstract_refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)
curry _ _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
- ($) _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ pure _ :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ (<*>) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ return _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ return _ _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
- ($) _ _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ pure _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
- ($!) _ _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ fmap _ _ :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ (<$>) _ _ :: forall (f :: * -> *) a b.
+ Functor f =>
+ (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘Data.Functor’))
+ (>>) _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> m b -> m b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ (*>) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ (>>=) _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> (a -> m b) -> m b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ fail _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a. String -> m a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ fail _ :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ error _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Err’))
+ errorWithoutStackTrace _ _ :: forall a. [Char] -> a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Err’))
+ ($) _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ ($) _ _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ ($!) _ _ :: forall a b. (a -> b) -> a -> b
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
id _ _ :: forall a. a -> a
@@ -144,18 +203,16 @@ abstract_refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)
snd _ _ :: forall a b. (a, b) -> b
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
- fst _ :: forall a b. (a, b) -> a
+ fst _ _ :: forall a b. (a, b) -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
- fst _ _ :: forall a b. (a, b) -> a
+ fst _ :: forall a b. (a, b) -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
seq _ _ :: forall a b. a -> b -> b
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Prim’))
- undefined _ _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined _ _ :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
@@ -171,12 +228,26 @@ abstract_refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)
const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
Valid refinement substitutions include
+ (<$) _ _ :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. a -> f b -> f a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ (<*) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
foldr _ :: forall (t :: * -> *).
Foldable t =>
forall a b. (a -> b -> b) -> b -> t a -> b
@@ -187,7 +258,7 @@ abstract_refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)
forall b a. (b -> a -> b) -> b -> t a -> b
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Foldable’))
- last _ _ :: forall a. [a] -> a
+ last _ :: forall a. [a] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.List’))
head _ _ :: forall a. [a] -> a
@@ -196,34 +267,22 @@ abstract_refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)
head _ :: forall a. [a] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.List’))
- last _ :: forall a. [a] -> a
+ last _ _ :: forall a. [a] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.List’))
(!!) _ _ :: forall a. [a] -> Int -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.List’))
- undefined _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined _ _ :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ :: forall (a :: TYPE r). [Char] -> a
+ errorWithoutStackTrace _ :: forall a. [Char] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
- error _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- [Char] -> a
+ error _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
- error _ _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ _ :: forall (a :: TYPE r). [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- id _ :: forall a. a -> a
+ id _ _ :: forall a. a -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
flip _ :: forall a b c. (a -> b -> c) -> b -> a -> c
@@ -241,31 +300,94 @@ abstract_refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)
const _ _ :: forall a b. a -> b -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
+ (=<<) _ _ :: forall (m :: * -> *) a b.
+ Monad m =>
+ (a -> m b) -> m a -> m b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
(.) _ _ :: forall b c a. (b -> c) -> (a -> b) -> a -> c
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
- ($!) _ _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ ($!) _ _ :: forall a b. (a -> b) -> a -> b
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
uncurry _ _ :: forall a b c. (a -> b -> c) -> (a, b) -> c
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
- curry _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ curry _ _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
- curry _ _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ curry _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
- ($) _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ pure _ :: forall (f :: * -> *). Applicative f => forall a. a -> f a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
- ($) _ _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ (<*>) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f (a -> b) -> f a -> f b
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
- ($!) _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ return _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
- id _ _ :: forall a. a -> a
+ return _ _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ pure _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ fmap _ _ :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ (<$>) _ _ :: forall (f :: * -> *) a b.
+ Functor f =>
+ (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘Data.Functor’))
+ (>>) _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> m b -> m b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ (*>) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ (>>=) _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> (a -> m b) -> m b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ fail _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a. String -> m a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ fail _ :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ error _ _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Err’))
+ errorWithoutStackTrace _ _ :: forall a. [Char] -> a
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Err’))
+ ($) _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ ($) _ _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ ($!) _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
+ (and originally defined in ‘GHC.Base’))
+ id _ :: forall a. a -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Base’))
snd _ :: forall a b. (a, b) -> b
@@ -274,17 +396,15 @@ abstract_refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)
snd _ _ :: forall a b. (a, b) -> b
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
- fst _ :: forall a b. (a, b) -> a
+ fst _ _ :: forall a b. (a, b) -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
- fst _ _ :: forall a b. (a, b) -> a
+ fst _ :: forall a b. (a, b) -> a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘Data.Tuple’))
seq _ _ :: forall a b. a -> b -> b
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Prim’))
- undefined _ _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined _ :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index f4b7fe6aeb..55ca69357d 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -602,4 +602,3 @@ test('T14934', [extra_files(['T14934.hs', 'T14934a.hs'])], run_command,
test('T13643', normal, compile, [''])
test('SplitWD', expect_broken(14119), compile, [''])
test('T14441', normal, compile, [''])
-test('T14749', normal, compile, [''])
diff --git a/testsuite/tests/typecheck/should_compile/hole_constraints.stderr b/testsuite/tests/typecheck/should_compile/hole_constraints.stderr
index 5b31e8f5c1..53f32cf8c9 100644
--- a/testsuite/tests/typecheck/should_compile/hole_constraints.stderr
+++ b/testsuite/tests/typecheck/should_compile/hole_constraints.stderr
@@ -12,9 +12,7 @@ hole_constraints.hs:8:6: warning: [-Wtyped-holes (in -Wdefault)]
Constraints include Eq a (from hole_constraints.hs:7:1-15)
Valid substitutions include
f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at hole_constraints.hs:3:8-22
(and originally defined in ‘GHC.Err’))
@@ -35,9 +33,7 @@ hole_constraints.hs:12:6: warning: [-Wtyped-holes (in -Wdefault)]
f2 :: forall a. (Show a, Eq a) => a
(defined at hole_constraints.hs:12:1)
f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at hole_constraints.hs:3:8-22
(and originally defined in ‘GHC.Err’))
@@ -58,9 +54,7 @@ hole_constraints.hs:16:35: warning: [-Wtyped-holes (in -Wdefault)]
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at hole_constraints.hs:3:8-22
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at hole_constraints.hs:3:8-22
(and originally defined in ‘GHC.Err’))
@@ -77,9 +71,7 @@ hole_constraints.hs:20:19: warning: [-Wtyped-holes (in -Wdefault)]
castWith :: (a :~: b) -> a -> b (bound at hole_constraints.hs:20:1)
Constraints include b ~ a (from hole_constraints.hs:20:10-13)
Valid substitutions include
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at hole_constraints.hs:3:8-22
(and originally defined in ‘GHC.Err’))
@@ -101,8 +93,6 @@ hole_constraints.hs:27:32: warning: [-Wtyped-holes (in -Wdefault)]
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at hole_constraints.hs:3:8-22
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at hole_constraints.hs:3:8-22
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr b/testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr
index a3fbbc6066..0a721c301f 100644
--- a/testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr
+++ b/testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr
@@ -20,8 +20,6 @@ hole_constraints_nested.hs:12:16: warning: [-Wtyped-holes (in -Wdefault)]
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at hole_constraints_nested.hs:3:8-28
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at hole_constraints_nested.hs:3:8-28
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/holes.stderr b/testsuite/tests/typecheck/should_compile/holes.stderr
index a4b32cdd0a..7e6d7743de 100644
--- a/testsuite/tests/typecheck/should_compile/holes.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes.stderr
@@ -9,9 +9,7 @@ holes.hs:3:5: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include f :: t (bound at holes.hs:3:1)
Valid substitutions include
f :: forall t. t (defined at holes.hs:3:1)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Err’))
@@ -30,9 +28,7 @@ holes.hs:6:7: warning: [-Wtyped-holes (in -Wdefault)]
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Err’))
@@ -48,9 +44,7 @@ holes.hs:8:5: warning: [-Wtyped-holes (in -Wdefault)]
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Err’))
@@ -398,12 +392,10 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
repeat :: forall a. a -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.List’))
- error :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- [Char] -> a
+ error :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace :: forall (a :: TYPE r). [Char] -> a
+ errorWithoutStackTrace :: forall a. [Char] -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Err’))
maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
@@ -457,10 +449,10 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
fromIntegral :: forall a b. (Integral a, Num b) => a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- ($) :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ ($) :: forall a b. (a -> b) -> a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Base’))
- ($!) :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ ($!) :: forall a b. (a -> b) -> a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Base’))
id :: forall a. a -> a
@@ -508,8 +500,6 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Prim’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/holes3.stderr b/testsuite/tests/typecheck/should_compile/holes3.stderr
index add03e2658..6bebd3788b 100644
--- a/testsuite/tests/typecheck/should_compile/holes3.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes3.stderr
@@ -9,9 +9,7 @@ holes3.hs:3:5: error:
• Relevant bindings include f :: t (bound at holes3.hs:3:1)
Valid substitutions include
f :: forall t. t (defined at holes3.hs:3:1)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Err’))
@@ -31,9 +29,7 @@ holes3.hs:6:7: error:
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Err’))
@@ -50,9 +46,7 @@ holes3.hs:8:5: error:
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Err’))
@@ -401,12 +395,10 @@ holes3.hs:11:15: error:
repeat :: forall a. a -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.List’))
- error :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- [Char] -> a
+ error :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace :: forall (a :: TYPE r). [Char] -> a
+ errorWithoutStackTrace :: forall a. [Char] -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Err’))
maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
@@ -460,10 +452,10 @@ holes3.hs:11:15: error:
fromIntegral :: forall a b. (Integral a, Num b) => a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- ($) :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ ($) :: forall a b. (a -> b) -> a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Base’))
- ($!) :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ ($!) :: forall a b. (a -> b) -> a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Base’))
id :: forall a. a -> a
@@ -511,8 +503,6 @@ holes3.hs:11:15: error:
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/refinement_substitutions.stderr b/testsuite/tests/typecheck/should_compile/refinement_substitutions.stderr
index 95f5686603..0b3795894e 100644
--- a/testsuite/tests/typecheck/should_compile/refinement_substitutions.stderr
+++ b/testsuite/tests/typecheck/should_compile/refinement_substitutions.stderr
@@ -37,12 +37,20 @@ refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)]
last :: forall a. [a] -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.List’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Err’))
Valid refinement substitutions include
+ (<$) _ _ :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. a -> f b -> f a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ (<*) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
foldr _ _ :: forall (t :: * -> *).
Foldable t =>
forall a b. (a -> b -> b) -> b -> t a -> b
@@ -72,30 +80,87 @@ refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)]
(!!) _ _ :: forall a. [a] -> Int -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.List’))
- error _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- [Char] -> a
+ flip _ _ :: forall a b c. (a -> b -> c) -> b -> a -> c
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ :: forall (a :: TYPE r). [Char] -> a
+ (and originally defined in ‘GHC.Base’))
+ const _ :: forall a b. a -> b -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
+ (and originally defined in ‘GHC.Base’))
asTypeOf _ _ :: forall a. a -> a -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
- const _ :: forall a b. a -> b -> a
+ const _ _ :: forall a b. a -> b -> a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ (=<<) _ _ :: forall (m :: * -> *) a b.
+ Monad m =>
+ (a -> m b) -> m a -> m b
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
(.) _ _ :: forall b c a. (b -> c) -> (a -> b) -> a -> c
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
+ ($!) _ _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
uncurry _ _ :: forall a b c. (a -> b -> c) -> (a, b) -> c
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘Data.Tuple’))
- ($) _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ curry _ _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘Data.Tuple’))
+ (<*>) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ return _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ pure _ :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ fmap _ _ :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ (<$>) _ _ :: forall (f :: * -> *) a b.
+ Functor f =>
+ (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘Data.Functor’))
+ (>>) _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> m b -> m b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ (*>) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f b
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
- ($!) _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ (>>=) _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> (a -> m b) -> m b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ fail _ :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ error _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Err’))
+ errorWithoutStackTrace _ :: forall a. [Char] -> a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Err’))
+ ($) _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ ($) _ _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ ($!) _ :: forall a b. (a -> b) -> a -> b
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
id _ :: forall a. a -> a
@@ -107,6 +172,9 @@ refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)]
fst _ :: forall a b. (a, b) -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘Data.Tuple’))
+ seq _ _ :: forall a b. a -> b -> b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Prim’))
refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Integer -> [Integer] -> Integer
@@ -120,12 +188,26 @@ refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Err’))
Valid refinement substitutions include
+ (<$) _ _ :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. a -> f b -> f a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ (<*) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
foldr _ :: forall (t :: * -> *).
Foldable t =>
forall a b. (a -> b -> b) -> b -> t a -> b
@@ -145,15 +227,13 @@ refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
(!!) _ _ :: forall a. [a] -> Int -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.List’))
- error _ :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- [Char] -> a
+ flip _ :: forall a b c. (a -> b -> c) -> b -> a -> c
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ :: forall (a :: TYPE r). [Char] -> a
+ (and originally defined in ‘GHC.Base’))
+ flip _ _ :: forall a b c. (a -> b -> c) -> b -> a -> c
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
- flip _ :: forall a b c. (a -> b -> c) -> b -> a -> c
+ (and originally defined in ‘GHC.Base’))
+ const _ _ :: forall a b. a -> b -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
asTypeOf _ _ :: forall a. a -> a -> a
@@ -162,19 +242,78 @@ refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
const _ :: forall a b. a -> b -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
+ (=<<) _ _ :: forall (m :: * -> *) a b.
+ Monad m =>
+ (a -> m b) -> m a -> m b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
(.) _ _ :: forall b c a. (b -> c) -> (a -> b) -> a -> c
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
+ ($!) _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
uncurry _ _ :: forall a b c. (a -> b -> c) -> (a, b) -> c
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘Data.Tuple’))
curry _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘Data.Tuple’))
- ($) _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ curry _ _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘Data.Tuple’))
+ (<*>) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ return _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ pure _ :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ fmap _ _ :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ (<$>) _ _ :: forall (f :: * -> *) a b.
+ Functor f =>
+ (a -> b) -> f a -> f b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘Data.Functor’))
+ (>>) _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> m b -> m b
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
- ($!) _ :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ (*>) _ _ :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ (>>=) _ _ :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> (a -> m b) -> m b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ fail _ :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ error _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Err’))
+ errorWithoutStackTrace _ :: forall a. [Char] -> a
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Err’))
+ ($) _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ ($) _ _ :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ ($!) _ _ :: forall a b. (a -> b) -> a -> b
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘GHC.Base’))
id _ :: forall a. a -> a
@@ -186,3 +325,6 @@ refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
fst _ :: forall a b. (a, b) -> a
(imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
(and originally defined in ‘Data.Tuple’))
+ seq _ _ :: forall a b. a -> b -> b
+ (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
+ (and originally defined in ‘GHC.Prim’))
diff --git a/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr b/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr
index baf4c1ff30..77e108dfbd 100644
--- a/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr
+++ b/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr
@@ -30,9 +30,7 @@ valid_substitutions.hs:17:17: warning: [-Wtyped-holes (in -Wdefault)]
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
@@ -54,9 +52,7 @@ valid_substitutions.hs:21:8: warning: [-Wtyped-holes (in -Wdefault)]
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
@@ -73,9 +69,7 @@ valid_substitutions.hs:24:9: warning: [-Wtyped-holes (in -Wdefault)]
ValidSubs.Moo :: Integer -> ValidSubs.Moo
(imported qualified from ‘ValidSubs’ at valid_substitutions.hs:6:1-26
(and originally defined at ValidSubs.hs:4:12-22))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
@@ -96,9 +90,7 @@ valid_substitutions.hs:27:5: warning: [-Wtyped-holes (in -Wdefault)]
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
@@ -226,9 +218,7 @@ valid_substitutions.hs:34:14: warning: [-Wtyped-holes (in -Wdefault)]
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Enum’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
@@ -251,12 +241,10 @@ valid_substitutions.hs:37:8: warning: [-Wtyped-holes (in -Wdefault)]
fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
- error :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- [Char] -> a
+ error :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace :: forall (a :: TYPE r). [Char] -> a
+ errorWithoutStackTrace :: forall a. [Char] -> a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
print :: forall a. Show a => a -> IO ()
@@ -265,8 +253,6 @@ valid_substitutions.hs:37:8: warning: [-Wtyped-holes (in -Wdefault)]
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr b/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr
index 2781799f82..878309a3cf 100644
--- a/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr
+++ b/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr
@@ -11,8 +11,6 @@ valid_substitutions_interactions.hs:15:5: warning: [-Wtyped-holes (in -Wdefault)
(defined at valid_substitutions_interactions.hs:15:1)
STrue :: SBool 'True
(defined at valid_substitutions_interactions.hs:12:3)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at valid_substitutions_interactions.hs:5:8-28
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_fail/T11355.stderr b/testsuite/tests/typecheck/should_fail/T11355.stderr
index 68375400a8..5310989327 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. 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/T12177.stderr b/testsuite/tests/typecheck/should_fail/T12177.stderr
index 45a55cf5b8..dee9117d05 100644
--- a/testsuite/tests/typecheck/should_fail/T12177.stderr
+++ b/testsuite/tests/typecheck/should_fail/T12177.stderr
@@ -2,7 +2,8 @@
T12177.hs:3:19: error:
• Found hole: _ :: t
Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: p -> p1 -> t at T12177.hs:3:1-19
+ the inferred type of bar :: p -> p1 -> t
+ at T12177.hs:3:1-19
• In the expression: _
In the expression: \ x -> _
In the expression: \ x -> \ x -> _
@@ -10,9 +11,7 @@ T12177.hs:3:19: error:
x :: p1 (bound at T12177.hs:3:14)
bar :: p -> p1 -> t (bound at T12177.hs:3:1)
Valid substitutions include
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T12177.hs:1:8-10
(and originally defined in ‘GHC.Err’))
@@ -30,8 +29,6 @@ T12177.hs:5:37: error:
y :: p1 (bound at T12177.hs:5:14)
baz :: p -> p1 -> p2 -> p3 -> p4 -> t (bound at T12177.hs:5:1)
Valid substitutions include
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T12177.hs:1:8-10
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_fail/T14350.stderr b/testsuite/tests/typecheck/should_fail/T14350.stderr
index 27b53aa73d..258518e9be 100644
--- a/testsuite/tests/typecheck/should_fail/T14350.stderr
+++ b/testsuite/tests/typecheck/should_fail/T14350.stderr
@@ -1,18 +1,19 @@
T14350.hs:59:15: error:
• Couldn't match expected type ‘Proxy a2
- -> Apply (Apply (c1 x5) 'Proxy) (Apply (g x5) 'Proxy)’
- with actual type ‘Sing (f0 @@ t0)’
+ -> Apply (Apply (c x3) 'Proxy) (Apply (g x3) 'Proxy)’
+ with actual type ‘Sing (f x y @@ t0)’
• The function ‘applySing’ is applied to three arguments,
- but its type ‘Sing f0 -> Sing t0 -> Sing (f0 @@ t0)’ has only two
+ but its type ‘Sing (f x y) -> Sing t0 -> Sing (f x y @@ t0)’
+ has only two
In the expression: applySing f Proxy Proxy
In an equation for ‘dcomp’: dcomp f g x = applySing f Proxy Proxy
• Relevant bindings include
- x :: Sing x5 (bound at T14350.hs:59:11)
- g :: Sing (g x4) (bound at T14350.hs:59:9)
- f :: Sing (f x3 y1) (bound at T14350.hs:59:7)
- dcomp :: Sing (f x3 y1)
- -> Sing (g x4) -> Sing x5 -> (c1 x5 @@ 'Proxy) @@ (g x5 @@ 'Proxy)
+ x :: Sing x3 (bound at T14350.hs:59:11)
+ g :: Sing (g x2) (bound at T14350.hs:59:9)
+ f :: Sing (f x1 y) (bound at T14350.hs:59:7)
+ dcomp :: Sing (f x1 y)
+ -> Sing (g x2) -> Sing x3 -> (c x3 @@ 'Proxy) @@ (g x3 @@ 'Proxy)
(bound at T14350.hs:59:1)
T14350.hs:59:27: error:
@@ -22,9 +23,9 @@ T14350.hs:59:27: error:
In the expression: applySing f Proxy Proxy
In an equation for ‘dcomp’: dcomp f g x = applySing f Proxy Proxy
• Relevant bindings include
- x :: Sing x5 (bound at T14350.hs:59:11)
- g :: Sing (g x4) (bound at T14350.hs:59:9)
- f :: Sing (f x3 y1) (bound at T14350.hs:59:7)
- dcomp :: Sing (f x3 y1)
- -> Sing (g x4) -> Sing x5 -> (c1 x5 @@ 'Proxy) @@ (g x5 @@ 'Proxy)
+ x :: Sing x3 (bound at T14350.hs:59:11)
+ g :: Sing (g x2) (bound at T14350.hs:59:9)
+ f :: Sing (f x1 y) (bound at T14350.hs:59:7)
+ dcomp :: Sing (f x1 y)
+ -> Sing (g x2) -> Sing x3 -> (c x3 @@ 'Proxy) @@ (g x3 @@ 'Proxy)
(bound at T14350.hs:59:1)
diff --git a/testsuite/tests/typecheck/should_fail/T14607.hs b/testsuite/tests/typecheck/should_fail/T14607.hs
index 891d3ccc18..c05df0be25 100644
--- a/testsuite/tests/typecheck/should_fail/T14607.hs
+++ b/testsuite/tests/typecheck/should_fail/T14607.hs
@@ -21,3 +21,7 @@ class Mk a where
instance Mk a where
mk :: LamCons a '()
mk = mk
+
+-- At some point, this program was accepted. That's fine. But right now,
+-- it's rejected with a kind error, and we can't generally defer kind
+-- errors, so I'm saying that behavior is OK.
diff --git a/testsuite/tests/typecheck/should_fail/T14607.stderr b/testsuite/tests/typecheck/should_fail/T14607.stderr
index 740f89a0d4..0a63e53030 100644
--- a/testsuite/tests/typecheck/should_fail/T14607.stderr
+++ b/testsuite/tests/typecheck/should_fail/T14607.stderr
@@ -1,21 +1,12 @@
-T14607.hs:22:9: warning: [-Wdeferred-type-errors (in -Wdefault)]
+T14607.hs:22:9: error:
• Expecting one more argument to ‘LamCons a '()’
Expected a type, but ‘LamCons a '()’ has kind ‘() -> *’
• In the type signature: mk :: LamCons a '()
In the instance declaration for ‘Mk a’
-T14607.hs:22:19: warning: [-Wdeferred-type-errors (in -Wdefault)]
+T14607.hs:22:19: error:
• Expected a type, but ‘ '()’ has kind ‘()’
• In the second argument of ‘LamCons’, namely ‘ '()’
In the type signature: mk :: LamCons a '()
In the instance declaration for ‘Mk a’
-
-T14607.hs:23:8: warning: [-Wdeferred-type-errors (in -Wdefault)]
- • Couldn't match expected type ‘LamCons a '()’
- with actual type ‘LamCons a0 a0 '()’
- • In the expression: mk
- In an equation for ‘mk’: mk = mk
- In the instance declaration for ‘Mk a’
- • Relevant bindings include
- mk :: LamCons a '() (bound at T14607.hs:23:3)
diff --git a/testsuite/tests/typecheck/should_fail/T9497d.stderr b/testsuite/tests/typecheck/should_fail/T9497d.stderr
index 9e2d04fdb4..1ae8ec0e05 100644
--- a/testsuite/tests/typecheck/should_fail/T9497d.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9497d.stderr
@@ -13,8 +13,6 @@ T9497d.hs:2:8: error:
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497d.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T9497d.hs:1:1
(and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index f01cbe1da7..3f791a763f 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -466,7 +466,7 @@ test('T14350', normal, compile_fail, [''])
test('T14390', normal, compile_fail, [''])
test('MissingExportList03', normal, compile_fail, [''])
test('T14618', normal, compile_fail, [''])
-test('T14607', normal, compile, [''])
+test('T14607', normal, compile_fail, [''])
test('T14605', normal, compile_fail, [''])
test('T14761a', normal, compile_fail, [''])
test('T14761b', normal, compile_fail, [''])
diff --git a/testsuite/tests/typecheck/should_run/T9497a-run.stderr b/testsuite/tests/typecheck/should_run/T9497a-run.stderr
index bc6efa557f..2f5097e978 100644
--- a/testsuite/tests/typecheck/should_run/T9497a-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497a-run.stderr
@@ -13,9 +13,7 @@ T9497a-run: T9497a-run.hs:2:8: error:
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497a-run.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T9497a-run.hs:1:1
(and originally defined in ‘GHC.Err’))
(deferred type error)
diff --git a/testsuite/tests/typecheck/should_run/T9497b-run.stderr b/testsuite/tests/typecheck/should_run/T9497b-run.stderr
index 658146101e..e5a1bafce3 100644
--- a/testsuite/tests/typecheck/should_run/T9497b-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497b-run.stderr
@@ -13,9 +13,7 @@ T9497b-run: T9497b-run.hs:2:8: error:
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497b-run.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T9497b-run.hs:1:1
(and originally defined in ‘GHC.Err’))
(deferred type error)
diff --git a/testsuite/tests/typecheck/should_run/T9497c-run.stderr b/testsuite/tests/typecheck/should_run/T9497c-run.stderr
index fcfde6ec91..4605857af5 100644
--- a/testsuite/tests/typecheck/should_run/T9497c-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497c-run.stderr
@@ -13,9 +13,7 @@ T9497c-run: T9497c-run.hs:2:8: error:
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497c-run.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ undefined :: forall a. GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at T9497c-run.hs:1:1
(and originally defined in ‘GHC.Err’))
(deferred type error)