summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-10-30 11:41:17 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2014-10-31 13:49:02 +0000
commitb75d3e5d33d7a8eef4e3f82e0d28be5b6d4f9062 (patch)
tree0b3e618cb50700be59577178590be085994b7ce6
parent9b82cfb8aac55e29ee7aa3789e967f647521bc16 (diff)
downloadhaskell-b75d3e5d33d7a8eef4e3f82e0d28be5b6d4f9062.tar.gz
Testsuite error message changes
-rw-r--r--testsuite/tests/deSugar/should_compile/T2431.stderr9
-rw-r--r--testsuite/tests/deriving/should_fail/T9071.stderr2
-rw-r--r--testsuite/tests/deriving/should_fail/T9071_2.stderr2
-rw-r--r--testsuite/tests/gadt/T3169.stderr4
-rw-r--r--testsuite/tests/gadt/T7293.stderr2
-rw-r--r--testsuite/tests/gadt/T7294.stderr2
-rw-r--r--testsuite/tests/gadt/gadt21.stderr33
-rw-r--r--testsuite/tests/ghc-api/apirecomp001/apirecomp001.stderr12
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break026.stdout116
-rw-r--r--testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs10
-rw-r--r--testsuite/tests/indexed-types/should_compile/PushInAsGivens.stderr1
-rw-r--r--testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs9
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple13.hs30
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple8.hs2
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3017.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3208b.stderr13
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3826.hs56
-rw-r--r--testsuite/tests/indexed-types/should_compile/T4494.hs20
-rw-r--r--testsuite/tests/indexed-types/should_compile/T7804.hs12
-rw-r--r--testsuite/tests/indexed-types/should_compile/all.T2
-rw-r--r--testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs43
-rw-r--r--testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.stderr22
-rw-r--r--testsuite/tests/indexed-types/should_fail/GADTwrong1.hs30
-rw-r--r--testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr21
-rw-r--r--testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr5
-rw-r--r--testsuite/tests/indexed-types/should_fail/Overlap9.stderr5
-rw-r--r--testsuite/tests/indexed-types/should_fail/T1897b.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/T1900.stderr5
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2544.hs15
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2544.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2627b.hs10
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2664.hs17
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2664.stderr22
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2693.stderr12
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4093a.hs31
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4093a.stderr17
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4174.stderr27
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4179.stderr11
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4272.stderr6
-rw-r--r--testsuite/tests/indexed-types/should_fail/T5439.stderr51
-rw-r--r--testsuite/tests/indexed-types/should_fail/T5934.stderr15
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7010.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7729.stderr28
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7729a.hs41
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7729a.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7786.hs2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T8129.stdout4
-rw-r--r--testsuite/tests/indexed-types/should_fail/T8227.hs23
-rw-r--r--testsuite/tests/indexed-types/should_fail/T8227.stderr20
-rw-r--r--testsuite/tests/indexed-types/should_fail/T8518.stderr48
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9036.stderr4
-rw-r--r--testsuite/tests/numeric/should_compile/T7116.stdout28
-rw-r--r--testsuite/tests/parser/should_compile/T2245.stderr10
-rw-r--r--testsuite/tests/perf/compiler/T5837.hs14
-rw-r--r--testsuite/tests/perf/compiler/T5837.stderr310
-rw-r--r--testsuite/tests/polykinds/T7438.stderr38
-rw-r--r--testsuite/tests/polykinds/T8132.stderr9
-rw-r--r--testsuite/tests/rebindable/rebindable6.stderr12
-rw-r--r--testsuite/tests/roles/should_compile/Roles13.stderr14
-rw-r--r--testsuite/tests/roles/should_compile/T8958.stderr77
-rw-r--r--testsuite/tests/simplCore/should_compile/EvalTest.stdout2
-rw-r--r--testsuite/tests/simplCore/should_compile/T3717.stderr8
-rw-r--r--testsuite/tests/simplCore/should_compile/T3772.stdout13
-rw-r--r--testsuite/tests/simplCore/should_compile/T4201.stdout2
-rw-r--r--testsuite/tests/simplCore/should_compile/T4306.stdout2
-rw-r--r--testsuite/tests/simplCore/should_compile/T4908.stderr41
-rw-r--r--testsuite/tests/simplCore/should_compile/T4918.stdout4
-rw-r--r--testsuite/tests/simplCore/should_compile/T4930.stderr28
-rw-r--r--testsuite/tests/simplCore/should_compile/T5366.stdout2
-rw-r--r--testsuite/tests/simplCore/should_compile/T6056.stderr3
-rw-r--r--testsuite/tests/simplCore/should_compile/T7360.stderr20
-rw-r--r--testsuite/tests/simplCore/should_compile/T7865.stdout8
-rw-r--r--testsuite/tests/simplCore/should_compile/T8832.stdout20
-rw-r--r--testsuite/tests/simplCore/should_compile/T8832.stdout-ws-3216
-rw-r--r--testsuite/tests/simplCore/should_compile/T9400.stderr30
-rw-r--r--testsuite/tests/simplCore/should_compile/rule2.stderr2
-rw-r--r--testsuite/tests/simplCore/should_compile/spec-inline.stderr87
-rw-r--r--testsuite/tests/th/T3319.stderr16
-rw-r--r--testsuite/tests/th/T3600.stderr10
-rw-r--r--testsuite/tests/th/T5217.stderr18
-rw-r--r--testsuite/tests/th/all.T6
-rw-r--r--testsuite/tests/typecheck/should_compile/FD1.stderr6
-rw-r--r--testsuite/tests/typecheck/should_compile/FD2.stderr13
-rw-r--r--testsuite/tests/typecheck/should_compile/T3346.hs4
-rw-r--r--testsuite/tests/typecheck/should_compile/T8474.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs11
-rw-r--r--testsuite/tests/typecheck/should_compile/tc231.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc231.stderr38
-rw-r--r--testsuite/tests/typecheck/should_fail/ContextStack2.hs44
-rw-r--r--testsuite/tests/typecheck/should_fail/ContextStack2.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T1899.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T2688.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T5236.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/T5300.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T5684.stderr88
-rw-r--r--testsuite/tests/typecheck/should_fail/T5853.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T7748a.stderr33
-rw-r--r--testsuite/tests/typecheck/should_fail/T8142.stderr38
-rw-r--r--testsuite/tests/typecheck/should_fail/T8450.hs3
-rw-r--r--testsuite/tests/typecheck/should_fail/T8450.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/T8883.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/T9305.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/mc21.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/mc22.stderr43
-rw-r--r--testsuite/tests/typecheck/should_fail/mc25.stderr36
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail019.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail067.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail068.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail068.stderr35
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail072.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail131.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail143.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail171.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail186.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail201.stderr39
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail204.stderr7
-rw-r--r--testsuite/tests/typecheck/should_run/T5751.hs2
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun036.hs12
120 files changed, 1331 insertions, 1063 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr
index f9b07605b9..edc277254b 100644
--- a/testsuite/tests/deSugar/should_compile/T2431.stderr
+++ b/testsuite/tests/deSugar/should_compile/T2431.stderr
@@ -2,7 +2,7 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 8, types: 19, coercions: 1}
-T2431.$WRefl [InlPrag=INLINE] :: forall a. a T2431.:~: a
+T2431.$WRefl [InlPrag=INLINE] :: forall a. a :~: a
[GblId[DataConWrapper],
Caf=NoCafRefs,
Str=DmdType,
@@ -12,12 +12,9 @@ T2431.$WRefl [InlPrag=INLINE] :: forall a. a T2431.:~: a
Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ <a>_N}]
T2431.$WRefl = \ (@ a) -> T2431.Refl @ a @ a @~ <a>_N
-T2431.absurd
- :: forall a. GHC.Types.Int T2431.:~: GHC.Types.Bool -> a
+absurd :: forall a. Int :~: Bool -> a
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>b]
-T2431.absurd =
- \ (@ a) (x :: GHC.Types.Int T2431.:~: GHC.Types.Bool) ->
- case x of _ [Occ=Dead] { }
+absurd = \ (@ a) (x :: Int :~: Bool) -> case x of _ [Occ=Dead] { }
diff --git a/testsuite/tests/deriving/should_fail/T9071.stderr b/testsuite/tests/deriving/should_fail/T9071.stderr
index 259adbaef0..3a09c8ecd5 100644
--- a/testsuite/tests/deriving/should_fail/T9071.stderr
+++ b/testsuite/tests/deriving/should_fail/T9071.stderr
@@ -2,7 +2,7 @@
[2 of 2] Compiling T9071 ( T9071.hs, T9071.o )
T9071.hs:7:37:
- No instance for (Functor K)
+ No instance for (Functor Mu)
arising from the first field of ‘F’ (type ‘Mu (K a)’)
Possible fix:
use a standalone 'deriving instance' declaration,
diff --git a/testsuite/tests/deriving/should_fail/T9071_2.stderr b/testsuite/tests/deriving/should_fail/T9071_2.stderr
index ae0fcdb928..65ba471c40 100644
--- a/testsuite/tests/deriving/should_fail/T9071_2.stderr
+++ b/testsuite/tests/deriving/should_fail/T9071_2.stderr
@@ -1,6 +1,6 @@
T9071_2.hs:7:40:
- No instance for (Functor Mu)
+ No instance for (Functor K1)
arising from the first field of ‘F1’ (type ‘Mu (K1 a)’)
Possible fix:
use a standalone 'deriving instance' declaration,
diff --git a/testsuite/tests/gadt/T3169.stderr b/testsuite/tests/gadt/T3169.stderr
index 09276728e2..a646a56462 100644
--- a/testsuite/tests/gadt/T3169.stderr
+++ b/testsuite/tests/gadt/T3169.stderr
@@ -1,8 +1,6 @@
T3169.hs:13:22:
- Could not deduce (elt ~ Map b elt)
- from the context (Key a, Key b)
- bound by the instance declaration at T3169.hs:10:10-36
+ Couldn't match type ‘elt’ with ‘Map b elt’
‘elt’ is a rigid type variable bound by
the type signature for
lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
diff --git a/testsuite/tests/gadt/T7293.stderr b/testsuite/tests/gadt/T7293.stderr
index d9719ba65b..3e5d9ddf8f 100644
--- a/testsuite/tests/gadt/T7293.stderr
+++ b/testsuite/tests/gadt/T7293.stderr
@@ -1,6 +1,6 @@
T7293.hs:24:5:
- Couldn't match type ‘'False’ with ‘'True’
+ Couldn't match type ‘'True’ with ‘'False’
Inaccessible code in
a pattern with constructor
Nil :: forall a. Vec a 'Zero,
diff --git a/testsuite/tests/gadt/T7294.stderr b/testsuite/tests/gadt/T7294.stderr
index f5ad94601b..b5e4e56f35 100644
--- a/testsuite/tests/gadt/T7294.stderr
+++ b/testsuite/tests/gadt/T7294.stderr
@@ -1,6 +1,6 @@
T7294.hs:25:5: Warning:
- Couldn't match type ‘'False’ with ‘'True’
+ Couldn't match type ‘'True’ with ‘'False’
Inaccessible code in
a pattern with constructor
Nil :: forall a. Vec a 'Zero,
diff --git a/testsuite/tests/gadt/gadt21.stderr b/testsuite/tests/gadt/gadt21.stderr
index 5c234daf99..9b29cba4c0 100644
--- a/testsuite/tests/gadt/gadt21.stderr
+++ b/testsuite/tests/gadt/gadt21.stderr
@@ -1,19 +1,14 @@
-
-gadt21.hs:21:60:
- Could not deduce (Ord a1) arising from a use of ‘f’
- from the context (a ~ Set a1)
- bound by a pattern with constructor
- TypeSet :: forall a. Type a -> Type (Set a),
- in an equation for ‘withOrdDynExpr’
- at gadt21.hs:21:35-43
- Possible fix:
- add (Ord a1) to the context of
- the data constructor ‘TypeSet’
- or the data constructor ‘DynExpr’
- or the type signature for
- withOrdDynExpr :: DynExpr
- -> (forall a. Ord a => Expr a -> b) -> Maybe b
- In the first argument of ‘Just’, namely ‘(f e)’
- In the expression: Just (f e)
- In an equation for ‘withOrdDynExpr’:
- withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e)
+
+gadt21.hs:21:60:
+ Could not deduce (Ord a1) arising from a use of ‘f’
+ from the context (a ~ Set a1)
+ bound by a pattern with constructor
+ TypeSet :: forall a. Type a -> Type (Set a),
+ in an equation for ‘withOrdDynExpr’
+ at gadt21.hs:21:35-43
+ Possible fix:
+ add (Ord a1) to the context of the data constructor ‘TypeSet’
+ In the first argument of ‘Just’, namely ‘(f e)’
+ In the expression: Just (f e)
+ In an equation for ‘withOrdDynExpr’:
+ withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e)
diff --git a/testsuite/tests/ghc-api/apirecomp001/apirecomp001.stderr b/testsuite/tests/ghc-api/apirecomp001/apirecomp001.stderr
index 54915f2953..69b9996223 100644
--- a/testsuite/tests/ghc-api/apirecomp001/apirecomp001.stderr
+++ b/testsuite/tests/ghc-api/apirecomp001/apirecomp001.stderr
@@ -3,14 +3,14 @@ B.hs:4:1: Warning:
Top-level binding with no type signature:
answer_to_live_the_universe_and_everything :: Int
-B.hs:5:13: Warning:
+B.hs:5:12: Warning:
Defaulting the following constraint(s) to type ‘Integer’
- (Num a0) arising from the literal ‘1’ at B.hs:5:13
(Enum a0)
arising from the arithmetic sequence ‘1 .. 23 * 2’ at B.hs:5:12-20
- In the expression: 1
+ (Num a0) arising from the literal ‘1’ at B.hs:5:13
In the first argument of ‘length’, namely ‘[1 .. 23 * 2]’
In the first argument of ‘(-)’, namely ‘length [1 .. 23 * 2]’
+ In the expression: length [1 .. 23 * 2] - 4
A.hs:7:1: Warning:
Top-level binding with no type signature: main :: IO ()
@@ -19,14 +19,14 @@ B.hs:4:1: Warning:
Top-level binding with no type signature:
answer_to_live_the_universe_and_everything :: Int
-B.hs:5:13: Warning:
+B.hs:5:12: Warning:
Defaulting the following constraint(s) to type ‘Integer’
- (Num a0) arising from the literal ‘1’ at B.hs:5:13
(Enum a0)
arising from the arithmetic sequence ‘1 .. 23 * 2’ at B.hs:5:12-20
- In the expression: 1
+ (Num a0) arising from the literal ‘1’ at B.hs:5:13
In the first argument of ‘length’, namely ‘[1 .. 23 * 2]’
In the first argument of ‘(-)’, namely ‘length [1 .. 23 * 2]’
+ In the expression: length [1 .. 23 * 2] - 4
A.hs:7:1: Warning:
Top-level binding with no type signature: main :: IO ()
diff --git a/testsuite/tests/ghci.debugger/scripts/break026.stdout b/testsuite/tests/ghci.debugger/scripts/break026.stdout
index 9afc3f470e..8d81867044 100644
--- a/testsuite/tests/ghci.debugger/scripts/break026.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break026.stdout
@@ -1,58 +1,58 @@
-Stopped at break026.hs:(5,1)-(7,35)
-_result :: t = _
-Stopped at break026.hs:5:16-22
-_result :: Integer = _
-c :: Integer = 0
-go :: Integer -> [t1] -> Integer = _
-xs :: [t1] = _
-Stopped at break026.hs:(6,9)-(7,35)
-_result :: t = _
-f :: t -> t1 -> t = _
-Stopped at break026.hs:7:23-35
-_result :: Integer = _
-c :: Integer = 0
-f :: Integer -> Integer -> Integer = _
-x :: Integer = 1
-xs :: [Integer] = _
-Stopped at break026.hs:(6,9)-(7,35)
-_result :: t = _
-f :: t -> t1 -> t = _
-Stopped at break026.hs:7:23-35
-_result :: t = _
-c :: t = _
-f :: t -> Integer -> t = _
-x :: Integer = 2
-xs :: [Integer] = _
-c = 1
-Stopped at break026.hs:(5,1)-(7,35)
-_result :: t = _
-Stopped at break026.hs:5:16-22
-_result :: Integer = _
-c :: Integer = 0
-go :: Integer -> [t1] -> Integer = _
-xs :: [t1] = _
-Stopped at break026.hs:(6,9)-(7,35)
-_result :: t = _
-f :: t -> t1 -> t = _
-Stopped at break026.hs:7:23-35
-_result :: Integer = _
-c :: Integer = 0
-f :: Integer -> Integer -> Integer = _
-x :: Integer = 1
-xs :: [Integer] = _
-Stopped at break026.hs:(6,9)-(7,35)
-_result :: t = _
-f :: t -> t1 -> t = _
-Stopped at break026.hs:7:23-35
-_result :: t = _
-c :: t = _
-f :: t -> Integer -> t = _
-x :: Integer = 2
-xs :: [Integer] = _
-Stopped at break026.hs:7:27-31
-_result :: Integer = _
-c :: Integer = 0
-f :: Integer -> Integer -> Integer = _
-x :: Integer = 1
-()
-1
+Stopped at break026.hs:(5,1)-(7,35)
+_result :: t1 = _
+Stopped at break026.hs:5:16-22
+_result :: Integer = _
+c :: Integer = 0
+go :: Integer -> [t] -> Integer = _
+xs :: [t] = _
+Stopped at break026.hs:(6,9)-(7,35)
+_result :: t1 = _
+f :: t1 -> t -> t1 = _
+Stopped at break026.hs:7:23-35
+_result :: Integer = _
+c :: Integer = 0
+f :: Integer -> Integer -> Integer = _
+x :: Integer = 1
+xs :: [Integer] = _
+Stopped at break026.hs:(6,9)-(7,35)
+_result :: t1 = _
+f :: t1 -> t -> t1 = _
+Stopped at break026.hs:7:23-35
+_result :: t1 = _
+c :: t1 = _
+f :: t1 -> Integer -> t1 = _
+x :: Integer = 2
+xs :: [Integer] = _
+c = 1
+Stopped at break026.hs:(5,1)-(7,35)
+_result :: t1 = _
+Stopped at break026.hs:5:16-22
+_result :: Integer = _
+c :: Integer = 0
+go :: Integer -> [t] -> Integer = _
+xs :: [t] = _
+Stopped at break026.hs:(6,9)-(7,35)
+_result :: t1 = _
+f :: t1 -> t -> t1 = _
+Stopped at break026.hs:7:23-35
+_result :: Integer = _
+c :: Integer = 0
+f :: Integer -> Integer -> Integer = _
+x :: Integer = 1
+xs :: [Integer] = _
+Stopped at break026.hs:(6,9)-(7,35)
+_result :: t1 = _
+f :: t1 -> t -> t1 = _
+Stopped at break026.hs:7:23-35
+_result :: t1 = _
+c :: t1 = _
+f :: t1 -> Integer -> t1 = _
+x :: Integer = 2
+xs :: [Integer] = _
+Stopped at break026.hs:7:27-31
+_result :: Integer = _
+c :: Integer = 0
+f :: Integer -> Integer -> Integer = _
+x :: Integer = 1
+()
+1
diff --git a/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs b/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
index e37bfe323e..f011bcf465 100644
--- a/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
+++ b/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
@@ -41,6 +41,14 @@ class Mergeable a b where
type MergerType a b
merger :: a -> b -> MergerType a b
+{-
+merge ::
+ forall a b.
+ (Merger (MergerType a b), Mergeable a b,
+ UnmergedLeft (MergerType a b) ~ a,
+ UnmergedRight (MergerType a b) ~ b) =>
+ a -> b -> Merged (MergerType a b)
+-}
merge x y = mkMerge (merger x y) x y
data TakeRight a
@@ -117,4 +125,4 @@ instance
type Merged (RightHeadFirst h1 t1 h2 t2) = h2 :* Merged (MergerType (h1 :* t1) t2)
type UnmergedLeft (RightHeadFirst h1 t1 h2 t2) = h1 :* t1
type UnmergedRight (RightHeadFirst h1 t1 h2 t2) = h2 :* t2
- mkMerge _ (h1 :* t1) (h2 :* t2) = h2 :* mkMerge (merger (h1 :* t1) t2) (h1 :* t1) t2 \ No newline at end of file
+ mkMerge _ (h1 :* t1) (h2 :* t2) = h2 :* mkMerge (merger (h1 :* t1) t2) (h1 :* t1) t2
diff --git a/testsuite/tests/indexed-types/should_compile/PushInAsGivens.stderr b/testsuite/tests/indexed-types/should_compile/PushInAsGivens.stderr
new file mode 100644
index 0000000000..0519ecba6e
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/PushInAsGivens.stderr
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs
index 0117b81d47..063f7021cf 100644
--- a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs
+++ b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs
@@ -8,7 +8,7 @@ type family F a
bar y = let foo :: (F Int ~ [a]) => a -> Int
foo x = length [x,y]
- in (y,foo y)
+ in (y,foo y)
-- This example demonstrates why we need to push in
@@ -20,5 +20,12 @@ bar y = let foo :: (F Int ~ [a]) => a -> Int
-- Given/Solved, it will be discarded when we meet the given (F Int ~ [a]) and
-- we will not be able to solve the implication constraint.
+-- Oct 14: actually this example is _really_ strange, and doesn't illustrate
+-- the real issue in Trac #4935, for which there is a separate test
+--
+-- The example here requires us to infer a type
+-- bar :: F Int ~ [a] => ...
+-- which is a strange type to quantify over; better to complain about
+-- having no instance for F Int.
diff --git a/testsuite/tests/indexed-types/should_compile/Simple13.hs b/testsuite/tests/indexed-types/should_compile/Simple13.hs
index 7633f01f98..9e463e8e05 100644
--- a/testsuite/tests/indexed-types/should_compile/Simple13.hs
+++ b/testsuite/tests/indexed-types/should_compile/Simple13.hs
@@ -16,3 +16,33 @@ mkf p = undefined
foo :: a ~ [F a] => a -> a
foo p = same p (mkf p)
+{- p :: a
+
+ [G] g : a ~ [F a]
+ [W] w : a ~ [F a]
+
+--->
+ g' = g;[x] g'=aq4
+ [G] g' : a ~ [fsk] g=aqW
+ [W] x : F a ~ fsk x=aq3
+
+ [W] w : a ~ [F a]
+
+ --> subst a
+ x = F g' ; x2
+ [W] x2 : F fsk ~ fsk x2=aq5
+
+ --> (subst a)
+ w = g' ; w2
+ [W] w2 : [fsk] ~ [F a]
+
+ --> decompose
+ w2 = [w3]
+ [W] w3 : fsk ~ F a
+
+
+
+cycle is
+ aq3 = Sym (F aq4) ; aq5 x = Sym (F g') ; x2
+ aq4 = apw ; aq3 g' =
+-}
diff --git a/testsuite/tests/indexed-types/should_compile/Simple8.hs b/testsuite/tests/indexed-types/should_compile/Simple8.hs
index f819763579..bc660bb8fa 100644
--- a/testsuite/tests/indexed-types/should_compile/Simple8.hs
+++ b/testsuite/tests/indexed-types/should_compile/Simple8.hs
@@ -8,7 +8,7 @@ type family F a
-- works if one of the duplicates is removed.
type instance F () = ()
-type instance F () = ()
+-- type instance F () = ()
foo :: F () -> ()
foo x = x
diff --git a/testsuite/tests/indexed-types/should_compile/T3017.stderr b/testsuite/tests/indexed-types/should_compile/T3017.stderr
index 4e0677569e..ec97deaf18 100644
--- a/testsuite/tests/indexed-types/should_compile/T3017.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3017.stderr
@@ -1,7 +1,7 @@
TYPE SIGNATURES
emptyL :: forall a. ListColl a
test2 ::
- forall c t t1. (Coll c, Num t1, Num t, Elem c ~ (t, t1)) => c -> c
+ forall c t t1. (Num t, Num t1, Coll c, Elem c ~ (t, t1)) => c -> c
TYPE CONSTRUCTORS
class Coll c where
type family Elem c :: * open
diff --git a/testsuite/tests/indexed-types/should_compile/T3208b.stderr b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
index a210113ea8..5ee40a7faf 100644
--- a/testsuite/tests/indexed-types/should_compile/T3208b.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
@@ -1,27 +1,24 @@
T3208b.hs:15:10:
- Could not deduce (STerm o0 ~ STerm a)
+ Could not deduce (STerm o0 ~ OTerm o0)
from the context (OTerm a ~ STerm a, OBJECT a, SUBST a)
bound by the type signature for
fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
at T3208b.hs:14:9-56
- NB: ‘STerm’ is a type function, and may not be injective
The type variable ‘o0’ is ambiguous
- Expected type: STerm o0
- Actual type: OTerm o0
- Relevant bindings include
- f :: a (bound at T3208b.hs:15:6)
- fce' :: a -> c (bound at T3208b.hs:15:1)
In the expression: fce (apply f)
In an equation for ‘fce'’: fce' f = fce (apply f)
T3208b.hs:15:15:
- Could not deduce (OTerm o0 ~ STerm a)
+ Could not deduce (OTerm o0 ~ OTerm a)
from the context (OTerm a ~ STerm a, OBJECT a, SUBST a)
bound by the type signature for
fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
at T3208b.hs:14:9-56
+ NB: ‘OTerm’ is a type function, and may not be injective
The type variable ‘o0’ is ambiguous
+ Expected type: STerm a
+ Actual type: OTerm o0
Relevant bindings include
f :: a (bound at T3208b.hs:15:6)
fce' :: a -> c (bound at T3208b.hs:15:1)
diff --git a/testsuite/tests/indexed-types/should_compile/T3826.hs b/testsuite/tests/indexed-types/should_compile/T3826.hs
index 39c597f69c..752ba59735 100644
--- a/testsuite/tests/indexed-types/should_compile/T3826.hs
+++ b/testsuite/tests/indexed-types/should_compile/T3826.hs
@@ -6,10 +6,56 @@ class C a where
type E a
c :: E a -> a -> a
-data T a = T a
+data T a = MkT a
+-- MkT :: a -> T a
-instance C (T a) where
- type E (T a) = a
- c x (T _) = T x
+instance C (T b) where
+ type E (T b) = b
+ c x (MkT _) = MkT x
+
+
+f t@(MkT x) = c x t
+
+{- c :: E alpha -> alpha -> alpha
+ t :: T beta
+ x :: beta
+ f :: T beta -> gamma
+
+
+ [W] C alpha
+ [W] E alpha ~ beta
+ [W] alpha ~ T beta
+ [W] gamma ~ alpha
+
+---> beta = t_aqf alpha = t_aqg
+ alpha := T beta
+ gamma := alpha
+
+ [W] E (T beta) ~ beta
+
+-->
+ [W] ufsk ~ beta
+ [W] E (T beta) ~ ufsk
+
+--> (swap and subst)
+ beta := ufsk
+ [W] x : E (T ufsk) ~ ufsk (do not rewrite RHS)
+
+take a step ax: E (T beta) ~ beta
+
+-->
+ [W] ufsk
+--------------------------
+ But what about this?
+--------------------------
+
+axiom F [a] = F [a]
+
+ x : F [a] ~ fsk
+step
+ ax : F [a] ~ F [a]
+flatten
+ ax ; x : F [a] ~ fsk
+ x = ax ; x Oh dear!
+-}
-f t@(T x) = c x t
diff --git a/testsuite/tests/indexed-types/should_compile/T4494.hs b/testsuite/tests/indexed-types/should_compile/T4494.hs
index 52e1435272..ec04943d6b 100644
--- a/testsuite/tests/indexed-types/should_compile/T4494.hs
+++ b/testsuite/tests/indexed-types/should_compile/T4494.hs
@@ -10,3 +10,23 @@ bar = error "urk"
call :: F Bool -> Int
call x = bar (\_ -> x) (undefined :: H (F Bool))
+
+{-
+ [W] H (F Bool) ~ H alpha
+ [W] alpha ~ F Bool
+-->
+ F Bool ~ fuv0
+ H fuv0 ~ fuv1
+ H alpha ~ fuv2
+
+ fuv1 ~ fuv2
+ alpha ~ fuv0
+
+flatten
+~~~~~~~
+fuv0 := alpha
+fuv1 := fuv2
+
+alpha := F Bool
+-}
+
diff --git a/testsuite/tests/indexed-types/should_compile/T7804.hs b/testsuite/tests/indexed-types/should_compile/T7804.hs
index 6521022e3f..492c629235 100644
--- a/testsuite/tests/indexed-types/should_compile/T7804.hs
+++ b/testsuite/tests/indexed-types/should_compile/T7804.hs
@@ -8,3 +8,15 @@ data Proxy a = P
sDFMap :: (forall a. Proxy f -> Proxy a -> Proxy (F f a)) -> Int
sDFMap _ = 3
+
+
+{-
+flat cache
+ [G] F f_aqh aqj ~ fsk_aqp
+ [G] F f_aqg aqj ~ fsk_aqq
+
+ [W] aqk : f_aqh[2] ~ f_aqg
+ [w] aql : fsk_aqp ~ fsk_aqq
+
+ [G] F f_agh a_aqj ~ F f_aqg
+-} \ No newline at end of file
diff --git a/testsuite/tests/indexed-types/should_compile/all.T b/testsuite/tests/indexed-types/should_compile/all.T
index 445804af71..fbd0b0e220 100644
--- a/testsuite/tests/indexed-types/should_compile/all.T
+++ b/testsuite/tests/indexed-types/should_compile/all.T
@@ -170,7 +170,7 @@ test('T4981-V2', normal, compile, [''])
test('T4981-V3', normal, compile, [''])
test('T5002', normal, compile, [''])
-test('PushedInAsGivens', normal, compile, [''])
+test('PushedInAsGivens', normal, compile_fail, [''])
# Superclass equalities
test('T4338', normal, compile, [''])
diff --git a/testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs b/testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs
index f676c294a5..62798fad39 100644
--- a/testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs
+++ b/testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs
@@ -1,9 +1,9 @@
{-# LANGUAGE TypeFamilies, FunctionalDependencies, FlexibleContexts, GADTs, ScopedTypeVariables #-}
-module ExtraTcsUntch where
+module ExtraTcsUntch where
-class C x y | x -> y where
+class C x y | x -> y where
op :: x -> y -> ()
instance C [a] [a]
@@ -13,22 +13,24 @@ type family F a :: *
h :: F Int -> ()
h = undefined
-data TEx where
- TEx :: a -> TEx
+data TEx where
+ TEx :: a -> TEx
-f x =
+f x =
let g1 :: forall b. b -> ()
g1 _ = h [x]
+
g2 z = case z of TEx y -> (h [[undefined]], op x [y])
+
in (g1 '3', g2 undefined)
-{- This example comes from Note [Extra TcS Untouchables] in TcSimplify. It demonstrates
+{- This example comes from Note [Extra TcS Untouchables] in TcSimplify. It demonstrates
why when floating equalities out of an implication constraint we must record the free
variables of the equalities as untouchables. With GHC 7.4.1 this program gives a Core
- Lint error because of an existential escaping.
+ Lint error because of an existential escaping.
assuming x:beta
@@ -39,16 +41,21 @@ f x =
-
+
{- Assume x:beta
- From g1 we get (forall b. F Int ~ [beta])
- From g2 we get (forall c. 0 => F Int ~ [[alpha]] /\ C beta [c])
-
-Floating we get
- F Int ~ [beta], F Int ~ [[alpha]], alpha ~ alpha', forall c. C beta [c]
-= { alpha := alpha' }
-= beta ~ [alpha'], F Int ~ [[alpha']], forall c. C beta [c]
-= { beta := [alpha']
- F Int ~ [[alpha']], forall c. C [alpha'] [c]
-= F Int ~ [[alpha']], forall c. (C [alpha'] [c], alpha' ~ c)
+ From g1 we get [W] (forall b. F Int ~ [beta])
+
+ From g2 we get [W] (forall c. 0 => F Int ~ [[alpha]] /\ C beta [c])
+ (g2 is not generalised; the forall comes from the TEx pattern)
+
+approximateWC then gives the candidate constraints to quantify
+ F Int ~ [beta], F Int ~ [[alpha']]
+
+(alpha' is the promoted version of alpha)
+
+Now decide inferred sig for f :: F Int ~ [beta] => beta -> blah
+since beta is mentioned in tau-type for f but alpha' is not
+
+Perhaps this is a stupid constraint to generalise over (we don't
+generalise over (C Int).
-} \ No newline at end of file
diff --git a/testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.stderr b/testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.stderr
index 3e34058def..13f9911e6c 100644
--- a/testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.stderr
+++ b/testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.stderr
@@ -1,10 +1,16 @@
-ExtraTcsUntch.hs:24:53:
- Could not deduce (C [t] [a]) arising from a use of ‘op’
- from the context (F Int ~ [[t]])
- bound by the inferred type of
- f :: (F Int ~ [[t]]) => [t] -> ((), ((), ()))
- at ExtraTcsUntch.hs:(21,1)-(25,29)
- In the expression: op x [y]
+ExtraTcsUntch.hs:23:18:
+ Couldn't match expected type ‘F Int’ with actual type ‘[t]’
+ Relevant bindings include
+ x :: t (bound at ExtraTcsUntch.hs:21:3)
+ f :: t -> ((), ((), ())) (bound at ExtraTcsUntch.hs:21:1)
+ In the first argument of ‘h’, namely ‘[x]’
+ In the expression: h [x]
+ In an equation for ‘g1’: g1 _ = h [x]
+
+ExtraTcsUntch.hs:25:38:
+ Couldn't match expected type ‘F Int’ with actual type ‘[[t0]]’
+ The type variable ‘t0’ is ambiguous
+ In the first argument of ‘h’, namely ‘[[undefined]]’
+ In the expression: h [[undefined]]
In the expression: (h [[undefined]], op x [y])
- In a case alternative: TEx y -> (h [[undefined]], op x [y])
diff --git a/testsuite/tests/indexed-types/should_fail/GADTwrong1.hs b/testsuite/tests/indexed-types/should_fail/GADTwrong1.hs
index 7295090439..1af3516746 100644
--- a/testsuite/tests/indexed-types/should_fail/GADTwrong1.hs
+++ b/testsuite/tests/indexed-types/should_fail/GADTwrong1.hs
@@ -5,8 +5,34 @@ module ShouldFail where
type family Const a
type instance Const a = ()
-data T a where T :: a -> T (Const a)
+data T a where T :: c -> T (Const c)
coerce :: forall a b . a -> b
coerce x = case T x :: T (Const b) of
- T y -> y
+ T y -> y
+
+{-
+ T :: forall a. forall c. (a ~ Const c) => c -> T a
+
+ a ~ gamma -- Instantiate T with a=alpha, c=gamma
+ alpha ~ Const b -- Result of (T x)
+ alpha ~ Const gamma -- Constraint from (T x)
+
+ y::c
+ forall c. (Const b ~ Const c) => c ~ b
+
+==>
+ Const b ~ Const a
+
+------------
+
+case e of
+ T y -> y
+
+ e :: T alpha
+
+ Patterns
+ forall c. (alpha ~ Const c) => c ~ b
+ alpha ~ Const b
+
+-} \ No newline at end of file
diff --git a/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr b/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
index dc94b9a7c3..c49049b400 100644
--- a/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
+++ b/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
@@ -1,20 +1,15 @@
-GADTwrong1.hs:12:19:
- Could not deduce (a1 ~ b)
- from the context (() ~ Const a1)
- bound by a pattern with constructor
- T :: forall a. a -> T (Const a),
- in a case alternative
- at GADTwrong1.hs:12:12-14
- ‘a1’ is a rigid type variable bound by
- a pattern with constructor
- T :: forall a. a -> T (Const a),
- in a case alternative
- at GADTwrong1.hs:12:12
+GADTwrong1.hs:12:21:
+ Couldn't match expected type ‘b’ with actual type ‘c’
+ ‘c’ is a rigid type variable bound by
+ a pattern with constructor
+ T :: forall c. c -> T (Const c),
+ in a case alternative
+ at GADTwrong1.hs:12:14
‘b’ is a rigid type variable bound by
the type signature for coerce :: a -> b at GADTwrong1.hs:10:20
Relevant bindings include
- y :: a1 (bound at GADTwrong1.hs:12:14)
+ y :: c (bound at GADTwrong1.hs:12:16)
coerce :: a -> b (bound at GADTwrong1.hs:11:1)
In the expression: y
In a case alternative: T y -> y
diff --git a/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr b/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
index d3193d5f30..f825fd2af6 100644
--- a/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
+++ b/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
@@ -1,9 +1,6 @@
NoMatchErr.hs:19:7:
- Could not deduce (Memo d0 ~ Memo d)
- from the context (Fun d)
- bound by the type signature for f :: Fun d => Memo d a -> Memo d a
- at NoMatchErr.hs:19:7-37
+ Couldn't match type ‘Memo d’ with ‘Memo d0’
NB: ‘Memo’ is a type function, and may not be injective
The type variable ‘d0’ is ambiguous
Expected type: Memo d a -> Memo d a
diff --git a/testsuite/tests/indexed-types/should_fail/Overlap9.stderr b/testsuite/tests/indexed-types/should_fail/Overlap9.stderr
index 92cf6202de..9dd542f4c8 100644
--- a/testsuite/tests/indexed-types/should_fail/Overlap9.stderr
+++ b/testsuite/tests/indexed-types/should_fail/Overlap9.stderr
@@ -1,9 +1,6 @@
Overlap9.hs:10:7:
- Could not deduce (F a ~ Int)
- from the context (Show a)
- bound by the type signature for g :: Show a => a -> F a
- at Overlap9.hs:9:6-23
+ Couldn't match expected type ‘F a’ with actual type ‘Int’
Relevant bindings include
x :: a (bound at Overlap9.hs:10:3)
g :: a -> F a (bound at Overlap9.hs:10:1)
diff --git a/testsuite/tests/indexed-types/should_fail/T1897b.stderr b/testsuite/tests/indexed-types/should_fail/T1897b.stderr
index 785f21ad89..936aa26924 100644
--- a/testsuite/tests/indexed-types/should_fail/T1897b.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T1897b.stderr
@@ -1,16 +1,12 @@
T1897b.hs:16:1:
- Could not deduce (Depend a0 ~ Depend a)
- from the context (Bug a, Foldable t)
- bound by the inferred type for ‘isValid’:
- (Bug a, Foldable t) => t (Depend a) -> Bool
- at T1897b.hs:16:1-41
+ Couldn't match type ‘Depend a’ with ‘Depend a0’
NB: ‘Depend’ is a type function, and may not be injective
The type variable ‘a0’ is ambiguous
Expected type: t (Depend a) -> Bool
Actual type: t (Depend a0) -> Bool
When checking that ‘isValid’ has the inferred type
isValid :: forall a (t :: * -> *).
- (Bug a, Foldable t) =>
+ (Foldable t, Bug a) =>
t (Depend a) -> Bool
Probable cause: the inferred type is ambiguous
diff --git a/testsuite/tests/indexed-types/should_fail/T1900.stderr b/testsuite/tests/indexed-types/should_fail/T1900.stderr
index d44b4ed210..73fe38108a 100644
--- a/testsuite/tests/indexed-types/should_fail/T1900.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T1900.stderr
@@ -1,9 +1,6 @@
T1900.hs:13:10:
- Could not deduce (Depend s0 ~ Depend s)
- from the context (Bug s)
- bound by the type signature for check :: Bug s => Depend s -> Bool
- at T1900.hs:13:10-36
+ Couldn't match type ‘Depend s0’ with ‘Depend s’
NB: ‘Depend’ is a type function, and may not be injective
The type variable ‘s0’ is ambiguous
Expected type: Depend s -> Bool
diff --git a/testsuite/tests/indexed-types/should_fail/T2544.hs b/testsuite/tests/indexed-types/should_fail/T2544.hs
index 22f3995286..3653a42317 100644
--- a/testsuite/tests/indexed-types/should_fail/T2544.hs
+++ b/testsuite/tests/indexed-types/should_fail/T2544.hs
@@ -12,4 +12,17 @@ data BiApp a b c = BiApp (a c) (b c)
instance (Ix l, Ix r) => Ix (l :|: r) where
type IxMap (l :|: r) = BiApp (IxMap l) (IxMap r)
- empty = BiApp empty empty \ No newline at end of file
+ empty = BiApp empty empty
+
+-- [W] w1: a c ~ IxMap ii1 [Int] (from first 'empty')
+-- [W] w2: b c ~ IxMap ii2 [Int] (from second 'empty')
+-- [W] w3: BiApp a b c ~ IxMap (l :|: r) [Int] (from call of BiApp
+-- ~ BiApp (IxMap l) (IxMap r) [Int]
+
+-- If we process w3 first, we'll rewrite it with w1, w2
+-- yielding two constraints (Ix io ~ IxMap l, Ix i1 ~ IxMap r)
+-- both with location of w3. Then we report just one of them,
+-- because we suppress multiple errors from the same location
+--
+-- But if we process w1,w2 first, we'll get the same constraints
+-- but this time with different locations.
diff --git a/testsuite/tests/indexed-types/should_fail/T2544.stderr b/testsuite/tests/indexed-types/should_fail/T2544.stderr
index 244580f922..256fa30522 100644
--- a/testsuite/tests/indexed-types/should_fail/T2544.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2544.stderr
@@ -1,8 +1,6 @@
T2544.hs:15:18:
- Could not deduce (IxMap i0 ~ IxMap l)
- from the context (Ix l, Ix r)
- bound by the instance declaration at T2544.hs:13:10-37
+ Couldn't match type ‘IxMap i0’ with ‘IxMap l’
NB: ‘IxMap’ is a type function, and may not be injective
The type variable ‘i0’ is ambiguous
Expected type: IxMap l [Int]
@@ -13,9 +11,7 @@ T2544.hs:15:18:
In the expression: BiApp empty empty
T2544.hs:15:24:
- Could not deduce (IxMap i1 ~ IxMap r)
- from the context (Ix l, Ix r)
- bound by the instance declaration at T2544.hs:13:10-37
+ Couldn't match type ‘IxMap i1’ with ‘IxMap r’
NB: ‘IxMap’ is a type function, and may not be injective
The type variable ‘i1’ is ambiguous
Expected type: IxMap r [Int]
diff --git a/testsuite/tests/indexed-types/should_fail/T2627b.hs b/testsuite/tests/indexed-types/should_fail/T2627b.hs
index 13dbd9cb26..0e1f103786 100644
--- a/testsuite/tests/indexed-types/should_fail/T2627b.hs
+++ b/testsuite/tests/indexed-types/should_fail/T2627b.hs
@@ -12,9 +12,15 @@ type instance Dual (R a b) = W a (Dual b)
type instance Dual (W a b) = R a (Dual b)
data Comm a where
- Rd :: (a -> Comm b) -> Comm (R a b)
- Wr :: a -> Comm b -> Comm (W a b)
+ Rd :: (c -> Comm d) -> Comm (R c d)
+ Wr :: e -> Comm f -> Comm (W e f)
Fin :: Int -> Comm Z
conn :: (Dual a ~ b, Dual b ~ a) => Comm a -> Comm b -> (Int, Int)
conn (Rd k) (Wr a r) = conn undefined undefined
+
+{-
+ [G] a ~ R c d
+ [G] b ~ W e f
+ [W] Dual alpha ~ beta, [W] Dual beta ~ alpha
+-} \ No newline at end of file
diff --git a/testsuite/tests/indexed-types/should_fail/T2664.hs b/testsuite/tests/indexed-types/should_fail/T2664.hs
index f8fad88192..bda1adfa42 100644
--- a/testsuite/tests/indexed-types/should_fail/T2664.hs
+++ b/testsuite/tests/indexed-types/should_fail/T2664.hs
@@ -29,3 +29,20 @@ instance (Connect a, Connect b) => Connect (a :*: b) where
-- type error leads to stack overflow (even without UndecidableInstances!)
return (O $ takeMVar v, E (pchoose Right v newPChan) (pchoose Left v newPChan))
+
+{- The last line gives rise to:
+
+ [G] (a :*: b) ~ Dual c
+ [G] c ~ Dual (a :*: b)
+-->
+ [G] c ~ Dual a :+: Dual b
+
+ [W] PChan c ~ PChan (Dual b :+: Dual a)
+--> decompose
+ [W] c ~ Dual b :+: Dual a
+--> subst
+ [W] Dual a :+: Dual b ~ Dual b :+: Dual a
+--> decompose
+ [W] Dual a ~ Dual b
+ [W] Dual b ~ Dual a
+-} \ No newline at end of file
diff --git a/testsuite/tests/indexed-types/should_fail/T2664.stderr b/testsuite/tests/indexed-types/should_fail/T2664.stderr
index 4104eb58c4..402d12b753 100644
--- a/testsuite/tests/indexed-types/should_fail/T2664.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2664.stderr
@@ -1,23 +1,19 @@
-T2664.hs:31:52:
- Could not deduce (b ~ a)
- from the context (Connect a, Connect b)
- bound by the instance declaration at T2664.hs:22:10-52
- or from ((a :*: b) ~ Dual c, c ~ Dual (a :*: b))
+T2664.hs:31:33:
+ Could not deduce (Dual b ~ Dual a)
+ from the context ((a :*: b) ~ Dual c, c ~ Dual (a :*: b))
bound by the type signature for
newPChan :: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) =>
IO (PChan (a :*: b), PChan c)
at T2664.hs:23:5-12
- ‘b’ is a rigid type variable bound by
- the instance declaration at T2664.hs:22:10
- ‘a’ is a rigid type variable bound by
- the instance declaration at T2664.hs:22:10
- Expected type: Dual (Dual a)
- Actual type: b
+ NB: ‘Dual’ is a type function, and may not be injective
+ Expected type: PChan c
+ Actual type: PChan (Dual b :+: Dual a)
Relevant bindings include
v :: MVar (Either (PChan a) (PChan b)) (bound at T2664.hs:24:9)
newPChan :: IO (PChan (a :*: b), PChan c) (bound at T2664.hs:23:5)
- In the third argument of ‘pchoose’, namely ‘newPChan’
- In the first argument of ‘E’, namely ‘(pchoose Right v newPChan)’
In the expression:
E (pchoose Right v newPChan) (pchoose Left v newPChan)
+ In the first argument of ‘return’, namely
+ ‘(O $ takeMVar v,
+ E (pchoose Right v newPChan) (pchoose Left v newPChan))’
diff --git a/testsuite/tests/indexed-types/should_fail/T2693.stderr b/testsuite/tests/indexed-types/should_fail/T2693.stderr
index b613ab7ab5..0c6ea152a7 100644
--- a/testsuite/tests/indexed-types/should_fail/T2693.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2693.stderr
@@ -16,16 +16,16 @@ T2693.hs:11:7:
return () }
T2693.hs:19:15:
- Couldn't match expected type ‘(a2, b0)’ with actual type ‘TFn a3’
- The type variables ‘a2’, ‘b0’, ‘a3’ are ambiguous
- Relevant bindings include n :: a2 (bound at T2693.hs:19:7)
+ Couldn't match expected type ‘(a5, b0)’ with actual type ‘TFn a2’
+ The type variables ‘b0’, ‘a2’, ‘a5’ are ambiguous
+ Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
In the first argument of ‘fst’, namely ‘x’
In the first argument of ‘(+)’, namely ‘fst x’
T2693.hs:19:23:
- Couldn't match expected type ‘(a4, a2)’ with actual type ‘TFn a5’
- The type variables ‘a2’, ‘a4’, ‘a5’ are ambiguous
- Relevant bindings include n :: a2 (bound at T2693.hs:19:7)
+ Couldn't match expected type ‘(a3, a5)’ with actual type ‘TFn a4’
+ The type variables ‘a3’, ‘a4’, ‘a5’ are ambiguous
+ Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
In the first argument of ‘snd’, namely ‘x’
In the second argument of ‘(+)’, namely ‘snd x’
diff --git a/testsuite/tests/indexed-types/should_fail/T4093a.hs b/testsuite/tests/indexed-types/should_fail/T4093a.hs
index 06168f577e..746f996d57 100644
--- a/testsuite/tests/indexed-types/should_fail/T4093a.hs
+++ b/testsuite/tests/indexed-types/should_fail/T4093a.hs
@@ -6,3 +6,34 @@ type instance Foo () = Maybe ()
hang :: (Foo e ~ Maybe e) => Foo e
hang = Just ()
+
+
+{- Ambiguity check
+
+ [G] Foo e ~ Maybe e
+ [W] Foo e ~ Foo ee
+ [W] Foo ee ~ Maybe ee)
+---
+ [G] Foo e ~ fsk
+ [G] fsk ~ Maybe e
+
+ [W] Foo e ~ fmv1
+ [W] Foo ee ~ fmv2
+ [W] fmv1 ~ fmv2
+ [W] fmv2 ~ Maybe ee
+
+---> fmv1 := fsk
+ [W] Foo ee ~ fmv2
+ [W] fsk ~ fmv2
+ [W] fmv2 ~ Maybe ee
+
+--->
+ [W] Foo ee ~ fmv2
+ [W] fmv2 ~ Maybe e
+ [W] fmv2 ~ Maybe ee
+
+Now the question is whether we get a derived equality e ~ ee. Currently
+we don't, but we easily could. But then we'd need to be careful not to
+report insoluble Int ~ Bool if we had
+ F a ~ Int, F a ~ Bool
+-} \ No newline at end of file
diff --git a/testsuite/tests/indexed-types/should_fail/T4093a.stderr b/testsuite/tests/indexed-types/should_fail/T4093a.stderr
index 90b8a592f6..076041be32 100644
--- a/testsuite/tests/indexed-types/should_fail/T4093a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4093a.stderr
@@ -1,14 +1,11 @@
-T4093a.hs:8:8:
- Could not deduce (e ~ ())
+T4093a.hs:7:9:
+ Could not deduce (Foo e0 ~ Maybe e0)
from the context (Foo e ~ Maybe e)
bound by the type signature for hang :: (Foo e ~ Maybe e) => Foo e
at T4093a.hs:7:9-34
- ‘e’ is a rigid type variable bound by
- the type signature for hang :: (Foo e ~ Maybe e) => Foo e
- at T4093a.hs:7:9
- Expected type: Foo e
- Actual type: Maybe ()
- Relevant bindings include hang :: Foo e (bound at T4093a.hs:8:1)
- In the expression: Just ()
- In an equation for ‘hang’: hang = Just ()
+ The type variable ‘e0’ is ambiguous
+ In the ambiguity check for: forall e. (Foo e ~ Maybe e) => Foo e
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘hang’:
+ hang :: (Foo e ~ Maybe e) => Foo e
diff --git a/testsuite/tests/indexed-types/should_fail/T4174.stderr b/testsuite/tests/indexed-types/should_fail/T4174.stderr
index 19d3e8d3e0..6b5ada2932 100644
--- a/testsuite/tests/indexed-types/should_fail/T4174.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4174.stderr
@@ -1,7 +1,28 @@
T4174.hs:42:12:
- Couldn't match type ‘False’ with ‘True’
- Expected type: True
- Actual type: GHCVersion (WayOf m) :>=: GHC6'10 Minor1
+ Couldn't match type ‘a’ with ‘SmStep’
+ ‘a’ is a rigid type variable bound by
+ the type signature for
+ testcase :: Monad m => m (Field (Way (GHC6'8 minor) n t p) a b)
+ at T4174.hs:41:13
+ Expected type: m (Field (Way (GHC6'8 minor) n t p) a b)
+ Actual type: m (Field (WayOf m) SmStep RtsSpinLock)
+ Relevant bindings include
+ testcase :: m (Field (Way (GHC6'8 minor) n t p) a b)
+ (bound at T4174.hs:42:1)
+ In the expression: sync_large_objects
+ In an equation for ‘testcase’: testcase = sync_large_objects
+
+T4174.hs:42:12:
+ Couldn't match type ‘b’ with ‘RtsSpinLock’
+ ‘b’ is a rigid type variable bound by
+ the type signature for
+ testcase :: Monad m => m (Field (Way (GHC6'8 minor) n t p) a b)
+ at T4174.hs:41:13
+ Expected type: m (Field (Way (GHC6'8 minor) n t p) a b)
+ Actual type: m (Field (WayOf m) SmStep RtsSpinLock)
+ Relevant bindings include
+ testcase :: m (Field (Way (GHC6'8 minor) n t p) a b)
+ (bound at T4174.hs:42:1)
In the expression: sync_large_objects
In an equation for ‘testcase’: testcase = sync_large_objects
diff --git a/testsuite/tests/indexed-types/should_fail/T4179.stderr b/testsuite/tests/indexed-types/should_fail/T4179.stderr
index 40fb84d83a..f9bb6bb2ad 100644
--- a/testsuite/tests/indexed-types/should_fail/T4179.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4179.stderr
@@ -1,13 +1,8 @@
T4179.hs:26:16:
- Could not deduce (A3 (x (A2 (FCon x) -> A3 (FCon x)))
- ~ A3 (FCon x))
- from the context (Functor x, DoC (FCon x))
- bound by the type signature for
- fCon :: (Functor x, DoC (FCon x)) =>
- Con x -> A2 (FCon x) -> A3 (FCon x)
- at T4179.hs:25:9-72
- NB: ‘A3’ is a type function, and may not be injective
+ Couldn't match type ‘A2 (x (A2 (FCon x) -> A3 (FCon x)))’
+ with ‘A2 (FCon x)’
+ NB: ‘A2’ is a type function, and may not be injective
Expected type: x (A2 (FCon x) -> A3 (FCon x))
-> A2 (FCon x) -> A3 (FCon x)
Actual type: x (A2 (FCon x) -> A3 (FCon x))
diff --git a/testsuite/tests/indexed-types/should_fail/T4272.stderr b/testsuite/tests/indexed-types/should_fail/T4272.stderr
index 7c98377ed7..1000b9a3f1 100644
--- a/testsuite/tests/indexed-types/should_fail/T4272.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4272.stderr
@@ -1,10 +1,6 @@
T4272.hs:15:26:
- Could not deduce (a ~ TermFamily a a)
- from the context (TermLike a)
- bound by the type signature for
- laws :: TermLike a => TermFamily a a -> b
- at T4272.hs:14:9-53
+ Couldn't match type ‘a’ with ‘TermFamily a a’
‘a’ is a rigid type variable bound by
the type signature for laws :: TermLike a => TermFamily a a -> b
at T4272.hs:14:16
diff --git a/testsuite/tests/indexed-types/should_fail/T5439.stderr b/testsuite/tests/indexed-types/should_fail/T5439.stderr
index 19517cbf57..3bffb4fc6c 100644
--- a/testsuite/tests/indexed-types/should_fail/T5439.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T5439.stderr
@@ -1,26 +1,25 @@
-
-T5439.hs:82:28:
- Couldn't match type ‘Attempt (HHead (HDrop n0 l0))
- -> Attempt (HElemOf l0)’
- with ‘Attempt (WaitOpResult (WaitOps rs))’
- Expected type: f (Attempt (HNth n0 l0) -> Attempt (HElemOf l0))
- Actual type: f (Attempt (WaitOpResult (WaitOps rs)))
- Relevant bindings include
- register :: Bool -> Peano n -> WaitOps (HDrop n rs) -> IO Bool
- (bound at T5439.hs:64:9)
- ev :: f (Attempt (WaitOpResult (WaitOps rs)))
- (bound at T5439.hs:61:22)
- ops :: WaitOps rs (bound at T5439.hs:61:18)
- registerWaitOp :: WaitOps rs
- -> f (Attempt (WaitOpResult (WaitOps rs))) -> IO Bool
- (bound at T5439.hs:61:3)
- In the first argument of ‘complete’, namely ‘ev’
- In the expression: complete ev
-
-T5439.hs:82:39:
- Couldn't match expected type ‘Peano n0’
- with actual type ‘Attempt α0’
- In the second argument of ‘($)’, namely
- ‘Failure (e :: SomeException)’
- In the second argument of ‘($)’, namely
- ‘inj $ Failure (e :: SomeException)’
+
+T5439.hs:82:28:
+ Couldn't match type ‘Attempt (HNth n0 l0) -> Attempt (HElemOf l0)’
+ with ‘Attempt (WaitOpResult (WaitOps rs))’
+ Expected type: f (Attempt (HNth n0 l0) -> Attempt (HElemOf l0))
+ Actual type: f (Attempt (WaitOpResult (WaitOps rs)))
+ Relevant bindings include
+ register :: Bool -> Peano n -> WaitOps (HDrop n rs) -> IO Bool
+ (bound at T5439.hs:64:9)
+ ev :: f (Attempt (WaitOpResult (WaitOps rs)))
+ (bound at T5439.hs:61:22)
+ ops :: WaitOps rs (bound at T5439.hs:61:18)
+ registerWaitOp :: WaitOps rs
+ -> f (Attempt (WaitOpResult (WaitOps rs))) -> IO Bool
+ (bound at T5439.hs:61:3)
+ In the first argument of ‘complete’, namely ‘ev’
+ In the expression: complete ev
+
+T5439.hs:82:39:
+ Couldn't match expected type ‘Peano n0’
+ with actual type ‘Attempt α0’
+ In the second argument of ‘($)’, namely
+ ‘Failure (e :: SomeException)’
+ In the second argument of ‘($)’, namely
+ ‘inj $ Failure (e :: SomeException)’
diff --git a/testsuite/tests/indexed-types/should_fail/T5934.stderr b/testsuite/tests/indexed-types/should_fail/T5934.stderr
index 67a468057c..8460105c2f 100644
--- a/testsuite/tests/indexed-types/should_fail/T5934.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T5934.stderr
@@ -1,8 +1,7 @@
-
-T5934.hs:12:7:
- Couldn't match type ‘Integer’
- with ‘(forall s. Gen (PrimState (ST s))) -> Int’
- Expected type: Integer -> (forall s. GenST s) -> Int
- Actual type: Integer -> Integer
- In the expression: 0
- In an equation for ‘run’: run = 0
+
+T5934.hs:12:7:
+ Couldn't match type ‘Integer’ with ‘(forall s. GenST s) -> Int’
+ Expected type: Integer -> (forall s. GenST s) -> Int
+ Actual type: Integer -> Integer
+ In the expression: 0
+ In an equation for ‘run’: run = 0
diff --git a/testsuite/tests/indexed-types/should_fail/T7010.stderr b/testsuite/tests/indexed-types/should_fail/T7010.stderr
index 16891fb6b0..776164ce4b 100644
--- a/testsuite/tests/indexed-types/should_fail/T7010.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7010.stderr
@@ -1,6 +1,6 @@
T7010.hs:53:27:
- Couldn't match type ‘Serial (IO Float)’ with ‘IO Float’
+ Couldn't match type ‘IO Float’ with ‘Serial (ValueTuple Float)’
Expected type: (Float, ValueTuple Vector)
Actual type: (Float, ValueTuple Float)
In the first argument of ‘withArgs’, namely ‘plug’
diff --git a/testsuite/tests/indexed-types/should_fail/T7729.stderr b/testsuite/tests/indexed-types/should_fail/T7729.stderr
index c8814a412d..1e93e4017c 100644
--- a/testsuite/tests/indexed-types/should_fail/T7729.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7729.stderr
@@ -1,16 +1,12 @@
-
-T7729.hs:36:14:
- Could not deduce (BasePrimMonad (Rand m)
- ~ t0 (BasePrimMonad (Rand m)))
- from the context (PrimMonad (BasePrimMonad (Rand m)),
- Monad (Rand m),
- MonadPrim m)
- bound by the instance declaration at T7729.hs:34:10-42
- The type variable ‘t0’ is ambiguous
- Expected type: t0 (BasePrimMonad (Rand m)) a -> Rand m a
- Actual type: BasePrimMonad (Rand m) a -> Rand m a
- Relevant bindings include
- liftPrim :: BasePrimMonad (Rand m) a -> Rand m a
- (bound at T7729.hs:36:3)
- In the first argument of ‘(.)’, namely ‘liftPrim’
- In the expression: liftPrim . lift
+
+T7729.hs:36:14:
+ Couldn't match type ‘BasePrimMonad (Rand m)’
+ with ‘t0 (BasePrimMonad (Rand m))’
+ The type variable ‘t0’ is ambiguous
+ Expected type: t0 (BasePrimMonad (Rand m)) a -> Rand m a
+ Actual type: BasePrimMonad (Rand m) a -> Rand m a
+ Relevant bindings include
+ liftPrim :: BasePrimMonad (Rand m) a -> Rand m a
+ (bound at T7729.hs:36:3)
+ In the first argument of ‘(.)’, namely ‘liftPrim’
+ In the expression: liftPrim . lift
diff --git a/testsuite/tests/indexed-types/should_fail/T7729a.hs b/testsuite/tests/indexed-types/should_fail/T7729a.hs
index ea36e32bd6..4e464d67f3 100644
--- a/testsuite/tests/indexed-types/should_fail/T7729a.hs
+++ b/testsuite/tests/indexed-types/should_fail/T7729a.hs
@@ -34,3 +34,44 @@ instance MonadTrans Rand where
instance MonadPrim m => MonadPrim (Rand m) where
type BasePrimMonad (Rand m) = BasePrimMonad m
liftPrim x = liftPrim (lift x) -- This line changed from T7729
+
+{-
+ liftPrim :: (MonadPrim m) => BasePrimMonad m a -> m a
+ lift :: MonadTrans t, Monad m => m a -> t m a
+
+ sig of liftPrim :: BasePrimMonad (Rand m) a -> Rand m a
+ = BasePrimMonad m a -> Rand m a
+
+ x :: BasePrimMonad (Rand m) a
+ lift @ t=tt @ m=m1
+ liftPrim @ m=m2 @ a=aa
+
+ forall m. (Monad m) => BasePrimMonad (Rand m) a ~ m1 a -- x arg of lift
+
+ tt m1 a -- Result of lift
+ ~
+ BasePrimMonad m2 a -- Arg of liftPrim
+
+ Rand m a -- expected type of RHS
+ ~
+ m2 a -- Result of liftPrim
+ m = m_and
+ m1 = m_aql
+ m2 = m_aqf
+ tt = t_aqj
+
+---->
+ m2 := Rand m
+
+a) BasePrimMonad (Rand m) ~ m1
+b) tt m1 ~ BasePrimMonad (Rand m)
+
+---> process (b) first
+ CFunEqCan BasePrimMonad (Ramd m) ~ s_atH
+ s_atH ~ tt m1
+
+
+---> now process (a)
+ m1 ~ s_atH ~ tt m1 -- An obscure occurs check
+-}
+
diff --git a/testsuite/tests/indexed-types/should_fail/T7729a.stderr b/testsuite/tests/indexed-types/should_fail/T7729a.stderr
index 907eb1d3b1..93142006ed 100644
--- a/testsuite/tests/indexed-types/should_fail/T7729a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7729a.stderr
@@ -1,11 +1,7 @@
T7729a.hs:36:26:
- Could not deduce (BasePrimMonad (Rand m)
- ~ t0 (BasePrimMonad (Rand m)))
- from the context (PrimMonad (BasePrimMonad (Rand m)),
- Monad (Rand m),
- MonadPrim m)
- bound by the instance declaration at T7729a.hs:34:10-42
+ Couldn't match type ‘BasePrimMonad (Rand m)’
+ with ‘t0 (BasePrimMonad (Rand m))’
The type variable ‘t0’ is ambiguous
Expected type: BasePrimMonad (Rand m) a
Actual type: t0 (BasePrimMonad (Rand m)) a
diff --git a/testsuite/tests/indexed-types/should_fail/T7786.hs b/testsuite/tests/indexed-types/should_fail/T7786.hs
index 72cf061632..839a1fb83d 100644
--- a/testsuite/tests/indexed-types/should_fail/T7786.hs
+++ b/testsuite/tests/indexed-types/should_fail/T7786.hs
@@ -17,7 +17,7 @@ data KeySegment = Numic Nat | Symic Symbol
data instance Sing (n :: KeySegment) where
Numic' :: Sing n -> Sing (Numic n)
- Symic' :: Sing s -> Sing (Symic s)
+ Symic' :: Sing ss -> Sing (Symic ss)
data instance Sing (k :: [KeySegment]) where
Root' :: Sing ('[] :: [KeySegment])
diff --git a/testsuite/tests/indexed-types/should_fail/T8129.stdout b/testsuite/tests/indexed-types/should_fail/T8129.stdout
index 748ffca497..bd543d6d84 100644
--- a/testsuite/tests/indexed-types/should_fail/T8129.stdout
+++ b/testsuite/tests/indexed-types/should_fail/T8129.stdout
@@ -1,2 +1,2 @@
- Could not deduce (C x0 y0)
- Could not deduce (C x0 y0)
+ Could not deduce (C x0 (F x0))
+ Could not deduce (C x0 (F x0))
diff --git a/testsuite/tests/indexed-types/should_fail/T8227.hs b/testsuite/tests/indexed-types/should_fail/T8227.hs
index 69471dba66..97e8ef5855 100644
--- a/testsuite/tests/indexed-types/should_fail/T8227.hs
+++ b/testsuite/tests/indexed-types/should_fail/T8227.hs
@@ -21,15 +21,20 @@ Scalar (V a) ~ Scalar (V p0)
Scalar (V a) ~ p0
Scalar (V a) ~ Scalar (V p0) -> Scalar (V p0)
-
-Scalar (V a) ~ t0
-Scalar (V p0) ~ t0
-Scalar (V a) ~ p0
-Scalar (V a) ~ t0 -> t0
-
-Scalar (V a) ~ t0
-Scalar (V t0) ~ t0
-Scalar (V a) ~ t0 -> t0
+--->
+Scalar (V a) ~ fuv0
+Scalar (V p0) ~ fuv1
+fuv0 ~ fuv1
+fuv0 ~ p0
+fuv0 ~ fuv1 -> fuv1
+
+---> p0 := fuv0
+
+Scalar (V a) ~ fuv0 (CFunEqCan)
+Scalar (V fuv0) ~ fuv1 (CFunEqCan)
+fuv0 ~ fuv1
+p0 ~ fuv0
+fuv0 ~ fuv1 -> fuv1
-}
diff --git a/testsuite/tests/indexed-types/should_fail/T8227.stderr b/testsuite/tests/indexed-types/should_fail/T8227.stderr
index 6bea6194b2..f09d468a75 100644
--- a/testsuite/tests/indexed-types/should_fail/T8227.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T8227.stderr
@@ -1,9 +1,21 @@
+T8227.hs:16:27:
+ Couldn't match expected type ‘Scalar (V a)’
+ with actual type ‘Scalar (V (Scalar (V a)))
+ -> Scalar (V (Scalar (V a)))’
+ Relevant bindings include
+ seg :: a (bound at T8227.hs:16:21)
+ eps :: Scalar (V a) (bound at T8227.hs:16:17)
+ absoluteToParam :: Scalar (V a) -> a -> Scalar (V a)
+ (bound at T8227.hs:16:1)
+ In the expression: arcLengthToParam eps eps
+ In an equation for ‘absoluteToParam’:
+ absoluteToParam eps seg = arcLengthToParam eps eps
+
T8227.hs:16:44:
- Couldn't match type ‘Scalar (V a)’
- with ‘Scalar (V a) -> Scalar (V a)’
- Expected type: Scalar (V (Scalar (V a)))
- Actual type: Scalar (V a)
+ Couldn't match expected type ‘Scalar (V (Scalar (V a)))’
+ with actual type ‘Scalar (V a)’
+ NB: ‘Scalar’ is a type function, and may not be injective
Relevant bindings include
seg :: a (bound at T8227.hs:16:21)
eps :: Scalar (V a) (bound at T8227.hs:16:17)
diff --git a/testsuite/tests/indexed-types/should_fail/T8518.stderr b/testsuite/tests/indexed-types/should_fail/T8518.stderr
index d7c20105e1..cb56e21999 100644
--- a/testsuite/tests/indexed-types/should_fail/T8518.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T8518.stderr
@@ -1,35 +1,13 @@
-
-T8518.hs:14:18:
- Could not deduce (F c ~ Maybe (F c))
- from the context (Continuation c)
- bound by the type signature for
- callCont :: Continuation c => c -> Z c -> B c -> Maybe (F c)
- at T8518.hs:13:13-64
- Relevant bindings include
- b :: B c (bound at T8518.hs:14:14)
- z :: Z c (bound at T8518.hs:14:12)
- c :: c (bound at T8518.hs:14:10)
- callCont :: c -> Z c -> B c -> Maybe (F c) (bound at T8518.hs:14:1)
- In the expression: rpt (4 :: Int) c z b
- In an equation for ‘callCont’:
- callCont c z b
- = rpt (4 :: Int) c z b
- where
- rpt 0 c' z' b' = fromJust (fst <$> (continue c' z' b'))
- rpt i c' z' b' = let ... in rpt (i - 1) c''
-
-T8518.hs:17:78:
- Could not deduce (F a1 ~ (Z a1 -> B a1 -> F a1))
- from the context (Continuation c)
- bound by the type signature for
- callCont :: Continuation c => c -> Z c -> B c -> Maybe (F c)
- at T8518.hs:13:13-64
- Relevant bindings include
- c'' :: a1 (bound at T8518.hs:17:30)
- b' :: B a1 (bound at T8518.hs:17:21)
- z' :: Z a1 (bound at T8518.hs:17:18)
- c' :: a1 (bound at T8518.hs:17:15)
- rpt :: a -> a1 -> Z a1 -> B a1 -> F a1 (bound at T8518.hs:16:9)
- In the expression: rpt (i - 1) c''
- In the expression:
- let c'' = fromJust (snd <$> (continue c' z' b')) in rpt (i - 1) c''
+
+T8518.hs:17:78:
+ Couldn't match expected type ‘F a1’
+ with actual type ‘Z a1 -> B a1 -> F a1’
+ Relevant bindings include
+ c'' :: a1 (bound at T8518.hs:17:30)
+ b' :: B a1 (bound at T8518.hs:17:21)
+ z' :: Z a1 (bound at T8518.hs:17:18)
+ c' :: a1 (bound at T8518.hs:17:15)
+ rpt :: a -> a1 -> Z a1 -> B a1 -> F a1 (bound at T8518.hs:16:9)
+ In the expression: rpt (i - 1) c''
+ In the expression:
+ let c'' = fromJust (snd <$> (continue c' z' b')) in rpt (i - 1) c''
diff --git a/testsuite/tests/indexed-types/should_fail/T9036.stderr b/testsuite/tests/indexed-types/should_fail/T9036.stderr
index 2df53c712c..3a6e38ee34 100644
--- a/testsuite/tests/indexed-types/should_fail/T9036.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9036.stderr
@@ -1,7 +1,7 @@
T9036.hs:17:17:
- Couldn't match type ‘GetMonad t0’ with ‘GetMonad t’
- NB: ‘GetMonad’ is a type function, and may not be injective
+ Couldn't match type ‘Curried t [t]’ with ‘Curried t0 [t0]’
+ NB: ‘Curried’ is a type function, and may not be injective
The type variable ‘t0’ is ambiguous
Expected type: Maybe (GetMonad t after) -> Curried t [t]
Actual type: Maybe (GetMonad t0 after) -> Curried t0 [t0]
diff --git a/testsuite/tests/numeric/should_compile/T7116.stdout b/testsuite/tests/numeric/should_compile/T7116.stdout
index 9e5d19e3e0..2ff1608bef 100644
--- a/testsuite/tests/numeric/should_compile/T7116.stdout
+++ b/testsuite/tests/numeric/should_compile/T7116.stdout
@@ -2,7 +2,7 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 22, types: 14, coercions: 0}
-T7116.dl :: GHC.Types.Double -> GHC.Types.Double
+dl :: Double -> Double
[GblId,
Arity=1,
Caf=NoCafRefs,
@@ -10,17 +10,17 @@ T7116.dl :: GHC.Types.Double -> GHC.Types.Double
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= \ (x [Occ=Once!] :: GHC.Types.Double) ->
+ Tmpl= \ (x [Occ=Once!] :: Double) ->
case x of _ [Occ=Dead] { GHC.Types.D# y ->
GHC.Types.D# (GHC.Prim.+## y y)
}}]
-T7116.dl =
- \ (x :: GHC.Types.Double) ->
+dl =
+ \ (x :: Double) ->
case x of _ [Occ=Dead] { GHC.Types.D# y ->
GHC.Types.D# (GHC.Prim.+## y y)
}
-T7116.dr :: GHC.Types.Double -> GHC.Types.Double
+dr :: Double -> Double
[GblId,
Arity=1,
Caf=NoCafRefs,
@@ -28,13 +28,13 @@ T7116.dr :: GHC.Types.Double -> GHC.Types.Double
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= \ (x [Occ=Once!] :: GHC.Types.Double) ->
+ Tmpl= \ (x [Occ=Once!] :: Double) ->
case x of _ [Occ=Dead] { GHC.Types.D# x1 ->
GHC.Types.D# (GHC.Prim.+## x1 x1)
}}]
-T7116.dr = T7116.dl
+dr = dl
-T7116.fl :: GHC.Types.Float -> GHC.Types.Float
+fl :: Float -> Float
[GblId,
Arity=1,
Caf=NoCafRefs,
@@ -42,17 +42,17 @@ T7116.fl :: GHC.Types.Float -> GHC.Types.Float
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= \ (x [Occ=Once!] :: GHC.Types.Float) ->
+ Tmpl= \ (x [Occ=Once!] :: Float) ->
case x of _ [Occ=Dead] { GHC.Types.F# y ->
GHC.Types.F# (GHC.Prim.plusFloat# y y)
}}]
-T7116.fl =
- \ (x :: GHC.Types.Float) ->
+fl =
+ \ (x :: Float) ->
case x of _ [Occ=Dead] { GHC.Types.F# y ->
GHC.Types.F# (GHC.Prim.plusFloat# y y)
}
-T7116.fr :: GHC.Types.Float -> GHC.Types.Float
+fr :: Float -> Float
[GblId,
Arity=1,
Caf=NoCafRefs,
@@ -60,11 +60,11 @@ T7116.fr :: GHC.Types.Float -> GHC.Types.Float
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= \ (x [Occ=Once!] :: GHC.Types.Float) ->
+ Tmpl= \ (x [Occ=Once!] :: Float) ->
case x of _ [Occ=Dead] { GHC.Types.F# x1 ->
GHC.Types.F# (GHC.Prim.plusFloat# x1 x1)
}}]
-T7116.fr = T7116.fl
+fr = fl
diff --git a/testsuite/tests/parser/should_compile/T2245.stderr b/testsuite/tests/parser/should_compile/T2245.stderr
index 3a5f21ad21..53b738832f 100644
--- a/testsuite/tests/parser/should_compile/T2245.stderr
+++ b/testsuite/tests/parser/should_compile/T2245.stderr
@@ -11,12 +11,12 @@ T2245.hs:5:10: Warning:
‘fromRational’ and (either ‘recip’ or ‘/’)
In the instance declaration for ‘Fractional T’
-T2245.hs:7:38: Warning:
+T2245.hs:7:29: Warning:
Defaulting the following constraint(s) to type ‘T’
- (Read b0) arising from a use of ‘read’ at T2245.hs:7:38-41
- (Ord b0) arising from a use of ‘<’ at T2245.hs:7:27
(Fractional b0)
arising from the literal ‘1e400’ at T2245.hs:7:29-33
- In the second argument of ‘(.)’, namely ‘read’
+ (Ord b0) arising from a use of ‘<’ at T2245.hs:7:27
+ (Read b0) arising from a use of ‘read’ at T2245.hs:7:38-41
+ In the second argument of ‘(<)’, namely ‘1e400’
+ In the first argument of ‘(.)’, namely ‘(< 1e400)’
In the second argument of ‘(.)’, namely ‘(< 1e400) . read’
- In the second argument of ‘($)’, namely ‘show . (< 1e400) . read’
diff --git a/testsuite/tests/perf/compiler/T5837.hs b/testsuite/tests/perf/compiler/T5837.hs
index c2d0f10366..1dc3c33cd9 100644
--- a/testsuite/tests/perf/compiler/T5837.hs
+++ b/testsuite/tests/perf/compiler/T5837.hs
@@ -7,3 +7,17 @@ type instance TF (a,b) = (TF a, TF b)
t :: (a ~ TF (a,Int)) => Int
t = undefined
+
+{-
+
+ [G] a ~ TF (a,Int)
+-->
+ TF (a,Int) ~ fsk
+ fsk ~ a
+--->
+ fsk ~ (TF a, TF Int)
+ fsk ~ a
+--->
+ a ~ (TF a, TF Int)
+
+-} \ No newline at end of file
diff --git a/testsuite/tests/perf/compiler/T5837.stderr b/testsuite/tests/perf/compiler/T5837.stderr
index 56d8ec9cb6..193bff1728 100644
--- a/testsuite/tests/perf/compiler/T5837.stderr
+++ b/testsuite/tests/perf/compiler/T5837.stderr
@@ -2,160 +2,160 @@
T5837.hs:8:6:
Type function application stack overflow; size = 51
Use -ftype-function-depth=N to increase stack size to N
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- a)))))))))))))))))))))))))))))))))))))))))))))))))),
- TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- Int)))))))))))))))))))))))))))))))))))))))))))))))))))
- ~ TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- (TF
- a)))))))))))))))))))))))))))))))))))))))))))))))))
+ TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ a)))))))))))))))))))))))))))))))))))))))))))))))))
+ ~ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ a)))))))))))))))))))))))))))))))))))))))))))))))))),
+ TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ (TF
+ Int)))))))))))))))))))))))))))))))))))))))))))))))))))
In the ambiguity check for: forall a. (a ~ TF (a, Int)) => Int
In the type signature for ‘t’: t :: (a ~ TF (a, Int)) => Int
diff --git a/testsuite/tests/polykinds/T7438.stderr b/testsuite/tests/polykinds/T7438.stderr
index b84465545f..4616576e0d 100644
--- a/testsuite/tests/polykinds/T7438.stderr
+++ b/testsuite/tests/polykinds/T7438.stderr
@@ -1,19 +1,19 @@
-
-T7438.hs:6:14:
- Couldn't match expected type ‘t1’ with actual type ‘t’
- ‘t’ is untouchable
- inside the constraints (t2 ~ t3)
- bound by a pattern with constructor
- Nil :: forall (k :: BOX) (b :: k). Thrist b b,
- in an equation for ‘go’
- at T7438.hs:6:4-6
- ‘t’ is a rigid type variable bound by
- the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
- Possible fix: add a type signature for ‘go’
- Relevant bindings include
- acc :: t (bound at T7438.hs:6:8)
- go :: Thrist t2 t3 -> t -> t1 (bound at T7438.hs:6:1)
- In the expression: acc
- In an equation for ‘go’: go Nil acc = acc
+
+T7438.hs:6:14:
+ Couldn't match expected type ‘t1’ with actual type ‘t’
+ ‘t’ is untouchable
+ inside the constraints (t2 ~ t3)
+ bound by a pattern with constructor
+ Nil :: forall (k :: BOX) (b :: k). Thrist b b,
+ in an equation for ‘go’
+ at T7438.hs:6:4-6
+ ‘t’ is a rigid type variable bound by
+ the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
+ ‘t1’ is a rigid type variable bound by
+ the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
+ Possible fix: add a type signature for ‘go’
+ Relevant bindings include
+ acc :: t (bound at T7438.hs:6:8)
+ go :: Thrist t2 t3 -> t -> t1 (bound at T7438.hs:6:1)
+ In the expression: acc
+ In an equation for ‘go’: go Nil acc = acc
diff --git a/testsuite/tests/polykinds/T8132.stderr b/testsuite/tests/polykinds/T8132.stderr
index 3156ec9e93..6c567de60a 100644
--- a/testsuite/tests/polykinds/T8132.stderr
+++ b/testsuite/tests/polykinds/T8132.stderr
@@ -1,4 +1,5 @@
-
-T8132.hs:1:1:
- Typeable instances can only be derived; replace the following instance:
- instance Typeable K -- Defined at T8132.hs:6:10
+
+T8132.hs:6:10:
+ Typeable instances can only be derived
+ Try ‘deriving instance Typeable K’
+ (requires StandaloneDeriving)
diff --git a/testsuite/tests/rebindable/rebindable6.stderr b/testsuite/tests/rebindable/rebindable6.stderr
index 4d22904d6e..a02563f3ca 100644
--- a/testsuite/tests/rebindable/rebindable6.stderr
+++ b/testsuite/tests/rebindable/rebindable6.stderr
@@ -23,16 +23,12 @@ rebindable6.hs:106:17:
return b }
rebindable6.hs:107:17:
- No instance for (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0))
+ No instance for (HasFail ([Prelude.Char] -> t1))
arising from a do statement
- The type variables ‘t0’, ‘t1’ are ambiguous
- Relevant bindings include
- g :: IO (Maybe b) (bound at rebindable6.hs:104:19)
- test_do :: IO a -> IO (Maybe b) -> IO b
- (bound at rebindable6.hs:104:9)
+ The type variable ‘t1’ is ambiguous
Note: there is a potential instance available:
- instance HasBind (IO a -> (a -> IO b) -> IO b)
- -- Defined at rebindable6.hs:47:18
+ instance HasFail (String -> IO a)
+ -- Defined at rebindable6.hs:57:18
In a stmt of a 'do' block: Just (b :: b) <- g
In the expression:
do { f;
diff --git a/testsuite/tests/roles/should_compile/Roles13.stderr b/testsuite/tests/roles/should_compile/Roles13.stderr
index b0dda24f2c..dc03073428 100644
--- a/testsuite/tests/roles/should_compile/Roles13.stderr
+++ b/testsuite/tests/roles/should_compile/Roles13.stderr
@@ -2,18 +2,16 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 5, types: 9, coercions: 5}
-a :: Roles13.Wrap Roles13.Age -> Roles13.Wrap Roles13.Age
+a :: Wrap Age -> Wrap Age
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType]
-a = \ (ds :: Roles13.Wrap Roles13.Age) -> ds
+a = \ (ds :: Wrap Age) -> ds
-Roles13.convert :: Roles13.Wrap Roles13.Age -> GHC.Types.Int
+convert :: Wrap Age -> Int
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType]
-Roles13.convert =
+convert =
a
- `cast` (<Roles13.Wrap Roles13.Age>_R
- -> Roles13.NTCo:Wrap[0] Roles13.NTCo:Age[0]
- :: (Roles13.Wrap Roles13.Age -> Roles13.Wrap Roles13.Age)
- ~R# (Roles13.Wrap Roles13.Age -> GHC.Types.Int))
+ `cast` (<Wrap Age>_R -> Roles13.NTCo:Wrap[0] Roles13.NTCo:Age[0]
+ :: (Wrap Age -> Wrap Age) ~R# (Wrap Age -> Int))
diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr
index 10ab093442..558b360604 100644
--- a/testsuite/tests/roles/should_compile/T8958.stderr
+++ b/testsuite/tests/roles/should_compile/T8958.stderr
@@ -1,41 +1,36 @@
-
-T8958.hs:1:31: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-TYPE SIGNATURES
-TYPE CONSTRUCTORS
- type role Map nominal representational
- newtype (Nominal k, Representational v) => Map k v = MkMap [(k, v)]
- Promotable
- class Nominal a
- type role Representational representational
- class Representational a
-COERCION AXIOMS
- axiom T8958.NTCo:Map :: Map k v = [(k, v)]
-INSTANCES
- instance [incoherent] Nominal a -- Defined at T8958.hs:7:10
- instance [incoherent] Representational a
- -- Defined at T8958.hs:10:10
-Dependent modules: []
-Dependent packages: [base-4.8.0.0, ghc-prim-0.3.1.0,
- integer-<IMPL>-<VERSION>]
-
-==================== Typechecker ====================
-AbsBinds [a] []
- {Exports: [T8958.$fRepresentationala <= $dRepresentational
- <>]
- Exported types: T8958.$fRepresentationala [InlPrag=[ALWAYS] CONLIKE]
- :: forall a. Representational a
- [LclIdX[DFunId],
- Str=DmdType,
- Unf=DFun: \ (@ a) -> T8958.D:Representational TYPE a]
- Binds: $dRepresentational = T8958.D:Representational}
-AbsBinds [a] []
- {Exports: [T8958.$fNominala <= $dNominal
- <>]
- Exported types: T8958.$fNominala [InlPrag=[ALWAYS] CONLIKE]
- :: forall a. Nominal a
- [LclIdX[DFunId],
- Str=DmdType,
- Unf=DFun: \ (@ a) -> T8958.D:Nominal TYPE a]
- Binds: $dNominal = T8958.D:Nominal}
-
+
+T8958.hs:1:31: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+TYPE SIGNATURES
+TYPE CONSTRUCTORS
+ type role Map nominal representational
+ newtype (Nominal k, Representational v) => Map k v = MkMap [(k, v)]
+ Promotable
+ class Nominal a
+ type role Representational representational
+ class Representational a
+COERCION AXIOMS
+ axiom T8958.NTCo:Map :: Map k v = [(k, v)]
+INSTANCES
+ instance [incoherent] Nominal a -- Defined at T8958.hs:7:10
+ instance [incoherent] Representational a
+ -- Defined at T8958.hs:10:10
+Dependent modules: []
+Dependent packages: [base-4.8.0.0, ghc-prim-0.3.1.0,
+ integer-gmp-0.5.1.0]
+
+==================== Typechecker ====================
+AbsBinds [a] []
+ {Exports: [T8958.$fRepresentationala <= $dRepresentational
+ <>]
+ Exported types: T8958.$fRepresentationala
+ :: forall a. Representational a
+ [LclIdX[DFunId], Str=DmdType]
+ Binds: $dRepresentational = T8958.D:Representational}
+AbsBinds [a] []
+ {Exports: [T8958.$fNominala <= $dNominal
+ <>]
+ Exported types: T8958.$fNominala :: forall a. Nominal a
+ [LclIdX[DFunId], Str=DmdType]
+ Binds: $dNominal = T8958.D:Nominal}
+
diff --git a/testsuite/tests/simplCore/should_compile/EvalTest.stdout b/testsuite/tests/simplCore/should_compile/EvalTest.stdout
index 25ed3203f5..8bc22a42f2 100644
--- a/testsuite/tests/simplCore/should_compile/EvalTest.stdout
+++ b/testsuite/tests/simplCore/should_compile/EvalTest.stdout
@@ -1 +1 @@
-rght [Dmd=<S,U>] :: EvalTest.AList a1
+rght [Dmd=<S,U>] :: AList a1
diff --git a/testsuite/tests/simplCore/should_compile/T3717.stderr b/testsuite/tests/simplCore/should_compile/T3717.stderr
index 21e822b318..7cc1abe5dc 100644
--- a/testsuite/tests/simplCore/should_compile/T3717.stderr
+++ b/testsuite/tests/simplCore/should_compile/T3717.stderr
@@ -14,7 +14,7 @@ T3717.$wfoo =
}
end Rec }
-T3717.foo [InlPrag=INLINE[0]] :: GHC.Types.Int -> GHC.Types.Int
+foo [InlPrag=INLINE[0]] :: Int -> Int
[GblId,
Arity=1,
Caf=NoCafRefs,
@@ -22,12 +22,12 @@ T3717.foo [InlPrag=INLINE[0]] :: GHC.Types.Int -> GHC.Types.Int
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= \ (w [Occ=Once!] :: GHC.Types.Int) ->
+ Tmpl= \ (w [Occ=Once!] :: Int) ->
case w of _ [Occ=Dead] { GHC.Types.I# ww1 [Occ=Once] ->
case T3717.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 }
}}]
-T3717.foo =
- \ (w :: GHC.Types.Int) ->
+foo =
+ \ (w :: Int) ->
case w of _ [Occ=Dead] { GHC.Types.I# ww1 ->
case T3717.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 }
}
diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout
index 506e342012..6609024183 100644
--- a/testsuite/tests/simplCore/should_compile/T3772.stdout
+++ b/testsuite/tests/simplCore/should_compile/T3772.stdout
@@ -13,15 +13,14 @@ $wxs =
}
end Rec }
-T3772.foo [InlPrag=NOINLINE] :: GHC.Types.Int -> ()
+foo [InlPrag=NOINLINE] :: Int -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U(U)>]
-T3772.foo =
- \ (n :: GHC.Types.Int) ->
+foo =
+ \ (n :: Int) ->
case n of _ [Occ=Dead] { GHC.Types.I# y ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# 0 y)
- of _ [Occ=Dead] {
- GHC.Types.False -> GHC.Tuple.();
- GHC.Types.True -> $wxs y
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# 0 y) of _ [Occ=Dead] {
+ False -> GHC.Tuple.();
+ True -> $wxs y
}
}
diff --git a/testsuite/tests/simplCore/should_compile/T4201.stdout b/testsuite/tests/simplCore/should_compile/T4201.stdout
index 6ff4692854..51b159627e 100644
--- a/testsuite/tests/simplCore/should_compile/T4201.stdout
+++ b/testsuite/tests/simplCore/should_compile/T4201.stdout
@@ -1,3 +1,3 @@
{- Arity: 1, HasNoCafRefs, Strictness: <S,1*U()>m,
Unfolding: InlineRule (0, True, True)
- Eta.bof `cast` (Sym (Eta.NTCo:Foo[0]) ->_R <Eta.T>_R) -}
+ bof `cast` (Sym (NTCo:Foo[0]) ->_R <T>_R) -}
diff --git a/testsuite/tests/simplCore/should_compile/T4306.stdout b/testsuite/tests/simplCore/should_compile/T4306.stdout
index b2a93ff1cc..3d52e94830 100644
--- a/testsuite/tests/simplCore/should_compile/T4306.stdout
+++ b/testsuite/tests/simplCore/should_compile/T4306.stdout
@@ -1 +1 @@
- $wupd :: GHC.Prim.Double# -> GHC.Prim.Double#
+ $wupd :: Double# -> Double#
diff --git a/testsuite/tests/simplCore/should_compile/T4908.stderr b/testsuite/tests/simplCore/should_compile/T4908.stderr
index 9729289ea6..7cc25b9f06 100644
--- a/testsuite/tests/simplCore/should_compile/T4908.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4908.stderr
@@ -3,27 +3,21 @@
Result size of Tidy Core = {terms: 54, types: 38, coercions: 0}
Rec {
-T4908.f_$s$wf [Occ=LoopBreaker]
- :: GHC.Prim.Int#
- -> GHC.Types.Int -> GHC.Prim.Int# -> GHC.Types.Bool
+T4908.f_$s$wf [Occ=LoopBreaker] :: Int# -> Int -> Int# -> Bool
[GblId, Arity=3, Caf=NoCafRefs, Str=DmdType <S,1*U><L,A><L,U>]
T4908.f_$s$wf =
- \ (sc :: GHC.Prim.Int#)
- (sc1 :: GHC.Types.Int)
- (sc2 :: GHC.Prim.Int#) ->
+ \ (sc :: Int#) (sc1 :: Int) (sc2 :: Int#) ->
case sc of ds {
__DEFAULT ->
case sc2 of ds1 {
- __DEFAULT -> T4908.f_$s$wf (GHC.Prim.-# ds 1) sc1 ds1;
+ __DEFAULT -> T4908.f_$s$wf (-# ds 1) sc1 ds1;
0 -> GHC.Types.True
};
0 -> GHC.Types.True
}
end Rec }
-T4908.$wf [InlPrag=[0]]
- :: GHC.Prim.Int#
- -> (GHC.Types.Int, GHC.Types.Int) -> GHC.Types.Bool
+T4908.$wf [InlPrag=[0]] :: Int# -> (Int, Int) -> Bool
[GblId,
Arity=2,
Caf=NoCafRefs,
@@ -31,13 +25,13 @@ T4908.$wf [InlPrag=[0]]
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [30 20] 101 20}]
T4908.$wf =
- \ (ww :: GHC.Prim.Int#) (w :: (GHC.Types.Int, GHC.Types.Int)) ->
+ \ (ww :: Int#) (w :: (Int, Int)) ->
case ww of ds {
__DEFAULT ->
case w of _ [Occ=Dead] { (a, b) ->
- case b of _ [Occ=Dead] { GHC.Types.I# ds1 ->
+ case b of _ [Occ=Dead] { I# ds1 ->
case ds1 of ds2 {
- __DEFAULT -> T4908.f_$s$wf (GHC.Prim.-# ds 1) a ds2;
+ __DEFAULT -> T4908.f_$s$wf (-# ds 1) a ds2;
0 -> GHC.Types.True
}
}
@@ -45,9 +39,7 @@ T4908.$wf =
0 -> GHC.Types.True
}
-T4908.f [InlPrag=INLINE[0]]
- :: GHC.Types.Int
- -> (GHC.Types.Int, GHC.Types.Int) -> GHC.Types.Bool
+f [InlPrag=INLINE[0]] :: Int -> (Int, Int) -> Bool
[GblId,
Arity=2,
Caf=NoCafRefs,
@@ -55,21 +47,16 @@ T4908.f [InlPrag=INLINE[0]]
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
- Tmpl= \ (w [Occ=Once!] :: GHC.Types.Int)
- (w1 [Occ=Once] :: (GHC.Types.Int, GHC.Types.Int)) ->
- case w of _ [Occ=Dead] { GHC.Types.I# ww1 [Occ=Once] ->
- T4908.$wf ww1 w1
- }}]
-T4908.f =
- \ (w :: GHC.Types.Int) (w1 :: (GHC.Types.Int, GHC.Types.Int)) ->
- case w of _ [Occ=Dead] { GHC.Types.I# ww1 -> T4908.$wf ww1 w1 }
+ Tmpl= \ (w [Occ=Once!] :: Int) (w1 [Occ=Once] :: (Int, Int)) ->
+ case w of _ [Occ=Dead] { I# ww1 [Occ=Once] -> T4908.$wf ww1 w1 }}]
+f =
+ \ (w :: Int) (w1 :: (Int, Int)) ->
+ case w of _ [Occ=Dead] { I# ww1 -> T4908.$wf ww1 w1 }
------ Local rules for imported ids --------
"SC:$wf0" [0]
- forall (sc :: GHC.Prim.Int#)
- (sc1 :: GHC.Types.Int)
- (sc2 :: GHC.Prim.Int#).
+ forall (sc :: Int#) (sc1 :: Int) (sc2 :: Int#).
T4908.$wf sc (sc1, GHC.Types.I# sc2)
= T4908.f_$s$wf sc sc1 sc2
diff --git a/testsuite/tests/simplCore/should_compile/T4918.stdout b/testsuite/tests/simplCore/should_compile/T4918.stdout
index 708be353c4..b0a072d2b0 100644
--- a/testsuite/tests/simplCore/should_compile/T4918.stdout
+++ b/testsuite/tests/simplCore/should_compile/T4918.stdout
@@ -1,2 +1,2 @@
- {- HasNoCafRefs, Strictness: m, Unfolding: (GHC.Types.C# 'p') -}
- {- HasNoCafRefs, Strictness: m, Unfolding: (GHC.Types.C# 'q') -}
+ {- HasNoCafRefs, Strictness: m, Unfolding: (C# 'p') -}
+ {- HasNoCafRefs, Strictness: m, Unfolding: (C# 'q') -}
diff --git a/testsuite/tests/simplCore/should_compile/T4930.stderr b/testsuite/tests/simplCore/should_compile/T4930.stderr
index 5f0aad2525..1a54d0d5bc 100644
--- a/testsuite/tests/simplCore/should_compile/T4930.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4930.stderr
@@ -2,36 +2,34 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 23, types: 11, coercions: 0}
-lvl :: [GHC.Types.Char]
+lvl :: [Char]
[GblId, Str=DmdType]
lvl = GHC.CString.unpackCString# "Too small"#
-T4930.foo1 :: GHC.Types.Int
+T4930.foo1 :: Int
[GblId, Str=DmdType b]
-T4930.foo1 = GHC.Err.error @ GHC.Types.Int lvl
+T4930.foo1 = error @ Int lvl
-T4930.foo :: GHC.Types.Int -> GHC.Types.Int
+foo :: Int -> Int
[GblId,
Arity=1,
Str=DmdType <S,1*U(U)>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= \ (n [Occ=Once!] :: GHC.Types.Int) ->
+ Tmpl= \ (n [Occ=Once!] :: Int) ->
case n of _ [Occ=Dead] { GHC.Types.I# x ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x 5)
- of _ [Occ=Dead] {
- GHC.Types.False -> GHC.Types.I# (GHC.Prim.+# x 5);
- GHC.Types.True -> T4930.foo1
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x 5) of _ [Occ=Dead] {
+ False -> GHC.Types.I# (GHC.Prim.+# x 5);
+ True -> T4930.foo1
}
}}]
-T4930.foo =
- \ (n :: GHC.Types.Int) ->
+foo =
+ \ (n :: Int) ->
case n of _ [Occ=Dead] { GHC.Types.I# x ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x 5)
- of _ [Occ=Dead] {
- GHC.Types.False -> GHC.Types.I# (GHC.Prim.+# x 5);
- GHC.Types.True -> T4930.foo1
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x 5) of _ [Occ=Dead] {
+ False -> GHC.Types.I# (GHC.Prim.+# x 5);
+ True -> T4930.foo1
}
}
diff --git a/testsuite/tests/simplCore/should_compile/T5366.stdout b/testsuite/tests/simplCore/should_compile/T5366.stdout
index ccc1561d05..df0f9ba05d 100644
--- a/testsuite/tests/simplCore/should_compile/T5366.stdout
+++ b/testsuite/tests/simplCore/should_compile/T5366.stdout
@@ -1 +1 @@
- case ds of _ [Occ=Dead] { T5366.Bar dt dt1 -> GHC.Types.I# dt }
+ case ds of _ [Occ=Dead] { Bar dt dt1 -> GHC.Types.I# dt }
diff --git a/testsuite/tests/simplCore/should_compile/T6056.stderr b/testsuite/tests/simplCore/should_compile/T6056.stderr
index 50c7e66f0a..d9d4193785 100644
--- a/testsuite/tests/simplCore/should_compile/T6056.stderr
+++ b/testsuite/tests/simplCore/should_compile/T6056.stderr
@@ -8,5 +8,6 @@ Rule fired: SPEC/T6056 $wsmallerAndRest @ Integer
Rule fired: SPEC/T6056 $wsmallerAndRest @ Integer
Rule fired: SPEC/T6056 $wsmallerAndRest @ Int
Rule fired: SPEC/T6056 $wsmallerAndRest @ Int
-Rule fired: SPEC/T6056 $wsmallerAndRest @ Integer
Rule fired: SPEC/T6056 $wsmallerAndRest @ Int
+Rule fired: SPEC/T6056 $wsmallerAndRest @ Integer
+
diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr
index 5d10285099..2cd7c2100e 100644
--- a/testsuite/tests/simplCore/should_compile/T7360.stderr
+++ b/testsuite/tests/simplCore/should_compile/T7360.stderr
@@ -2,7 +2,7 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 36, types: 29, coercions: 0}
-T7360.$WFoo3 [InlPrag=INLINE] :: GHC.Types.Int -> T7360.Foo
+T7360.$WFoo3 [InlPrag=INLINE] :: Int -> Foo
[GblId[DataConWrapper],
Arity=1,
Caf=NoCafRefs,
@@ -10,20 +10,20 @@ T7360.$WFoo3 [InlPrag=INLINE] :: GHC.Types.Int -> T7360.Foo
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=False,boring_ok=False)
- Tmpl= \ (dt [Occ=Once!] :: GHC.Types.Int) ->
+ Tmpl= \ (dt [Occ=Once!] :: Int) ->
case dt of _ [Occ=Dead] { GHC.Types.I# dt [Occ=Once] ->
T7360.Foo3 dt
}}]
T7360.$WFoo3 =
- \ (dt [Occ=Once!] :: GHC.Types.Int) ->
+ \ (dt [Occ=Once!] :: Int) ->
case dt of _ [Occ=Dead] { GHC.Types.I# dt [Occ=Once] ->
T7360.Foo3 dt
}
-T7360.fun1 [InlPrag=NOINLINE] :: T7360.Foo -> ()
+fun1 [InlPrag=NOINLINE] :: Foo -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>]
-T7360.fun1 =
- \ (x :: T7360.Foo) ->
+fun1 =
+ \ (x :: Foo) ->
case x of _ [Occ=Dead] { __DEFAULT -> GHC.Tuple.() }
T7360.fun4 :: ()
@@ -31,9 +31,9 @@ T7360.fun4 :: ()
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 20 0}]
-T7360.fun4 = T7360.fun1 T7360.Foo1
+T7360.fun4 = fun1 T7360.Foo1
-T7360.fun3 :: GHC.Types.Int
+T7360.fun3 :: Int
[GblId,
Caf=NoCafRefs,
Str=DmdType m,
@@ -41,7 +41,7 @@ T7360.fun3 :: GHC.Types.Int
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
T7360.fun3 = GHC.Types.I# 0
-T7360.fun2 :: forall a. [a] -> ((), GHC.Types.Int)
+fun2 :: forall a. [a] -> ((), Int)
[GblId,
Arity=1,
Str=DmdType <L,1*U>m,
@@ -57,7 +57,7 @@ T7360.fun2 :: forall a. [a] -> ((), GHC.Types.Int)
GHC.Types.I# ww2
}
})}]
-T7360.fun2 =
+fun2 =
\ (@ a) (x :: [a]) ->
(T7360.fun4,
case x of wild {
diff --git a/testsuite/tests/simplCore/should_compile/T7865.stdout b/testsuite/tests/simplCore/should_compile/T7865.stdout
index 93c495d1d7..56419a939c 100644
--- a/testsuite/tests/simplCore/should_compile/T7865.stdout
+++ b/testsuite/tests/simplCore/should_compile/T7865.stdout
@@ -1,4 +1,4 @@
-T7865.expensive [InlPrag=NOINLINE]
-T7865.expensive =
- case T7865.expensive sc of _ [Occ=Dead] { GHC.Types.I# x ->
- (case T7865.expensive x of _ [Occ=Dead] { GHC.Types.I# x1 ->
+expensive [InlPrag=NOINLINE] :: Int -> Int
+expensive =
+ case expensive sc of _ [Occ=Dead] { GHC.Types.I# x ->
+ (case expensive x of _ [Occ=Dead] { GHC.Types.I# x1 ->
diff --git a/testsuite/tests/simplCore/should_compile/T8832.stdout b/testsuite/tests/simplCore/should_compile/T8832.stdout
index 271963122d..aefe486c0c 100644
--- a/testsuite/tests/simplCore/should_compile/T8832.stdout
+++ b/testsuite/tests/simplCore/should_compile/T8832.stdout
@@ -1,10 +1,10 @@
-T8832.i = GHC.Types.I# 0
-T8832.i8 = GHC.Int.I8# 0
-T8832.i16 = GHC.Int.I16# 0
-T8832.i32 = GHC.Int.I32# 0
-T8832.i64 = GHC.Int.I64# 0
-T8832.w = GHC.Types.W# (__word 0)
-T8832.w8 = GHC.Word.W8# (__word 0)
-T8832.w16 = GHC.Word.W16# (__word 0)
-T8832.w32 = GHC.Word.W32# (__word 0)
-T8832.w64 = GHC.Word.W64# (__word 0)
+i = GHC.Types.I# 0
+i8 = GHC.Int.I8# 0
+i16 = GHC.Int.I16# 0
+i32 = GHC.Int.I32# 0
+i64 = GHC.Int.I64# 0
+w = GHC.Types.W# (__word 0)
+w8 = GHC.Word.W8# (__word 0)
+w16 = GHC.Word.W16# (__word 0)
+w32 = GHC.Word.W32# (__word 0)
+w64 = GHC.Word.W64# (__word 0)
diff --git a/testsuite/tests/simplCore/should_compile/T8832.stdout-ws-32 b/testsuite/tests/simplCore/should_compile/T8832.stdout-ws-32
index d09293705f..2a3238ce0c 100644
--- a/testsuite/tests/simplCore/should_compile/T8832.stdout-ws-32
+++ b/testsuite/tests/simplCore/should_compile/T8832.stdout-ws-32
@@ -1,8 +1,8 @@
-T8832.i = GHC.Types.I# 0
-T8832.i8 = GHC.Int.I8# 0
-T8832.i16 = GHC.Int.I16# 0
-T8832.i32 = GHC.Int.I32# 0
-T8832.w = GHC.Types.W# (__word 0)
-T8832.w8 = GHC.Word.W8# (__word 0)
-T8832.w16 = GHC.Word.W16# (__word 0)
-T8832.w32 = GHC.Word.W32# (__word 0)
+i = GHC.Types.I# 0
+i8 = GHC.Int.I8# 0
+i16 = GHC.Int.I16# 0
+i32 = GHC.Int.I32# 0
+w = GHC.Types.W# (__word 0)
+w8 = GHC.Word.W8# (__word 0)
+w16 = GHC.Word.W16# (__word 0)
+w32 = GHC.Word.W32# (__word 0)
diff --git a/testsuite/tests/simplCore/should_compile/T9400.stderr b/testsuite/tests/simplCore/should_compile/T9400.stderr
index e66eecfc0a..938a07204b 100644
--- a/testsuite/tests/simplCore/should_compile/T9400.stderr
+++ b/testsuite/tests/simplCore/should_compile/T9400.stderr
@@ -2,35 +2,35 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 23, types: 16, coercions: 0}
-T9400.main :: GHC.Types.IO ()
+main :: IO ()
[GblId, Str=DmdType]
-T9400.main =
- GHC.Base.>>
- @ GHC.Types.IO
+main =
+ >>
+ @ IO
GHC.Base.$fMonadIO
@ ()
@ ()
- (System.IO.putStrLn (GHC.CString.unpackCString# "c"#))
- (GHC.Base.>>
- @ GHC.Types.IO
+ (putStrLn (unpackCString# "c"#))
+ (>>
+ @ IO
GHC.Base.$fMonadIO
@ ()
@ ()
- (System.IO.putStrLn (GHC.CString.unpackCString# "x"#))
- (GHC.Base.>>
- @ GHC.Types.IO
+ (putStrLn (unpackCString# "x"#))
+ (>>
+ @ IO
GHC.Base.$fMonadIO
@ ()
@ ()
- (System.IO.putStrLn (GHC.CString.unpackCString# "z"#))
- (GHC.Base.>>
- @ GHC.Types.IO
+ (putStrLn (unpackCString# "z"#))
+ (>>
+ @ IO
GHC.Base.$fMonadIO
@ ()
@ ()
- (System.IO.putStrLn (GHC.CString.unpackCString# "efg"#))
+ (putStrLn (unpackCString# "efg"#))
(Control.Exception.Base.patError
- @ (GHC.Types.IO ()) "T9400.hs:(17,5)-(18,29)|case"#))))
+ @ (IO ()) "T9400.hs:(17,5)-(18,29)|case"#))))
diff --git a/testsuite/tests/simplCore/should_compile/rule2.stderr b/testsuite/tests/simplCore/should_compile/rule2.stderr
index 2c29fa40d5..a9f3a3b0f7 100644
--- a/testsuite/tests/simplCore/should_compile/rule2.stderr
+++ b/testsuite/tests/simplCore/should_compile/rule2.stderr
@@ -22,7 +22,7 @@ Total ticks: 11
1 m
1 a
1 m
- 1 a
+ 1 b
1 m
1 b
9 SimplifierDone 9
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
index aee86c36fa..29c8a91301 100644
--- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr
+++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
@@ -2,11 +2,11 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 162, types: 61, coercions: 0}
-Roman.foo3 :: GHC.Types.Int
+Roman.foo3 :: Int
[GblId, Str=DmdType b]
Roman.foo3 =
Control.Exception.Base.patError
- @ GHC.Types.Int "spec-inline.hs:(19,5)-(29,25)|function go"#
+ @ Int "spec-inline.hs:(19,5)-(29,25)|function go"#
Rec {
Roman.foo_$s$wgo [Occ=LoopBreaker]
@@ -24,38 +24,34 @@ Roman.foo_$s$wgo =
(GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc1 sc1) sc1) sc1) sc1)
sc1)
sc1 } in
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# sc 0)
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# sc 0)
of _ [Occ=Dead] {
- GHC.Types.False ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# sc 100)
+ False ->
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# sc 100)
of _ [Occ=Dead] {
- GHC.Types.False ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# sc 500)
+ False ->
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# sc 500)
of _ [Occ=Dead] {
- GHC.Types.False ->
- Roman.foo_$s$wgo (GHC.Prim.-# sc 1) (GHC.Prim.+# a a);
- GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 3) a
+ False -> Roman.foo_$s$wgo (GHC.Prim.-# sc 1) (GHC.Prim.+# a a);
+ True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 3) a
};
- GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 2) sc1
+ True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 2) sc1
};
- GHC.Types.True -> 0
+ True -> 0
}
end Rec }
-Roman.$wgo [InlPrag=[0]]
- :: GHC.Base.Maybe GHC.Types.Int
- -> GHC.Base.Maybe GHC.Types.Int -> GHC.Prim.Int#
+Roman.$wgo [InlPrag=[0]] :: Maybe Int -> Maybe Int -> GHC.Prim.Int#
[GblId,
Arity=2,
Str=DmdType <S,1*U><S,1*U>,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 30] 256 0}]
Roman.$wgo =
- \ (w :: GHC.Base.Maybe GHC.Types.Int)
- (w1 :: GHC.Base.Maybe GHC.Types.Int) ->
+ \ (w :: Maybe Int) (w1 :: Maybe Int) ->
case w1 of _ [Occ=Dead] {
- GHC.Base.Nothing -> case Roman.foo3 of wild1 { };
- GHC.Base.Just x ->
+ Nothing -> case Roman.foo3 of wild1 { };
+ Just x ->
case x of _ [Occ=Dead] { GHC.Types.I# ipv ->
let {
a :: GHC.Prim.Int#
@@ -68,48 +64,43 @@ Roman.$wgo =
ipv)
ipv } in
case w of _ [Occ=Dead] {
- GHC.Base.Nothing -> Roman.foo_$s$wgo 10 a;
- GHC.Base.Just n ->
+ Nothing -> Roman.foo_$s$wgo 10 a;
+ Just n ->
case n of _ [Occ=Dead] { GHC.Types.I# x2 ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x2 0)
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# x2 0)
of _ [Occ=Dead] {
- GHC.Types.False ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x2 100)
+ False ->
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x2 100)
of _ [Occ=Dead] {
- GHC.Types.False ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x2 500)
+ False ->
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x2 500)
of _ [Occ=Dead] {
- GHC.Types.False ->
- Roman.foo_$s$wgo (GHC.Prim.-# x2 1) (GHC.Prim.+# a a);
- GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 3) a
+ False -> Roman.foo_$s$wgo (GHC.Prim.-# x2 1) (GHC.Prim.+# a a);
+ True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 3) a
};
- GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 2) ipv
+ True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 2) ipv
};
- GHC.Types.True -> 0
+ True -> 0
}
}
}
}
}
-Roman.foo_go [InlPrag=INLINE[0]]
- :: GHC.Base.Maybe GHC.Types.Int
- -> GHC.Base.Maybe GHC.Types.Int -> GHC.Types.Int
+Roman.foo_go [InlPrag=INLINE[0]] :: Maybe Int -> Maybe Int -> Int
[GblId,
Arity=2,
Str=DmdType <S,1*U><S,1*U>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
- Tmpl= \ (w [Occ=Once] :: GHC.Base.Maybe GHC.Types.Int)
- (w1 [Occ=Once] :: GHC.Base.Maybe GHC.Types.Int) ->
+ Tmpl= \ (w [Occ=Once] :: Maybe Int) (w1 [Occ=Once] :: Maybe Int) ->
case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }}]
Roman.foo_go =
- \ (w :: GHC.Base.Maybe GHC.Types.Int)
- (w1 :: GHC.Base.Maybe GHC.Types.Int) ->
+ \ (w :: Maybe Int) (w1 :: Maybe Int) ->
case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }
-Roman.foo2 :: GHC.Types.Int
+Roman.foo2 :: Int
[GblId,
Caf=NoCafRefs,
Str=DmdType m,
@@ -117,15 +108,15 @@ Roman.foo2 :: GHC.Types.Int
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Roman.foo2 = GHC.Types.I# 6
-Roman.foo1 :: GHC.Base.Maybe GHC.Types.Int
+Roman.foo1 :: Maybe Int
[GblId,
Caf=NoCafRefs,
Str=DmdType m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
-Roman.foo1 = GHC.Base.Just @ GHC.Types.Int Roman.foo2
+Roman.foo1 = GHC.Base.Just @ Int Roman.foo2
-Roman.foo :: GHC.Types.Int -> GHC.Types.Int
+foo :: Int -> Int
[GblId,
Arity=1,
Caf=NoCafRefs,
@@ -133,12 +124,12 @@ Roman.foo :: GHC.Types.Int -> GHC.Types.Int
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= \ (n [Occ=Once!] :: GHC.Types.Int) ->
+ Tmpl= \ (n [Occ=Once!] :: Int) ->
case n of n1 { GHC.Types.I# _ [Occ=Dead] ->
- Roman.foo_go (GHC.Base.Just @ GHC.Types.Int n1) Roman.foo1
+ Roman.foo_go (GHC.Base.Just @ Int n1) Roman.foo1
}}]
-Roman.foo =
- \ (n :: GHC.Types.Int) ->
+foo =
+ \ (n :: Int) ->
case n of _ [Occ=Dead] { GHC.Types.I# ipv ->
case Roman.foo_$s$wgo ipv 6 of ww { __DEFAULT -> GHC.Types.I# ww }
}
@@ -147,8 +138,8 @@ Roman.foo =
------ Local rules for imported ids --------
"SC:$wgo0" [0]
forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#).
- Roman.$wgo (GHC.Base.Just @ GHC.Types.Int (GHC.Types.I# sc))
- (GHC.Base.Just @ GHC.Types.Int (GHC.Types.I# sc1))
+ Roman.$wgo (GHC.Base.Just @ Int (GHC.Types.I# sc))
+ (GHC.Base.Just @ Int (GHC.Types.I# sc1))
= Roman.foo_$s$wgo sc sc1
diff --git a/testsuite/tests/th/T3319.stderr b/testsuite/tests/th/T3319.stderr
index 214b1eff9f..f325ffb8dc 100644
--- a/testsuite/tests/th/T3319.stderr
+++ b/testsuite/tests/th/T3319.stderr
@@ -1,8 +1,8 @@
-T3319.hs:1:1: Splicing declarations
- return
- [ForeignD
- (ImportF
- CCall Unsafe "&" (mkName "foo") (AppT (ConT ''Ptr) (ConT ''())))]
- ======>
- T3319.hs:8:3-93
- foreign import ccall unsafe "static &foo" foo :: Ptr GHC.Tuple.()
+T3319.hs:1:1: Splicing declarations
+ return
+ [ForeignD
+ (ImportF
+ CCall Unsafe "&" (mkName "foo") (AppT (ConT ''Ptr) (ConT ''())))]
+ ======>
+ T3319.hs:8:3-93
+ foreign import ccall unsafe "static &foo" foo :: Ptr GHC.Tuple.()
diff --git a/testsuite/tests/th/T3600.stderr b/testsuite/tests/th/T3600.stderr
index 2cd8332ce9..a7f988416e 100644
--- a/testsuite/tests/th/T3600.stderr
+++ b/testsuite/tests/th/T3600.stderr
@@ -1,5 +1,5 @@
-T3600.hs:1:1: Splicing declarations
- test
- ======>
- T3600.hs:5:3-6
- myFunction = (testFun1 [], testFun2 [], testFun2 "x")
+T3600.hs:1:1: Splicing declarations
+ test
+ ======>
+ T3600.hs:5:3-6
+ myFunction = (testFun1 [], testFun2 [], testFun2 "x")
diff --git a/testsuite/tests/th/T5217.stderr b/testsuite/tests/th/T5217.stderr
index 891bb7f94a..a749282710 100644
--- a/testsuite/tests/th/T5217.stderr
+++ b/testsuite/tests/th/T5217.stderr
@@ -1,14 +1,14 @@
T5217.hs:1:1: Splicing declarations
[d| data T a b
- where
- T1 :: Int -> T Int Char
- T2 :: a -> T a a
- T3 :: a -> T [a] a
- T4 :: a -> b -> T b [a] |]
+ where
+ T1 :: Int -> T Int Char
+ T2 :: a -> T a a
+ T3 :: a -> T [a] a
+ T4 :: a -> b -> T b [a] |]
======>
T5217.hs:(6,3)-(9,53)
data T a b
- = (b ~ Char, a ~ Int) => T1 Int |
- b ~ a => T2 a |
- a ~ [b] => T3 b |
- forall a. b ~ [a] => T4 a a
+ = (b ~ Char, a ~ Int) => T1 Int |
+ b ~ a => T2 a |
+ a ~ [b] => T3 b |
+ forall a. b ~ [a] => T4 a a
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index 2981202300..3b7f86cc75 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -187,7 +187,7 @@ test('T5126', normal, compile, ['-v0'])
test('T5217', normal, compile, ['-v0 -dsuppress-uniques -ddump-splices'])
test('T5037', normal, compile, ['-v0'])
test('TH_unboxedSingleton', normal, compile, ['-v0'])
-test('T5290', normal, compile, ['-v0 -ddump-splices'])
+test('T5290', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('T5362', normal, compile, ['-v0'])
test('TH_unresolvedInfix',
@@ -211,7 +211,7 @@ test('T5452', normal, compile, ['-v0'])
test('T5434', extra_clean(['T5434a.hi','T5434a.o']),
multimod_compile,
['T5434','-v0 -Wall ' + config.ghc_th_way_flags])
-test('T5508', normal, compile, ['-v0 -ddump-splices'])
+test('T5508', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('TH_Depends',
[extra_clean(['TH_Depends_External.o', 'TH_Depends_External.hi',
'TH_Depends_external.txt'])],
@@ -226,7 +226,7 @@ test('T5700', extra_clean(['T5700a.hi','T5700a.o']),
['T5700','-v0 -ddump-splices ' + config.ghc_th_way_flags])
test('T5721', normal, compile, ['-v0'])
-test('TH_PromotedTuple', normal, compile, ['-v0 -ddump-splices'])
+test('TH_PromotedTuple', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('TH_PromotedList', normal, compile, ['-v0'])
test('TH_Promoted1Tuple', normal, compile_fail, ['-v0'])
test('TH_RichKinds', normal, compile, ['-v0'])
diff --git a/testsuite/tests/typecheck/should_compile/FD1.stderr b/testsuite/tests/typecheck/should_compile/FD1.stderr
index 98ed785956..34ea4bff61 100644
--- a/testsuite/tests/typecheck/should_compile/FD1.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD1.stderr
@@ -1,10 +1,6 @@
FD1.hs:16:1:
- Could not deduce (a ~ (Int -> Int))
- from the context (E a (Int -> Int))
- bound by the type signature for
- plus :: E a (Int -> Int) => Int -> a
- at FD1.hs:15:9-38
+ Couldn't match expected type ‘Int -> Int’ with actual type ‘a’
‘a’ is a rigid type variable bound by
the type signature for plus :: E a (Int -> Int) => Int -> a
at FD1.hs:15:9
diff --git a/testsuite/tests/typecheck/should_compile/FD2.stderr b/testsuite/tests/typecheck/should_compile/FD2.stderr
index 691d5b5b84..9ebfabee3b 100644
--- a/testsuite/tests/typecheck/should_compile/FD2.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD2.stderr
@@ -1,17 +1,6 @@
FD2.hs:26:34:
- Could not deduce (e ~ e1)
- from the context (ShouldCompile.Foldable a)
- bound by the class declaration for ‘ShouldCompile.Foldable’
- at FD2.hs:(17,1)-(26,39)
- or from (Elem a e)
- bound by the type signature for
- foldr1 :: Elem a e => (e -> e -> e) -> a -> e
- at FD2.hs:21:13-47
- or from (Elem a e1)
- bound by the type signature for
- mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
- at FD2.hs:24:18-54
+ Couldn't match expected type ‘e1’ with actual type ‘e’
‘e’ is a rigid type variable bound by
the type signature for
foldr1 :: Elem a e => (e -> e -> e) -> a -> e
diff --git a/testsuite/tests/typecheck/should_compile/T3346.hs b/testsuite/tests/typecheck/should_compile/T3346.hs
index 5b2cf060b8..c163cecd09 100644
--- a/testsuite/tests/typecheck/should_compile/T3346.hs
+++ b/testsuite/tests/typecheck/should_compile/T3346.hs
@@ -9,8 +9,8 @@ class EP a where
from :: a -> Result a
to :: Result a -> a
-{-# RULES "rule1" forall x. to (from x) = x #-}
-{-# RULES "rule2" forall x. from (to x) = x #-}
+-- {-# RULES "rule1" forall x. to (from x) = x #-}
+-- {-# RULES "rule2" forall x. from (to x) = x #-}
foo :: EP a => a -> a
-- This is typed in a way rather similarly to RULE rule1
diff --git a/testsuite/tests/typecheck/should_compile/T8474.hs b/testsuite/tests/typecheck/should_compile/T8474.hs
index 72df3b85a6..5a0c50f5c5 100644
--- a/testsuite/tests/typecheck/should_compile/T8474.hs
+++ b/testsuite/tests/typecheck/should_compile/T8474.hs
@@ -9,11 +9,13 @@ slow_to_compile = do
tst1 <- return 1
let ?tst1 = tst1
+{-
let ?tst2 = tst1
let ?tst3 = tst1
let ?tst4 = tst1
let ?tst5 = tst1
let ?tst6 = tst1
let ?tst7 = tst1
+-}
print $ D ?tst1 \ No newline at end of file
diff --git a/testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs b/testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
index 78661730cc..c692c3f725 100644
--- a/testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
+++ b/testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
@@ -62,8 +62,8 @@ e18 = id
--------------------------------------------------------------------------------
-- Test interactions with inerts
-ti1 :: Proxy (x + y) -> Proxy x -> ()
-ti1 _ _ = ()
+-- ti1 :: Proxy (x + y) -> Proxy x -> ()
+-- ti1 _ _ = ()
ti2 :: Proxy (y + x) -> Proxy x -> ()
ti2 _ _ = ()
@@ -80,15 +80,8 @@ ti5 _ = ()
ti6 :: Proxy (y ^ 2) -> ()
ti6 _ = ()
-type family SomeFun (n :: Nat)
-
-ti7 :: (x <= y, y <= x) => Proxy (SomeFun x) -> Proxy y -> ()
-ti7 _ _ = ()
-
ti8 :: Proxy (x - y) -> Proxy x -> ()
ti8 _ _ = ()
ti9 :: Proxy (y - x) -> Proxy x -> ()
ti9 _ _ = ()
-
-
diff --git a/testsuite/tests/typecheck/should_compile/tc231.hs b/testsuite/tests/typecheck/should_compile/tc231.hs
index a7270ef769..7039ffcc66 100644
--- a/testsuite/tests/typecheck/should_compile/tc231.hs
+++ b/testsuite/tests/typecheck/should_compile/tc231.hs
@@ -1,4 +1,4 @@
-{-# OPTIONS_GHC -ddump-types #-}
+{-# OPTIONS_GHC -ddump-types -dsuppress-module-prefixes #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-}
-- See Trac #1456
diff --git a/testsuite/tests/typecheck/should_compile/tc231.stderr b/testsuite/tests/typecheck/should_compile/tc231.stderr
index 46395c4866..098fe94a0c 100644
--- a/testsuite/tests/typecheck/should_compile/tc231.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc231.stderr
@@ -1,19 +1,19 @@
-TYPE SIGNATURES
- foo ::
- forall s b chain.
- Zork s (Z [Char]) b =>
- Q s (Z [Char]) chain -> ST s ()
- s :: forall t t1. Q t (Z [Char]) t1 -> Q t (Z [Char]) t1
-TYPE CONSTRUCTORS
- data Q s a chain = Node s a chain
- Promotable
- data Z a = Z a
- Promotable
- class Zork s a b | a -> b where
- huh :: Q s a chain -> ST s ()
-COERCION AXIOMS
- axiom ShouldCompile.NTCo:Zork ::
- Zork s a b = forall chain. Q s a chain -> ST s ()
-Dependent modules: []
-Dependent packages: [base-4.8.0.0, ghc-prim-0.3.1.0,
- integer-gmp-0.5.1.0]
+TYPE SIGNATURES
+ foo ::
+ forall s b chain.
+ Zork s (Z [Char]) b =>
+ Q s (Z [Char]) chain -> ST s ()
+ s :: forall t t1. Q t (Z [Char]) t1 -> Q t (Z [Char]) t1
+TYPE CONSTRUCTORS
+ data Q s a chain = Node s a chain
+ Promotable
+ data Z a = Z a
+ Promotable
+ class Zork s a b | a -> b where
+ huh :: Q s a chain -> ST s ()
+COERCION AXIOMS
+ axiom NTCo:Zork ::
+ Zork s a b = forall chain. Q s a chain -> ST s ()
+Dependent modules: []
+Dependent packages: [base-4.8.0.0, ghc-prim-0.3.1.0,
+ integer-gmp-0.5.1.0]
diff --git a/testsuite/tests/typecheck/should_fail/ContextStack2.hs b/testsuite/tests/typecheck/should_fail/ContextStack2.hs
index 5c50b02847..71d22c3241 100644
--- a/testsuite/tests/typecheck/should_fail/ContextStack2.hs
+++ b/testsuite/tests/typecheck/should_fail/ContextStack2.hs
@@ -7,3 +7,47 @@ type instance TF (a,b) = (TF a, TF b)
t :: (a ~ TF (a,Int)) => Int
t = undefined
+
+{- a ~ TF (a,Int)
+ ~ (TF a, TF Int)
+ ~ (TF (TF (a,Int)), TF Int)
+ ~ (TF (TF a, TF Int), TF Int)
+ ~ ((TF (TF a), TF (TF Int)), TF Int)
+
+
+ fsk ~ a
+ TF (a, Int) ~ fsk
+-->
+ fsk ~ a
+* fsk ~ (TF a, TF Int)
+ (flatten lhs)
+ a ~ (TF a, TF Int)
+ (flaten rhs)
+ a ~ (fsk1, TF Int)
+(wk) TF a ~ fsk1
+
+--> (rewrite inert)
+
+ fsk ~ (fsk1, TF Int)
+ a ~ (fsk1, TF Int)
+(wk) TF a ~ fsk1
+
+-->
+ fsk ~ (fsk1, TF Int)
+ a ~ (fsk1, TF Int)
+
+* TF (fsk1, fsk2) ~ fsk1
+(wk) TF Tnt ~ fsk2
+
+-->
+ fsk ~ (fsk1, TF Int)
+ a ~ (fsk1, TF Int)
+
+* fsk1 ~ (TF fsk1, TF fsk2)
+ (flatten rhs)
+ fsk1 ~ (fsk3, TF fsk2)
+
+
+(wk) TF Int ~ fsk2
+ TF fsk1 ~ fsk3
+-} \ No newline at end of file
diff --git a/testsuite/tests/typecheck/should_fail/ContextStack2.stderr b/testsuite/tests/typecheck/should_fail/ContextStack2.stderr
index 746cf15d0c..fbbd5980bc 100644
--- a/testsuite/tests/typecheck/should_fail/ContextStack2.stderr
+++ b/testsuite/tests/typecheck/should_fail/ContextStack2.stderr
@@ -2,8 +2,8 @@
ContextStack2.hs:8:6:
Type function application stack overflow; size = 11
Use -ftype-function-depth=N to increase stack size to N
- (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF a)))))))))),
- TF (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF Int)))))))))))
- ~ TF (TF (TF (TF (TF (TF (TF (TF (TF (TF a)))))))))
+ TF (TF (TF (TF (TF (TF (TF (TF (TF (TF a)))))))))
+ ~ (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF a)))))))))),
+ TF (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF Int)))))))))))
In the ambiguity check for: forall a. (a ~ TF (a, Int)) => Int
In the type signature for ‘t’: t :: (a ~ TF (a, Int)) => Int
diff --git a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
index f3320d0d8e..895cc7df01 100644
--- a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
+++ b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
@@ -1,12 +1,14 @@
-
-FDsFromGivens.hs:21:15:
- Couldn't match type ‘Char’ with ‘[a0]’
- arising from a functional dependency between constraints:
- ‘C Char [a0]’ arising from a use of ‘f’ at FDsFromGivens.hs:21:15
- ‘C Char Char’
- arising from a pattern with constructor
- KCC :: C Char Char => () -> KCC,
- in an equation for ‘bar’
- at FDsFromGivens.hs:21:6-10
- In the expression: f
- In an equation for ‘bar’: bar (KCC _) = f
+
+FDsFromGivens.hs:21:15:
+ Couldn't match type ‘Char’ with ‘[a]’
+ arising from a functional dependency between constraints:
+ ‘C Char [a]’ arising from a use of ‘f’ at FDsFromGivens.hs:21:15
+ ‘C Char Char’
+ arising from a pattern with constructor
+ KCC :: C Char Char => () -> KCC,
+ in an equation for ‘bar’
+ at FDsFromGivens.hs:21:6-10
+ Relevant bindings include
+ bar :: KCC -> a -> a (bound at FDsFromGivens.hs:21:1)
+ In the expression: f
+ In an equation for ‘bar’: bar (KCC _) = f
diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
index 80ab8d83f6..d8bec07269 100644
--- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
+++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
@@ -19,7 +19,7 @@ FrozenErrorTests.hs:26:9:
In an equation for ‘test1’: test1 = goo1 False undefined
FrozenErrorTests.hs:29:15:
- Couldn't match type ‘Int’ with ‘[Int]’
+ Couldn't match type ‘[Int]’ with ‘Int’
Expected type: [[Int]]
Actual type: F [Int] Bool
In the first argument of ‘goo2’, namely ‘(goo1 False undefined)’
@@ -27,7 +27,7 @@ FrozenErrorTests.hs:29:15:
In an equation for ‘test2’: test2 = goo2 (goo1 False undefined)
FrozenErrorTests.hs:30:9:
- Couldn't match type ‘[Int]’ with ‘Int’
+ Couldn't match type ‘Int’ with ‘[Int]’
Expected type: [[Int]]
Actual type: F [Int] Bool
In the expression: goo1 False (goo2 undefined)
diff --git a/testsuite/tests/typecheck/should_fail/T1899.stderr b/testsuite/tests/typecheck/should_fail/T1899.stderr
index a8baba78cc..324eebbc9a 100644
--- a/testsuite/tests/typecheck/should_fail/T1899.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1899.stderr
@@ -1,11 +1,13 @@
-T1899.hs:12:29:
- Couldn't match expected type ‘a’ with actual type ‘Proposition a0’
+T1899.hs:14:36:
+ Couldn't match type ‘a’ with ‘Proposition a1’
‘a’ is a rigid type variable bound by
the type signature for transRHS :: [a] -> Int -> Constraint a
at T1899.hs:9:14
+ Expected type: [Proposition a1]
+ Actual type: [a]
Relevant bindings include
varSet :: [a] (bound at T1899.hs:10:11)
transRHS :: [a] -> Int -> Constraint a (bound at T1899.hs:10:2)
- In the first argument of ‘Prop’, namely ‘(Auxiliary undefined)’
- In the expression: Prop (Auxiliary undefined)
+ In the first argument of ‘Auxiliary’, namely ‘varSet’
+ In the first argument of ‘Prop’, namely ‘(Auxiliary varSet)’
diff --git a/testsuite/tests/typecheck/should_fail/T2688.stderr b/testsuite/tests/typecheck/should_fail/T2688.stderr
index b117f02f9f..4b28d7da31 100644
--- a/testsuite/tests/typecheck/should_fail/T2688.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2688.stderr
@@ -1,9 +1,6 @@
T2688.hs:8:22:
- Could not deduce (s ~ v)
- from the context (VectorSpace v s)
- bound by the class declaration for ‘VectorSpace’
- at T2688.hs:(5,1)-(8,23)
+ Couldn't match expected type ‘v’ with actual type ‘s’
‘s’ is a rigid type variable bound by
the class declaration for ‘VectorSpace’ at T2688.hs:5:21
‘v’ is a rigid type variable bound by
diff --git a/testsuite/tests/typecheck/should_fail/T5236.stderr b/testsuite/tests/typecheck/should_fail/T5236.stderr
index 8a723bab9b..e1e136a249 100644
--- a/testsuite/tests/typecheck/should_fail/T5236.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5236.stderr
@@ -1,10 +1,10 @@
-
-T5236.hs:13:9:
- Couldn't match type ‘A’ with ‘B’
- arising from a functional dependency between:
- constraint ‘Id A B’
- arising from the type signature for loop :: Id A B => Bool
- instance ‘Id A A’ at T5236.hs:10:10-15
- In the ambiguity check for: Id A B => Bool
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘loop’: loop :: Id A B => Bool
+
+T5236.hs:13:9:
+ Couldn't match type ‘B’ with ‘A’
+ arising from a functional dependency between:
+ constraint ‘Id A B’
+ arising from the type signature for loop :: Id A B => Bool
+ instance ‘Id B B’ at T5236.hs:11:10-15
+ In the ambiguity check for: Id A B => Bool
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘loop’: loop :: Id A B => Bool
diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr
index c94f11531f..912cd19842 100644
--- a/testsuite/tests/typecheck/should_fail/T5300.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5300.stderr
@@ -16,14 +16,14 @@ T5300.hs:11:7:
f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
T5300.hs:14:7:
- Could not deduce (C1 a1 b1 c10)
+ Could not deduce (C2 a2 b2 c20)
arising from the ambiguity check for ‘f2’
from the context (Monad m, C1 a1 b1 c1, C2 a2 b2 c2)
bound by the type signature for
f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
a1 -> StateT (T b2) m a2
at T5300.hs:14:7-69
- The type variable ‘c10’ is ambiguous
+ The type variable ‘c20’ is ambiguous
In the ambiguity check for:
forall a1 b2 (m :: * -> *) a2 b1 c1 c2.
(Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
diff --git a/testsuite/tests/typecheck/should_fail/T5684.stderr b/testsuite/tests/typecheck/should_fail/T5684.stderr
index 56b0800351..b2d0b01c46 100644
--- a/testsuite/tests/typecheck/should_fail/T5684.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5684.stderr
@@ -1,30 +1,94 @@
+T5684.hs:20:12:
+ No instance for (A Bool) arising from a use of ‘op’
+ In the expression: op False False
+ In the expression:
+ [op False False, op 'c' undefined, op True undefined]
+ In an equation for ‘flop1’:
+ flop1 = [op False False, op 'c' undefined, op True undefined]
+
+T5684.hs:24:12:
+ No instance for (B Char b10) arising from a use of ‘op’
+ In the expression: op 'c' undefined
+ In the expression:
+ [op False False, op 'c' undefined, op True undefined]
+ In an equation for ‘flop1’:
+ flop1 = [op False False, op 'c' undefined, op True undefined]
+
T5684.hs:25:12:
- No instance for (A b6) arising from a use of ‘op’
+ No instance for (A b11) arising from a use of ‘op’
In the expression: op True undefined
In the expression:
[op False False, op 'c' undefined, op True undefined]
In an equation for ‘flop1’:
flop1 = [op False False, op 'c' undefined, op True undefined]
+T5684.hs:29:12:
+ No instance for (A Bool) arising from a use of ‘op’
+ In the expression: op False False
+ In the expression:
+ [op False False, op True undefined, op 'c' undefined]
+ In an equation for ‘flop2’:
+ flop2 = [op False False, op True undefined, op 'c' undefined]
+
T5684.hs:30:12:
- No instance for (A b5) arising from a use of ‘op’
+ No instance for (A b8) arising from a use of ‘op’
In the expression: op True undefined
In the expression:
[op False False, op True undefined, op 'c' undefined]
In an equation for ‘flop2’:
flop2 = [op False False, op True undefined, op 'c' undefined]
+T5684.hs:31:12:
+ No instance for (B Char b9) arising from a use of ‘op’
+ In the expression: op 'c' undefined
+ In the expression:
+ [op False False, op True undefined, op 'c' undefined]
+ In an equation for ‘flop2’:
+ flop2 = [op False False, op True undefined, op 'c' undefined]
+
+T5684.hs:35:12:
+ No instance for (B Char b6) arising from a use of ‘op’
+ In the expression: op 'c' undefined
+ In the expression:
+ [op 'c' undefined, op True undefined, op False False]
+ In an equation for ‘flop3’:
+ flop3 = [op 'c' undefined, op True undefined, op False False]
+
T5684.hs:36:12:
- No instance for (A b4) arising from a use of ‘op’
+ No instance for (A b7) arising from a use of ‘op’
In the expression: op True undefined
In the expression:
[op 'c' undefined, op True undefined, op False False]
In an equation for ‘flop3’:
flop3 = [op 'c' undefined, op True undefined, op False False]
+T5684.hs:37:12:
+ No instance for (A Bool) arising from a use of ‘op’
+ In the expression: op False False
+ In the expression:
+ [op 'c' undefined, op True undefined, op False False]
+ In an equation for ‘flop3’:
+ flop3 = [op 'c' undefined, op True undefined, op False False]
+
+T5684.hs:40:12:
+ No instance for (B Char b4) arising from a use of ‘op’
+ In the expression: op 'c' undefined
+ In the expression:
+ [op 'c' undefined, op False False, op True undefined]
+ In an equation for ‘flop4’:
+ flop4 = [op 'c' undefined, op False False, op True undefined]
+
+T5684.hs:41:12:
+ No instance for (A Bool) arising from a use of ‘op’
+ In the expression: op False False
+ In the expression:
+ [op 'c' undefined, op False False, op True undefined]
+ In an equation for ‘flop4’:
+ flop4 = [op 'c' undefined, op False False, op True undefined]
+
T5684.hs:42:12:
- No instance for (A b3) arising from a use of ‘op’
+ No instance for (A b5) arising from a use of ‘op’
In the expression: op True undefined
In the expression:
[op 'c' undefined, op False False, op True undefined]
@@ -39,6 +103,22 @@ T5684.hs:46:12:
In an equation for ‘flop5’:
flop5 = [op True undefined, op 'c' undefined, op False False]
+T5684.hs:47:12:
+ No instance for (B Char b3) arising from a use of ‘op’
+ In the expression: op 'c' undefined
+ In the expression:
+ [op True undefined, op 'c' undefined, op False False]
+ In an equation for ‘flop5’:
+ flop5 = [op True undefined, op 'c' undefined, op False False]
+
+T5684.hs:48:12:
+ No instance for (A Bool) arising from a use of ‘op’
+ In the expression: op False False
+ In the expression:
+ [op True undefined, op 'c' undefined, op False False]
+ In an equation for ‘flop5’:
+ flop5 = [op True undefined, op 'c' undefined, op False False]
+
T5684.hs:52:12:
No instance for (A b0) arising from a use of ‘op’
In the expression: op True undefined
diff --git a/testsuite/tests/typecheck/should_fail/T5853.stderr b/testsuite/tests/typecheck/should_fail/T5853.stderr
index 997ce196c3..63868d0a3b 100644
--- a/testsuite/tests/typecheck/should_fail/T5853.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5853.stderr
@@ -1,6 +1,6 @@
T5853.hs:15:52:
- Could not deduce (Subst (Subst fa a) b ~ Subst fa b)
+ Could not deduce (Subst (Subst fa b) a ~ Subst fa a)
from the context (F fa,
Elem (Subst fa b) ~ b,
Subst (Subst fa b) (Elem fa) ~ fa,
diff --git a/testsuite/tests/typecheck/should_fail/T7748a.stderr b/testsuite/tests/typecheck/should_fail/T7748a.stderr
index de451eb52f..63cff4aa17 100644
--- a/testsuite/tests/typecheck/should_fail/T7748a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7748a.stderr
@@ -1,15 +1,18 @@
-
-T7748a.hs:14:24:
- Couldn't match expected type ‘a’ with actual type ‘Maybe t0’
- ‘a’ is a rigid type variable bound by
- the type signature for test :: a -> r -> () at T7748a.hs:11:9
- Relevant bindings include
- zd :: a (bound at T7748a.hs:12:6)
- test :: a -> r -> () (bound at T7748a.hs:12:1)
- In the pattern: Nothing
- In a case alternative: Nothing -> const ()
- In the expression:
- case zd of {
- Nothing -> const ()
- Just Nothing -> const ()
- Just (Just p) -> p }
+
+T7748a.hs:16:24:
+ Couldn't match expected type ‘a’
+ with actual type ‘Maybe (Maybe (r -> ()))’
+ ‘a’ is a rigid type variable bound by
+ the type signature for test :: a -> r -> () at T7748a.hs:11:9
+ Relevant bindings include
+ g :: r -> () (bound at T7748a.hs:13:16)
+ f :: r -> () (bound at T7748a.hs:13:8)
+ zd :: a (bound at T7748a.hs:12:6)
+ test :: a -> r -> () (bound at T7748a.hs:12:1)
+ In the pattern: Just (Just p)
+ In a case alternative: Just (Just p) -> p
+ In the expression:
+ case zd of {
+ Nothing -> const ()
+ Just Nothing -> const ()
+ Just (Just p) -> p }
diff --git a/testsuite/tests/typecheck/should_fail/T8142.stderr b/testsuite/tests/typecheck/should_fail/T8142.stderr
index d585abdcd2..a084f7afcc 100644
--- a/testsuite/tests/typecheck/should_fail/T8142.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8142.stderr
@@ -1,28 +1,10 @@
-
-T8142.hs:6:18:
- Couldn't match type ‘Nu ((,) t0)’ with ‘Nu ((,) t)’
- NB: ‘Nu’ is a type function, and may not be injective
- The type variable ‘t0’ is ambiguous
- Expected type: Nu ((,) t) -> Nu f
- Actual type: Nu ((,) t0) -> Nu f0
- When checking that ‘h’ has the inferred type
- h :: forall t (f :: * -> *). Nu ((,) t) -> Nu f
- Probable cause: the inferred type is ambiguous
- In an equation for ‘tracer’:
- tracer
- = h
- where
- h = (\ (_, b) -> ((outI . fmap h) b)) . out
-
-T8142.hs:6:57:
- Could not deduce (Nu ((,) t) ~ f1 (Nu ((,) t)))
- from the context (Functor f, Coinductive f)
- bound by the type signature for
- tracer :: (Functor f, Coinductive f) => (c -> f c) -> c -> f c
- at T8142.hs:5:11-64
- Expected type: Nu ((,) t) -> (t, f1 (Nu ((,) t)))
- Actual type: Nu ((,) t) -> (t, Nu ((,) t))
- Relevant bindings include
- h :: Nu ((,) t) -> Nu f1 (bound at T8142.hs:6:18)
- In the second argument of ‘(.)’, namely ‘out’
- In the expression: (\ (_, b) -> ((outI . fmap h) b)) . out
+
+T8142.hs:6:57:
+ Couldn't match type ‘Nu ((,) t0)’ with ‘g0 (Nu ((,) t0))’
+ The type variables ‘t0’, ‘g0’ are ambiguous
+ Expected type: Nu ((,) t0) -> (t0, g0 (Nu ((,) t0)))
+ Actual type: Nu ((,) t0) -> (t0, Nu ((,) t0))
+ Relevant bindings include
+ h :: Nu ((,) t0) -> Nu g0 (bound at T8142.hs:6:18)
+ In the second argument of ‘(.)’, namely ‘out’
+ In the expression: (\ (_, b) -> ((outI . fmap h) b)) . out
diff --git a/testsuite/tests/typecheck/should_fail/T8450.hs b/testsuite/tests/typecheck/should_fail/T8450.hs
index ac122e7bc7..92b5b67994 100644
--- a/testsuite/tests/typecheck/should_fail/T8450.hs
+++ b/testsuite/tests/typecheck/should_fail/T8450.hs
@@ -6,3 +6,6 @@ runEffect = undefined
run :: forall a. a
run = runEffect $ (undefined :: Either a ())
+
+{- Either a () ~ Either Bool alpha
+ a ~ alpha -} \ No newline at end of file
diff --git a/testsuite/tests/typecheck/should_fail/T8450.stderr b/testsuite/tests/typecheck/should_fail/T8450.stderr
index ef3c62e7b6..2cc9a6b7ab 100644
--- a/testsuite/tests/typecheck/should_fail/T8450.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8450.stderr
@@ -1,13 +1,9 @@
-
-T8450.hs:8:20:
- Couldn't match type ‘a’ with ‘Bool’
- ‘a’ is a rigid type variable bound by
- the type signature for run :: a at T8450.hs:7:15
- Expected type: Either Bool ()
- Actual type: Either a ()
- Relevant bindings include run :: a (bound at T8450.hs:8:1)
- In the second argument of ‘($)’, namely
- ‘(undefined :: Either a ())’
- In the expression: runEffect $ (undefined :: Either a ())
- In an equation for ‘run’:
- run = runEffect $ (undefined :: Either a ())
+
+T8450.hs:8:7:
+ Couldn't match expected type ‘a’ with actual type ‘()’
+ ‘a’ is a rigid type variable bound by
+ the type signature for run :: a at T8450.hs:7:15
+ Relevant bindings include run :: a (bound at T8450.hs:8:1)
+ In the expression: runEffect $ (undefined :: Either a ())
+ In an equation for ‘run’:
+ run = runEffect $ (undefined :: Either a ())
diff --git a/testsuite/tests/typecheck/should_fail/T8883.stderr b/testsuite/tests/typecheck/should_fail/T8883.stderr
index d02f02338e..28730ae9c7 100644
--- a/testsuite/tests/typecheck/should_fail/T8883.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8883.stderr
@@ -1,8 +1,8 @@
-
-T8883.hs:20:1:
- Non type-variable argument in the constraint: Functor (PF a)
- (Use FlexibleContexts to permit this)
- When checking that ‘fold’ has the inferred type
- fold :: forall a b.
- (Regular a, Functor (PF a)) =>
- (PF a b -> b) -> a -> b
+
+T8883.hs:20:1:
+ Non type-variable argument in the constraint: Functor (PF a)
+ (Use FlexibleContexts to permit this)
+ When checking that ‘fold’ has the inferred type
+ fold :: forall a b.
+ (Functor (PF a), Regular a) =>
+ (PF a b -> b) -> a -> b
diff --git a/testsuite/tests/typecheck/should_fail/T9305.stderr b/testsuite/tests/typecheck/should_fail/T9305.stderr
index 16104237b9..c908a562ae 100644
--- a/testsuite/tests/typecheck/should_fail/T9305.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9305.stderr
@@ -1,6 +1,6 @@
T9305.hs:8:48:
- No instance for (Functor Event)
+ No instance for (Functor F)
arising from the first field of ‘EventF’ (type ‘F (Event a)’)
Possible fix:
use a standalone 'deriving instance' declaration,
diff --git a/testsuite/tests/typecheck/should_fail/mc21.stderr b/testsuite/tests/typecheck/should_fail/mc21.stderr
index 2305394260..e3a8b882c8 100644
--- a/testsuite/tests/typecheck/should_fail/mc21.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc21.stderr
@@ -1,9 +1,9 @@
-
-mc21.hs:12:26:
- Couldn't match type ‘a’ with ‘[a]’
- ‘a’ is a rigid type variable bound by
- a type expected by the context: [a] -> t [a] at mc21.hs:12:9
- Expected type: [a] -> t [a]
- Actual type: [a] -> [a]
- In the expression: take 5
- In a stmt of a monad comprehension: then group using take 5
+
+mc21.hs:12:26:
+ Couldn't match type ‘a’ with ‘[a]’
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context: [a] -> [[a]] at mc21.hs:12:9
+ Expected type: [a] -> [[a]]
+ Actual type: [a] -> [a]
+ In the expression: take 5
+ In a stmt of a monad comprehension: then group using take 5
diff --git a/testsuite/tests/typecheck/should_fail/mc22.stderr b/testsuite/tests/typecheck/should_fail/mc22.stderr
index 44a2eebdc7..104bcffe4c 100644
--- a/testsuite/tests/typecheck/should_fail/mc22.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc22.stderr
@@ -1,22 +1,21 @@
-
-mc22.hs:10:9:
- No instance for (Functor t1) arising from a use of ‘fmap’
- Possible fix:
- add (Functor t1) to the context of
- a type expected by the context: (a -> b) -> t1 a -> t1 b
- or the inferred type of foo :: t (t1 [Char])
- In the expression: fmap
- In a stmt of a monad comprehension: then group using take 5
- In the expression:
- [x + 1 | x <- ["Hello", "World"], then group using take 5]
-
-mc22.hs:10:26:
- Couldn't match type ‘a’ with ‘t1 a’
- ‘a’ is a rigid type variable bound by
- a type expected by the context: [a] -> t (t1 a) at mc22.hs:10:9
- Expected type: [a] -> t (t1 a)
- Actual type: [a] -> [a]
- Relevant bindings include
- foo :: t (t1 [Char]) (bound at mc22.hs:8:1)
- In the expression: take 5
- In a stmt of a monad comprehension: then group using take 5
+
+mc22.hs:10:9:
+ No instance for (Functor t) arising from a use of ‘fmap’
+ Possible fix:
+ add (Functor t) to the context of
+ a type expected by the context: (a -> b) -> t a -> t b
+ or the inferred type of foo :: [t [Char]]
+ In the expression: fmap
+ In a stmt of a monad comprehension: then group using take 5
+ In the expression:
+ [x + 1 | x <- ["Hello", "World"], then group using take 5]
+
+mc22.hs:10:26:
+ Couldn't match type ‘a’ with ‘t a’
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context: [a] -> [t a] at mc22.hs:10:9
+ Expected type: [a] -> [t a]
+ Actual type: [a] -> [a]
+ Relevant bindings include foo :: [t [Char]] (bound at mc22.hs:8:1)
+ In the expression: take 5
+ In a stmt of a monad comprehension: then group using take 5
diff --git a/testsuite/tests/typecheck/should_fail/mc25.stderr b/testsuite/tests/typecheck/should_fail/mc25.stderr
index e101f4b328..e145af4339 100644
--- a/testsuite/tests/typecheck/should_fail/mc25.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc25.stderr
@@ -1,18 +1,18 @@
-
-mc25.hs:9:24:
- No instance for (Functor t2) arising from a use of ‘fmap’
- Possible fix:
- add (Functor t2) to the context of
- a type expected by the context: (a -> b) -> t2 a -> t2 b
- or the inferred type of z :: t (t2 t1)
- In the expression: fmap
- In a stmt of a monad comprehension: then group by x using take
- In the expression: [x | x <- [1 .. 10], then group by x using take]
-
-mc25.hs:9:46:
- Couldn't match type ‘Int’ with ‘a -> t1’
- Expected type: (a -> t1) -> [a] -> t (t2 a)
- Actual type: Int -> [a] -> [a]
- Relevant bindings include z :: t (t2 t1) (bound at mc25.hs:9:1)
- In the expression: take
- In a stmt of a monad comprehension: then group by x using take
+
+mc25.hs:9:24:
+ No instance for (Functor t1) arising from a use of ‘fmap’
+ Possible fix:
+ add (Functor t1) to the context of
+ a type expected by the context: (a -> b) -> t1 a -> t1 b
+ or the inferred type of z :: [t1 t]
+ In the expression: fmap
+ In a stmt of a monad comprehension: then group by x using take
+ In the expression: [x | x <- [1 .. 10], then group by x using take]
+
+mc25.hs:9:46:
+ Couldn't match type ‘Int’ with ‘a -> t’
+ Expected type: (a -> t) -> [a] -> [t1 a]
+ Actual type: Int -> [a] -> [a]
+ Relevant bindings include z :: [t1 t] (bound at mc25.hs:9:1)
+ In the expression: take
+ In a stmt of a monad comprehension: then group by x using take
diff --git a/testsuite/tests/typecheck/should_fail/tcfail019.stderr b/testsuite/tests/typecheck/should_fail/tcfail019.stderr
index 49eb857593..70b38be257 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail019.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail019.stderr
@@ -1,5 +1,5 @@
tcfail019.hs:18:10:
- No instance for (B [a])
+ No instance for (C [a])
arising from the superclasses of an instance declaration
In the instance declaration for ‘D [a]’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
index e3f6444572..fb6d6707fb 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail067.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
@@ -34,11 +34,11 @@ tcfail067.hs:46:12:
= show value ++ " :" ++ show lower ++ ".." ++ show upper
tcfail067.hs:61:12:
- Could not deduce (Show a) arising from a use of ‘numSubRangeNegate’
+ Could not deduce (Ord a) arising from a use of ‘numSubRangeNegate’
from the context (Num a)
bound by the instance declaration at tcfail067.hs:60:10-34
Possible fix:
- add (Show a) to the context of the instance declaration
+ add (Ord a) to the context of the instance declaration
In the expression: numSubRangeNegate
In an equation for ‘negate’: negate = numSubRangeNegate
In the instance declaration for ‘Num (SubRange a)’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.hs b/testsuite/tests/typecheck/should_fail/tcfail068.hs
index beae0f8359..40dc0e0bd8 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail068.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail068.hs
@@ -21,7 +21,7 @@ itiap i f arr =
return arr)
itrap :: Constructed a => ((Int,Int),(Int,Int)) -> (a->a) -> IndTree s a -> IndTree s a
-itrap ((i,k),(j,l)) f arr = runST(itrap' i k)
+itrap ((i,k),(j,l)) f arr = runST (itrap' i k)
where
itrap' i k = if k > l then return arr
else (itrapsnd i k >>
diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.stderr b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
index 1df6fb8bb4..233c92e6ae 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail068.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
@@ -1,10 +1,6 @@
tcfail068.hs:14:9:
- Could not deduce (s1 ~ s)
- from the context (Constructed a)
- bound by the type signature for
- itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
- at tcfail068.hs:11:10-55
+ Couldn't match type ‘s1’ with ‘s’
‘s1’ is a rigid type variable bound by
a type expected by the context: GHC.ST.ST s1 (IndTree s a)
at tcfail068.hs:13:9
@@ -22,12 +18,7 @@ tcfail068.hs:14:9:
In the expression: runST (newSTArray ((1, 1), n) x)
tcfail068.hs:19:21:
- Could not deduce (s ~ s1)
- from the context (Constructed a)
- bound by the type signature for
- itiap :: Constructed a =>
- (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:16:10-75
+ Couldn't match type ‘s’ with ‘s1’
‘s’ is a rigid type variable bound by
the type signature for
itiap :: Constructed a =>
@@ -45,13 +36,8 @@ tcfail068.hs:19:21:
In the first argument of ‘readSTArray’, namely ‘arr’
In the first argument of ‘(>>=)’, namely ‘readSTArray arr i’
-tcfail068.hs:24:35:
- Could not deduce (s ~ s1)
- from the context (Constructed a)
- bound by the type signature for
- itrap :: Constructed a =>
- ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:23:10-87
+tcfail068.hs:24:36:
+ Couldn't match type ‘s’ with ‘s1’
‘s’ is a rigid type variable bound by
the type signature for
itrap :: Constructed a =>
@@ -75,18 +61,7 @@ tcfail068.hs:24:35:
In the expression: runST (itrap' i k)
tcfail068.hs:36:46:
- Could not deduce (s ~ s1)
- from the context (Constructed b)
- bound by the type signature for
- itrapstate :: Constructed b =>
- ((Int, Int), (Int, Int))
- -> (a -> b -> (a, b))
- -> ((Int, Int) -> c -> a)
- -> (a -> c)
- -> c
- -> IndTree s b
- -> (c, IndTree s b)
- at tcfail068.hs:(34,15)-(35,62)
+ Couldn't match type ‘s’ with ‘s1’
‘s’ is a rigid type variable bound by
the type signature for
itrapstate :: Constructed b =>
diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
index 64486c1cb0..d5eb4aa87f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
@@ -1,11 +1,11 @@
tcfail072.hs:23:13:
- Could not deduce (Ord q0) arising from a use of ‘g’
+ Could not deduce (Ord p0) arising from a use of ‘g’
from the context (Ord p, Ord q)
bound by the type signature for
g :: (Ord p, Ord q) => AB p q -> Bool
at tcfail072.hs:22:6-38
- The type variable ‘q0’ is ambiguous
+ The type variable ‘p0’ is ambiguous
Note: there are several potential instances:
instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’
instance Ord () -- Defined in ‘GHC.Classes’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail131.stderr b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
index 41e8af681f..f49a4b3975 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail131.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
@@ -1,9 +1,6 @@
tcfail131.hs:7:9:
- Could not deduce (b ~ Integer)
- from the context (Num b)
- bound by the type signature for g :: Num b => b -> b
- at tcfail131.hs:6:8-22
+ Couldn't match expected type ‘b’ with actual type ‘Integer’
‘b’ is a rigid type variable bound by
the type signature for g :: Num b => b -> b at tcfail131.hs:6:8
Relevant bindings include
diff --git a/testsuite/tests/typecheck/should_fail/tcfail143.stderr b/testsuite/tests/typecheck/should_fail/tcfail143.stderr
index b36d7a8b37..04e7ec8d14 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail143.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail143.stderr
@@ -1,8 +1,8 @@
-
-tcfail143.hs:29:9:
- Couldn't match type ‘S Z’ with ‘Z’
- arising from a functional dependency between:
- constraint ‘MinMax (S Z) Z Z Z’ arising from a use of ‘extend’
- instance ‘MinMax a Z Z a’ at tcfail143.hs:11:10-23
- In the expression: n1 `extend` n0
- In an equation for ‘t2’: t2 = n1 `extend` n0
+
+tcfail143.hs:29:9:
+ Couldn't match type ‘Z’ with ‘S Z’
+ arising from a functional dependency between:
+ constraint ‘MinMax (S Z) Z Z Z’ arising from a use of ‘extend’
+ instance ‘MinMax Z b Z b’ at tcfail143.hs:12:10-23
+ In the expression: n1 `extend` n0
+ In an equation for ‘t2’: t2 = n1 `extend` n0
diff --git a/testsuite/tests/typecheck/should_fail/tcfail171.stderr b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
index 849ce3aa10..d29f91ef05 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail171.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
@@ -1,8 +1,8 @@
tcfail171.hs:9:10:
- No instance for (PrintfArg a) arising from a use of ‘printf’
+ No instance for (PrintfType b) arising from a use of ‘printf’
Possible fix:
- add (PrintfArg a) to the context of
+ add (PrintfType b) to the context of
the type signature for phex :: a -> b
In the expression: printf "0x%x" x
In an equation for ‘phex’: phex x = printf "0x%x" x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail186.stderr b/testsuite/tests/typecheck/should_fail/tcfail186.stderr
index 1842628e40..bf74d8182c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail186.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail186.stderr
@@ -1,8 +1,8 @@
-
-tcfail186.hs:7:9:
- Couldn't match type ‘[Char]’ with ‘Int’
- Expected type: PhantomSyn a0
- Actual type: [Char]
- In the first argument of ‘f’, namely ‘"hoo"’
- In the expression: f "hoo"
- In an equation for ‘foo’: foo = f "hoo"
+
+tcfail186.hs:7:9:
+ Couldn't match type ‘[Char]’ with ‘Int’
+ Expected type: PhantomSyn a0
+ Actual type: [Char]
+ In the first argument of ‘f’, namely ‘"hoo"’
+ In the expression: f "hoo"
+ In an equation for ‘foo’: foo = f "hoo"
diff --git a/testsuite/tests/typecheck/should_fail/tcfail201.stderr b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
index a029e8c6d3..1270315a19 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
@@ -1,19 +1,20 @@
-
-tcfail201.hs:17:27:
- Couldn't match expected type ‘a’ with actual type ‘HsDoc t0’
- ‘a’ is a rigid type variable bound by
- the type signature for
- gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
- -> (forall g. g -> c g) -> a -> c a
- at tcfail201.hs:15:12
- Relevant bindings include
- hsDoc :: a (bound at tcfail201.hs:16:13)
- gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
- -> (forall g. g -> c g) -> a -> c a
- (bound at tcfail201.hs:16:1)
- In the pattern: DocEmpty
- In a case alternative: DocEmpty -> z DocEmpty
- In the expression:
- case hsDoc of {
- DocEmpty -> z DocEmpty
- (DocParagraph hsDoc) -> z DocParagraph `k` hsDoc }
+
+tcfail201.hs:18:28:
+ Couldn't match expected type ‘a’ with actual type ‘HsDoc id1’
+ ‘a’ is a rigid type variable bound by
+ the type signature for
+ gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
+ -> (forall g. g -> c g) -> a -> c a
+ at tcfail201.hs:15:12
+ Relevant bindings include
+ hsDoc :: a (bound at tcfail201.hs:16:13)
+ gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
+ -> (forall g. g -> c g) -> a -> c a
+ (bound at tcfail201.hs:16:1)
+ In the pattern: DocParagraph hsDoc
+ In a case alternative:
+ (DocParagraph hsDoc) -> z DocParagraph `k` hsDoc
+ In the expression:
+ case hsDoc of {
+ DocEmpty -> z DocEmpty
+ (DocParagraph hsDoc) -> z DocParagraph `k` hsDoc }
diff --git a/testsuite/tests/typecheck/should_fail/tcfail204.stderr b/testsuite/tests/typecheck/should_fail/tcfail204.stderr
index 66d7269262..e8ecfc0024 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail204.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail204.stderr
@@ -1,10 +1,11 @@
-tcfail204.hs:10:7: Warning:
+tcfail204.hs:10:15: Warning:
Defaulting the following constraint(s) to type ‘Double’
- (RealFrac a0)
- arising from a use of ‘ceiling’ at tcfail204.hs:10:7-13
(Fractional a0)
arising from the literal ‘6.3’ at tcfail204.hs:10:15-17
+ (RealFrac a0)
+ arising from a use of ‘ceiling’ at tcfail204.hs:10:7-13
+ In the first argument of ‘ceiling’, namely ‘6.3’
In the expression: ceiling 6.3
In an equation for ‘foo’: foo = ceiling 6.3
diff --git a/testsuite/tests/typecheck/should_run/T5751.hs b/testsuite/tests/typecheck/should_run/T5751.hs
index cf1142195b..423a40736d 100644
--- a/testsuite/tests/typecheck/should_run/T5751.hs
+++ b/testsuite/tests/typecheck/should_run/T5751.hs
@@ -18,7 +18,7 @@ instance (MonadIO m) => (XMLGenerator (IdentityT m)) where
genElement _ = liftIO $ putStrLn "in genElement"
main :: IO ()
-main =
+main =
do runIdentityT web
putStrLn "done."
diff --git a/testsuite/tests/typecheck/should_run/tcrun036.hs b/testsuite/tests/typecheck/should_run/tcrun036.hs
index 64fffb7fde..8f42d30195 100644
--- a/testsuite/tests/typecheck/should_run/tcrun036.hs
+++ b/testsuite/tests/typecheck/should_run/tcrun036.hs
@@ -24,10 +24,10 @@ module Main where
import Prelude hiding (traverse)
class Catalog c where
- traverse :: c -> Viewer -> IO ()
+ mtraverse :: c -> Viewer -> IO ()
instance Catalog Int where
- traverse i v = viewShowable v i
+ mtraverse i v = viewShowable v i
type View a = a -> IO ()
@@ -38,23 +38,23 @@ data Viewer = Viewer {
printer :: Viewer
--printer = Viewer {
--- viewCatalog = \x -> traverse x printer,
+-- viewCatalog = \x -> mtraverse x printer,
-- viewShowable = putStrLn . show }
printer = Viewer {
viewCatalog = printCatalog,
viewShowable = putStrLn . show }
printCatalog :: forall c. Catalog c => View c
-printCatalog x = traverse x printer
+printCatalog x = mtraverse x printer
data X = X {
cat :: Int
}
instance Catalog X where
- traverse x v = do
+ mtraverse x v = do
viewCatalog v (cat x)
main = do
let x = X { cat = 20 }
- traverse x printer
+ mtraverse x printer