diff options
Diffstat (limited to 'testsuite/tests/indexed-types')
25 files changed, 436 insertions, 429 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr index 66b24174ae..68412759e7 100644 --- a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr +++ b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr @@ -1,27 +1,28 @@ -PushedInAsGivens.hs:10:31: - Couldn't match expected type ‘a1’ with actual type ‘a’ - because type variable ‘a1’ would escape its scope - This (rigid, skolem) type variable is bound by - the type signature for: foo :: (F Int ~ [a1]) => a1 -> Int - at PushedInAsGivens.hs:9:20-44 - In the expression: y - In the first argument of ‘length’, namely ‘[x, y]’ - Relevant bindings include - x :: a1 (bound at PushedInAsGivens.hs:10:17) - foo :: a1 -> Int (bound at PushedInAsGivens.hs:10:13) - y :: a (bound at PushedInAsGivens.hs:9:5) - bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1) +PushedInAsGivens.hs:10:31: error: + • Couldn't match expected type ‘a1’ with actual type ‘a’ + because type variable ‘a1’ would escape its scope + This (rigid, skolem) type variable is bound by + the type signature for: + foo :: (F Int ~ [a1]) => a1 -> Int + at PushedInAsGivens.hs:9:13-44 + • In the expression: y + In the first argument of ‘length’, namely ‘[x, y]’ + • Relevant bindings include + x :: a1 (bound at PushedInAsGivens.hs:10:17) + foo :: a1 -> Int (bound at PushedInAsGivens.hs:10:13) + y :: a (bound at PushedInAsGivens.hs:9:5) + bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1) -PushedInAsGivens.hs:11:15: - Couldn't match expected type ‘[a]’ with actual type ‘F Int’ - In the expression: foo y - In the expression: (y, foo y) - In the expression: - let - foo :: (F Int ~ [a]) => a -> Int - foo x = length [...] - in (y, foo y) - Relevant bindings include - y :: a (bound at PushedInAsGivens.hs:9:5) - bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1) +PushedInAsGivens.hs:11:15: error: + • Couldn't match expected type ‘[a]’ with actual type ‘F Int’ + • In the expression: foo y + In the expression: (y, foo y) + In the expression: + let + foo :: (F Int ~ [a]) => a -> Int + foo x = length [...] + in (y, foo y) + • Relevant bindings include + y :: a (bound at PushedInAsGivens.hs:9:5) + bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1) diff --git a/testsuite/tests/indexed-types/should_compile/Records.hs b/testsuite/tests/indexed-types/should_compile/Records.hs index 4a08125e30..8508c66f65 100644 --- a/testsuite/tests/indexed-types/should_compile/Records.hs +++ b/testsuite/tests/indexed-types/should_compile/Records.hs @@ -26,7 +26,7 @@ f r = r { moo = 3 } class D c where data D1 c works :: Int -> D1 c -> D1 c - buggy :: Int -> D1 c -> D1 c + buggy :: Int -> D1 c -> D1 c buggy2 :: Int -> D1 c -> D1 c instance D FooC where @@ -34,7 +34,7 @@ instance D FooC where works x d = d -- d unchanged, so OK - buggy x d@(D1F { noo = k }) = + buggy x d@(D1F { noo = k }) = d { noo = k + x } buggy2 x d@(D1F { noo = k }) = diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.stderr b/testsuite/tests/indexed-types/should_compile/Simple14.stderr index 861013259c..395149121e 100644 --- a/testsuite/tests/indexed-types/should_compile/Simple14.stderr +++ b/testsuite/tests/indexed-types/should_compile/Simple14.stderr @@ -1,17 +1,18 @@ - -Simple14.hs:8:8: - Couldn't match type ‘z0’ with ‘z’ - ‘z0’ is untouchable - inside the constraints: x ~ y - bound by the type signature for: eqE :: (x ~ y) => EQ_ z0 z0 - at Simple14.hs:8:8-39 - ‘z’ is a rigid type variable bound by - the type signature for: eqE :: EQ_ x y -> ((x ~ y) => EQ_ z z) -> p - at Simple14.hs:8:8 - Expected type: EQ_ z0 z0 - Actual type: EQ_ z z - In the ambiguity check for the type signature for ‘eqE’: - eqE :: forall x y z p. EQ_ x y -> ((x ~ y) => EQ_ z z) -> p - To defer the ambiguity check to use sites, enable AllowAmbiguousTypes - In the type signature for ‘eqE’: - eqE :: EQ_ x y -> (x ~ y => EQ_ z z) -> p +
+Simple14.hs:8:8: error:
+ Couldn't match type ‘z0’ with ‘z’
+ ‘z0’ is untouchable
+ inside the constraints: x ~ y
+ bound by the type signature for:
+ eqE :: (x ~ y) => EQ_ z0 z0
+ at Simple14.hs:8:8-39
+ ‘z’ is a rigid type variable bound by
+ the type signature for:
+ eqE :: forall x y z p. EQ_ x y -> ((x ~ y) => EQ_ z z) -> p
+ at Simple14.hs:8:8
+ Expected type: EQ_ z0 z0
+ Actual type: EQ_ z z
+ In the ambiguity check for ‘eqE’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature:
+ eqE :: EQ_ x y -> (x ~ y => EQ_ z z) -> p
diff --git a/testsuite/tests/indexed-types/should_compile/T3208b.stderr b/testsuite/tests/indexed-types/should_compile/T3208b.stderr index 10f3d2a26d..b40942a5a9 100644 --- a/testsuite/tests/indexed-types/should_compile/T3208b.stderr +++ b/testsuite/tests/indexed-types/should_compile/T3208b.stderr @@ -1,24 +1,24 @@ -T3208b.hs:15:10: - Could not deduce: OTerm o0 ~ STerm 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 - The type variable ‘o0’ is ambiguous - In the expression: fce (apply f) - In an equation for ‘fce'’: fce' f = fce (apply f) +T3208b.hs:15:10: error: + • Could not deduce: OTerm o0 ~ STerm 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:1-56 + The type variable ‘o0’ is ambiguous + • 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 - 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 - The type variable ‘o0’ is ambiguous - In the first argument of ‘fce’, namely ‘(apply f)’ - In the expression: fce (apply f) - In an equation for ‘fce'’: fce' f = fce (apply f) - Relevant bindings include - f :: a (bound at T3208b.hs:15:6) - fce' :: a -> c (bound at T3208b.hs:15:1) +T3208b.hs:15:15: error: + • Could not deduce: OTerm o0 ~ STerm 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:1-56 + The type variable ‘o0’ is ambiguous + • In the first argument of ‘fce’, namely ‘(apply f)’ + In the expression: fce (apply f) + In an equation for ‘fce'’: fce' f = fce (apply f) + • 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_fail/BadSock.hs b/testsuite/tests/indexed-types/should_fail/BadSock.hs index 3e72817b8d..c34c1657e6 100644 --- a/testsuite/tests/indexed-types/should_fail/BadSock.hs +++ b/testsuite/tests/indexed-types/should_fail/BadSock.hs @@ -27,8 +27,8 @@ data Socket :: SocketType -> * where -> Socket sock type family Foo (op :: SocketOperation) :: SocketType -> Constraint where - Foo 'Read = Readable - Foo Write = Writable + Foo 'Read = Readable + Foo Write = Writable type family Operation (op :: SocketOperation) :: * where Operation 'Read = IO Message @@ -54,4 +54,4 @@ pull = undefined readSocket :: forall sock . Readable sock => Socket sock -> IO Message readSocket (Socket _ f) = f (SRead :: SockOp sock 'Read) --}
\ 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 694a7832ad..7f806db271 100644 --- a/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr +++ b/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr @@ -1,14 +1,16 @@ -
-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
- In the expression: y
- In a case alternative: T y -> y
- Relevant bindings include
- y :: c (bound at GADTwrong1.hs:12:16)
- coerce :: a -> b (bound at GADTwrong1.hs:11:1)
+ +GADTwrong1.hs:12:21: error: + • 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 :: forall a b. a -> b + at GADTwrong1.hs:10:20 + • In the expression: y + In a case alternative: T y -> y + • Relevant bindings include + y :: c (bound at GADTwrong1.hs:12:16) + coerce :: a -> b (bound at GADTwrong1.hs:11:1) diff --git a/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr b/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr index 5a0443bfa1..73f1cbc157 100644 --- a/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr +++ b/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr @@ -1,11 +1,10 @@ - -NoMatchErr.hs:19:7: - Couldn't match type ‘Memo d0’ with ‘Memo d’ - 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 - Actual type: Memo d0 a -> Memo d0 a - In the ambiguity check for the type signature for ‘f’: - f :: forall d a. Fun d => Memo d a -> Memo d a - To defer the ambiguity check to use sites, enable AllowAmbiguousTypes - In the type signature for ‘f’: f :: (Fun d) => Memo d a -> Memo d a +
+NoMatchErr.hs:19:7: error:
+ Couldn't match type ‘Memo d0’ with ‘Memo d’
+ 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
+ Actual type: Memo d0 a -> Memo d0 a
+ In the ambiguity check for ‘f’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature: f :: (Fun d) => Memo d a -> Memo d a
diff --git a/testsuite/tests/indexed-types/should_fail/Overlap6.stderr b/testsuite/tests/indexed-types/should_fail/Overlap6.stderr index b2dc99251f..6ffcda02ce 100644 --- a/testsuite/tests/indexed-types/should_fail/Overlap6.stderr +++ b/testsuite/tests/indexed-types/should_fail/Overlap6.stderr @@ -1,13 +1,14 @@ -Overlap6.hs:15:7: - Couldn't match type ‘x’ with ‘And x 'True’ +Overlap6.hs:15:7: error: + • Couldn't match type ‘x’ with ‘And x 'True’ ‘x’ is a rigid type variable bound by - the type signature for: g :: Proxy x -> Proxy (And x 'True) - at Overlap6.hs:14:6 - Expected type: Proxy (And x 'True) - Actual type: Proxy x - In the expression: x - In an equation for ‘g’: g x = x - Relevant bindings include - x :: Proxy x (bound at Overlap6.hs:15:3) - g :: Proxy x -> Proxy (And x 'True) (bound at Overlap6.hs:15:1) + the type signature for: + g :: forall (x :: Bool). Proxy x -> Proxy (And x 'True) + at Overlap6.hs:14:6 + Expected type: Proxy (And x 'True) + Actual type: Proxy x + • In the expression: x + In an equation for ‘g’: g x = x + • Relevant bindings include + x :: Proxy x (bound at Overlap6.hs:15:3) + g :: Proxy x -> Proxy (And x 'True) (bound at Overlap6.hs:15:1) diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr index 133eccf642..9a10408997 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr @@ -1,6 +1,5 @@ - -SimpleFail15.hs:5:8: - Illegal polymorphic or qualified type: (a ~ b) => t - Perhaps you intended to use RankNTypes or Rank2Types - In the type signature for ‘foo’: - foo :: (a, b) -> (a ~ b => t) -> (a, b) +
+SimpleFail15.hs:5:8: error:
+ Illegal polymorphic or qualified type: (a ~ b) => t
+ Perhaps you intended to use RankNTypes or Rank2Types
+ In the type signature: foo :: (a, b) -> (a ~ b => t) -> (a, b)
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr index 74db7b1dcf..fa635378a4 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr @@ -1,5 +1,5 @@ -SimpleFail16.hs:10:12: +SimpleFail16.hs:10:12: error: Couldn't match expected type ‘p0 a0’ with actual type ‘F ()’ The type variables ‘p0’, ‘a0’ are ambiguous In the first argument of ‘foo’, namely ‘(undefined :: F ())’ diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr index 8288d30619..4b9c3657db 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr @@ -1,12 +1,13 @@ -SimpleFail5a.hs:31:11: - Couldn't match type ‘a’ with ‘Int’ +SimpleFail5a.hs:31:11: error: + • Couldn't match type ‘a’ with ‘Int’ ‘a’ is a rigid type variable bound by - the type signature for: bar3wrong :: S3 a -> a - at SimpleFail5a.hs:30:14 - Expected type: S3 a - Actual type: S3 Int - In the pattern: D3Int - In an equation for ‘bar3wrong’: bar3wrong D3Int = 1 - Relevant bindings include - bar3wrong :: S3 a -> a (bound at SimpleFail5a.hs:31:1) + the type signature for: + bar3wrong :: forall a. S3 a -> a + at SimpleFail5a.hs:30:14 + Expected type: S3 a + Actual type: S3 Int + • In the pattern: D3Int + In an equation for ‘bar3wrong’: bar3wrong D3Int = 1 + • Relevant bindings include + bar3wrong :: S3 a -> a (bound at SimpleFail5a.hs:31:1) diff --git a/testsuite/tests/indexed-types/should_fail/T1897b.stderr b/testsuite/tests/indexed-types/should_fail/T1897b.stderr index 936aa26924..459f6c8a17 100644 --- a/testsuite/tests/indexed-types/should_fail/T1897b.stderr +++ b/testsuite/tests/indexed-types/should_fail/T1897b.stderr @@ -1,12 +1,13 @@ -T1897b.hs:16:1: +T1897b.hs:16:1: error: 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 + In the ambiguity check for the inferred type for ‘isValid’ + To defer the ambiguity check to use sites, enable AllowAmbiguousTypes + When checking the inferred type isValid :: forall a (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 f986888cfd..ce7d51c5de 100644 --- a/testsuite/tests/indexed-types/should_fail/T1900.stderr +++ b/testsuite/tests/indexed-types/should_fail/T1900.stderr @@ -1,12 +1,11 @@ -T1900.hs:7:3:
+T1900.hs:7:3: error:
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 -> Depend s
Actual type: Depend s0 -> Depend s0
- In the ambiguity check for the type signature for ‘trans’:
- trans :: forall s. Bug s => Depend s -> Depend s
+ In the ambiguity check for ‘trans’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the class method:
trans :: forall s. Bug s => Depend s -> Depend s
diff --git a/testsuite/tests/indexed-types/should_fail/T2693.stderr b/testsuite/tests/indexed-types/should_fail/T2693.stderr index 182bbde8ed..d3546c21ba 100644 --- a/testsuite/tests/indexed-types/should_fail/T2693.stderr +++ b/testsuite/tests/indexed-types/should_fail/T2693.stderr @@ -1,38 +1,36 @@ -
-T2693.hs:11:7:
- Couldn't match expected type ‘TFn a’ with actual type ‘TFn a0’
- NB: ‘TFn’ is a type function, and may not be injective
- The type variable ‘a0’ is ambiguous
- When checking that ‘x’ has the inferred type
- x :: forall a. TFn a
- Probable cause: the inferred type is ambiguous
- In the expression:
- do { let Just x = ...;
- let n = fst x + fst x;
- return () }
- In an equation for ‘f’:
- f = do { let Just x = ...;
- let n = ...;
- return () }
-
-T2693.hs:19:15:
- Couldn't match expected type ‘(a5, b0)’ with actual type ‘TFn a2’
- The type variables ‘b0’, ‘a2’, ‘a5’ are ambiguous
- In the first argument of ‘fst’, namely ‘x’
- In the first argument of ‘(+)’, namely ‘fst x’
- Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
-
-T2693.hs:19:23:
- Couldn't match expected type ‘(a3, a5)’ with actual type ‘TFn a4’
- The type variables ‘a3’, ‘a4’, ‘a5’ are ambiguous
- In the first argument of ‘snd’, namely ‘x’
- In the second argument of ‘(+)’, namely ‘snd x’
- Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
-
-T2693.hs:29:20:
- Couldn't match type ‘TFn a0’ with ‘PVR a1’
- The type variables ‘a0’, ‘a1’ are ambiguous
- Expected type: () -> Maybe (PVR a1)
- Actual type: () -> Maybe (TFn a0)
- In the first argument of ‘mapM’, namely ‘g’
- In a stmt of a 'do' block: pvs <- mapM g undefined
+ +T2693.hs:12:15: error: + • Couldn't match expected type ‘(a8, b1)’ with actual type ‘TFn a6’ + The type variables ‘b1’, ‘a6’, ‘a8’ are ambiguous + • In the first argument of ‘fst’, namely ‘x’ + In the first argument of ‘(+)’, namely ‘fst x’ + • Relevant bindings include n :: a8 (bound at T2693.hs:12:7) + +T2693.hs:12:23: error: + • Couldn't match expected type ‘(a8, b2)’ with actual type ‘TFn a7’ + The type variables ‘b2’, ‘a7’, ‘a8’ are ambiguous + • In the first argument of ‘fst’, namely ‘x’ + In the second argument of ‘(+)’, namely ‘fst x’ + • Relevant bindings include n :: a8 (bound at T2693.hs:12:7) + +T2693.hs:19:15: error: + • Couldn't match expected type ‘(a5, b0)’ with actual type ‘TFn a2’ + The type variables ‘b0’, ‘a2’, ‘a5’ are ambiguous + • In the first argument of ‘fst’, namely ‘x’ + In the first argument of ‘(+)’, namely ‘fst x’ + • Relevant bindings include n :: a5 (bound at T2693.hs:19:7) + +T2693.hs:19:23: error: + • Couldn't match expected type ‘(a3, a5)’ with actual type ‘TFn a4’ + The type variables ‘a3’, ‘a4’, ‘a5’ are ambiguous + • In the first argument of ‘snd’, namely ‘x’ + In the second argument of ‘(+)’, namely ‘snd x’ + • Relevant bindings include n :: a5 (bound at T2693.hs:19:7) + +T2693.hs:29:20: error: + • Couldn't match type ‘TFn a0’ with ‘PVR a1’ + The type variables ‘a0’, ‘a1’ are ambiguous + Expected type: () -> Maybe (PVR a1) + Actual type: () -> Maybe (TFn a0) + • In the first argument of ‘mapM’, namely ‘g’ + In a stmt of a 'do' block: pvs <- mapM g undefined diff --git a/testsuite/tests/indexed-types/should_fail/T3330a.stderr b/testsuite/tests/indexed-types/should_fail/T3330a.stderr index a114158938..acefda7253 100644 --- a/testsuite/tests/indexed-types/should_fail/T3330a.stderr +++ b/testsuite/tests/indexed-types/should_fail/T3330a.stderr @@ -1,44 +1,52 @@ -T3330a.hs:19:34: - Couldn't match type ‘s’ with ‘(->) (s0 ix0 -> ix1)’ +T3330a.hs:19:34: error: + • Couldn't match type ‘s’ with ‘(->) (s0 ix0 -> ix1)’ ‘s’ is a rigid type variable bound by - the type signature for: children :: s ix -> PF s r ix -> [AnyF s] - at T3330a.hs:18:13 - Expected type: (s0 ix0 -> ix1) - -> r ix1 -> Writer [AnyF s] (r'0 ix1) - Actual type: s ix - In the first argument of ‘hmapM’, namely ‘p’ - In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’ - Relevant bindings include - x :: PF s r ix (bound at T3330a.hs:19:12) - p :: s ix (bound at T3330a.hs:19:10) - children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1) + the type signature for: + children :: forall (s :: * -> *) ix (r :: * -> *). + s ix -> PF s r ix -> [AnyF s] + at T3330a.hs:18:13 + Expected type: (s0 ix0 -> ix1) + -> r ix1 -> Writer [AnyF s] (r'0 ix1) + Actual type: s ix + • In the first argument of ‘hmapM’, namely ‘p’ + In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’ + • Relevant bindings include + x :: PF s r ix (bound at T3330a.hs:19:12) + p :: s ix (bound at T3330a.hs:19:10) + children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1) -T3330a.hs:19:34: - Couldn't match type ‘ix’ with ‘r ix1 -> Writer [AnyF s] (r'0 ix1)’ +T3330a.hs:19:34: error: + • Couldn't match type ‘ix’ + with ‘r ix1 -> Writer [AnyF s] (r'0 ix1)’ ‘ix’ is a rigid type variable bound by - the type signature for: children :: s ix -> PF s r ix -> [AnyF s] - at T3330a.hs:18:13 - Expected type: (s0 ix0 -> ix1) - -> r ix1 -> Writer [AnyF s] (r'0 ix1) - Actual type: s ix - In the first argument of ‘hmapM’, namely ‘p’ - In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’ - Relevant bindings include - x :: PF s r ix (bound at T3330a.hs:19:12) - p :: s ix (bound at T3330a.hs:19:10) - children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1) + the type signature for: + children :: forall (s :: * -> *) ix (r :: * -> *). + s ix -> PF s r ix -> [AnyF s] + at T3330a.hs:18:13 + Expected type: (s0 ix0 -> ix1) + -> r ix1 -> Writer [AnyF s] (r'0 ix1) + Actual type: s ix + • In the first argument of ‘hmapM’, namely ‘p’ + In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’ + • Relevant bindings include + x :: PF s r ix (bound at T3330a.hs:19:12) + p :: s ix (bound at T3330a.hs:19:10) + children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1) -T3330a.hs:19:44: - Couldn't match type ‘ix’ with ‘r0 ix0 -> Writer [AnyF s0] (r0 ix0)’ +T3330a.hs:19:44: error: + • Couldn't match type ‘ix’ + with ‘r0 ix0 -> Writer [AnyF s0] (r0 ix0)’ ‘ix’ is a rigid type variable bound by - the type signature for: children :: s ix -> PF s r ix -> [AnyF s] - at T3330a.hs:18:13 - Expected type: PF s r (r0 ix0 -> Writer [AnyF s0] (r0 ix0)) - Actual type: PF s r ix - In the third argument of ‘hmapM’, namely ‘x’ - In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’ - Relevant bindings include - x :: PF s r ix (bound at T3330a.hs:19:12) - p :: s ix (bound at T3330a.hs:19:10) - children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1) + the type signature for: + children :: forall (s :: * -> *) ix (r :: * -> *). + s ix -> PF s r ix -> [AnyF s] + at T3330a.hs:18:13 + Expected type: PF s r (r0 ix0 -> Writer [AnyF s0] (r0 ix0)) + Actual type: PF s r ix + • In the third argument of ‘hmapM’, namely ‘x’ + In the first argument of ‘execWriter’, namely ‘(hmapM p collect x)’ + • Relevant bindings include + x :: PF s r ix (bound at T3330a.hs:19:12) + p :: s ix (bound at T3330a.hs:19:10) + children :: s ix -> PF s r ix -> [AnyF s] (bound at T3330a.hs:19:1) diff --git a/testsuite/tests/indexed-types/should_fail/T3440.stderr b/testsuite/tests/indexed-types/should_fail/T3440.stderr index cfc5570c66..7b29bb6f52 100644 --- a/testsuite/tests/indexed-types/should_fail/T3440.stderr +++ b/testsuite/tests/indexed-types/should_fail/T3440.stderr @@ -1,22 +1,23 @@ -T3440.hs:11:22: - Could not deduce: a1 ~ a - from the context: Fam a ~ Fam a1 - bound by a pattern with constructor: - GADT :: forall a. a -> Fam a -> GADT (Fam a), - in an equation for ‘unwrap’ - at T3440.hs:11:9-16 +T3440.hs:11:22: error: + • Could not deduce: a1 ~ a + from the context: Fam a ~ Fam a1 + bound by a pattern with constructor: + GADT :: forall a. a -> Fam a -> GADT (Fam a), + in an equation for ‘unwrap’ + at T3440.hs:11:9-16 ‘a1’ is a rigid type variable bound by - a pattern with constructor: - GADT :: forall a. a -> Fam a -> GADT (Fam a), - in an equation for ‘unwrap’ - at T3440.hs:11:9 + a pattern with constructor: + GADT :: forall a. a -> Fam a -> GADT (Fam a), + in an equation for ‘unwrap’ + at T3440.hs:11:9 ‘a’ is a rigid type variable bound by - the type signature for: unwrap :: GADT (Fam a) -> (a, Fam a) - at T3440.hs:10:11 - In the expression: x - In the expression: (x, y) - Relevant bindings include - y :: Fam a1 (bound at T3440.hs:11:16) - x :: a1 (bound at T3440.hs:11:14) - unwrap :: GADT (Fam a) -> (a, Fam a) (bound at T3440.hs:11:1) + the type signature for: + unwrap :: forall a. GADT (Fam a) -> (a, Fam a) + at T3440.hs:10:11 + • In the expression: x + In the expression: (x, y) + • Relevant bindings include + y :: Fam a1 (bound at T3440.hs:11:16) + x :: a1 (bound at T3440.hs:11:14) + unwrap :: GADT (Fam a) -> (a, Fam a) (bound at T3440.hs:11:1) diff --git a/testsuite/tests/indexed-types/should_fail/T4093a.stderr b/testsuite/tests/indexed-types/should_fail/T4093a.stderr index efeb34a94a..8f46170339 100644 --- a/testsuite/tests/indexed-types/should_fail/T4093a.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4093a.stderr @@ -1,14 +1,16 @@ T4093a.hs:8:8: error: - Could not deduce: e ~ () - 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 + • Could not deduce: e ~ () + from the context: Foo e ~ Maybe e + bound by the type signature for: + hang :: (Foo e ~ Maybe e) => Foo e + at T4093a.hs:7:1-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 () - In the expression: Just () - In an equation for ‘hang’: hang = Just () - Relevant bindings include hang :: Foo e (bound at T4093a.hs:8:1) + the type signature for: + hang :: forall e. (Foo e ~ Maybe e) => Foo e + at T4093a.hs:7:9 + Expected type: Foo e + Actual type: Maybe () + • In the expression: Just () + In an equation for ‘hang’: hang = Just () + • Relevant bindings include hang :: Foo e (bound at T4093a.hs:8:1) diff --git a/testsuite/tests/indexed-types/should_fail/T4093b.stderr b/testsuite/tests/indexed-types/should_fail/T4093b.stderr index 53d7844f4f..0950de8c66 100644 --- a/testsuite/tests/indexed-types/should_fail/T4093b.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4093b.stderr @@ -1,41 +1,42 @@ -T4093b.hs:31:13: - Could not deduce: e ~ C - from the context: (EitherCO e (A C O n) (A O O n) ~ A e O n, - EitherCO x (A C C n) (A C O n) ~ A C x n) - bound by the type signature for: - blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n, - EitherCO x (A C C n) (A C O n) ~ A C x n) => - Block n e x -> A e x n - at T4093b.hs:(20,3)-(22,26) +T4093b.hs:31:13: error: + • Could not deduce: e ~ C + from the context: (EitherCO e (A C O n) (A O O n) ~ A e O n, + EitherCO x (A C C n) (A C O n) ~ A C x n) + bound by the type signature for: + blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n, + EitherCO x (A C C n) (A C O n) ~ A C x n) => + Block n e x -> A e x n + at T4093b.hs:(19,1)-(22,26) ‘e’ is a rigid type variable bound by - the type signature for: - blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n, + the type signature for: + blockToNodeList :: forall (n :: * -> * -> *) e x. + (EitherCO e (A C O n) (A O O n) ~ A e O n, EitherCO x (A C C n) (A C O n) ~ A C x n) => Block n e x -> A e x n - at T4093b.hs:20:12 - Expected type: EitherCO e (A C O n) (A O O n) - Actual type: (MaybeC C (n C O), MaybeC O (n O C)) - In the expression: (JustC n, NothingC) - In an equation for ‘f’: f n _ = (JustC n, NothingC) - In an equation for ‘blockToNodeList’: - blockToNodeList b - = foldBlockNodesF (f, l) b z - where - z :: - EitherCO e (EitherCO e (A C O n) (A O O n)) (EitherCO e (A C O n) (A O O n)) - z = undefined - f :: - n C O - -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C O n) (A O O n) - f n _ = (JustC n, NothingC) - .... - Relevant bindings include - f :: n C O - -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C O n) (A O O n) - (bound at T4093b.hs:31:5) - l :: n O C - -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C C n) (A O C n) - (bound at T4093b.hs:34:5) - b :: Block n e x (bound at T4093b.hs:25:17) - blockToNodeList :: Block n e x -> A e x n (bound at T4093b.hs:25:1) + at T4093b.hs:20:12 + Expected type: EitherCO e (A C O n) (A O O n) + Actual type: (MaybeC C (n C O), MaybeC O (n O C)) + • In the expression: (JustC n, NothingC) + In an equation for ‘f’: f n _ = (JustC n, NothingC) + In an equation for ‘blockToNodeList’: + blockToNodeList b + = foldBlockNodesF (f, l) b z + where + z :: + EitherCO e (EitherCO e (A C O n) (A O O n)) (EitherCO e (A C O n) (A O O n)) + z = undefined + f :: + n C O + -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C O n) (A O O n) + f n _ = (JustC n, NothingC) + .... + • Relevant bindings include + f :: n C O + -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C O n) (A O O n) + (bound at T4093b.hs:31:5) + l :: n O C + -> EitherCO e (A C O n) (A O O n) -> EitherCO e (A C C n) (A O C n) + (bound at T4093b.hs:34:5) + b :: Block n e x (bound at T4093b.hs:25:17) + blockToNodeList :: Block n e x -> A e x n (bound at T4093b.hs:25:1) diff --git a/testsuite/tests/indexed-types/should_fail/T4174.stderr b/testsuite/tests/indexed-types/should_fail/T4174.stderr index 872004519e..60ae24ccfa 100644 --- a/testsuite/tests/indexed-types/should_fail/T4174.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4174.stderr @@ -1,28 +1,32 @@ -T4174.hs:42:12: - Couldn't match type ‘a’ with ‘SmStep’ +T4174.hs:42:12: error: + • 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) - In the expression: sync_large_objects - In an equation for ‘testcase’: testcase = sync_large_objects - Relevant bindings include - testcase :: m (Field (Way (GHC6'8 minor) n t p) a b) - (bound at T4174.hs:42:1) + the type signature for: + testcase :: forall (m :: * -> *) minor n t p a b. + 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) + • In the expression: sync_large_objects + In an equation for ‘testcase’: testcase = sync_large_objects + • Relevant bindings include + testcase :: m (Field (Way (GHC6'8 minor) n t p) a b) + (bound at T4174.hs:42:1) -T4174.hs:42:12: - Couldn't match type ‘b’ with ‘RtsSpinLock’ +T4174.hs:42:12: error: + • 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) - In the expression: sync_large_objects - In an equation for ‘testcase’: testcase = sync_large_objects - Relevant bindings include - testcase :: m (Field (Way (GHC6'8 minor) n t p) a b) - (bound at T4174.hs:42:1) + the type signature for: + testcase :: forall (m :: * -> *) minor n t p a b. + 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) + • In the expression: sync_large_objects + In an equation for ‘testcase’: testcase = sync_large_objects + • Relevant bindings include + testcase :: m (Field (Way (GHC6'8 minor) n t p) a b) + (bound at T4174.hs:42:1) diff --git a/testsuite/tests/indexed-types/should_fail/T4272.stderr b/testsuite/tests/indexed-types/should_fail/T4272.stderr index 84d50dc69f..a3b750a459 100644 --- a/testsuite/tests/indexed-types/should_fail/T4272.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4272.stderr @@ -1,16 +1,17 @@ -T4272.hs:15:26: - Couldn't match type ‘a’ with ‘TermFamily a a’ +T4272.hs:15:26: error: + • 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 - Expected type: TermFamily a (TermFamily a a) - Actual type: TermFamily a a - In the first argument of ‘terms’, namely - ‘(undefined :: TermFamily a a)’ - In the second argument of ‘prune’, namely - ‘(terms (undefined :: TermFamily a a))’ - In the expression: prune t (terms (undefined :: TermFamily a a)) - Relevant bindings include - t :: TermFamily a a (bound at T4272.hs:15:6) - laws :: TermFamily a a -> b (bound at T4272.hs:15:1) + the type signature for: + laws :: forall a b. TermLike a => TermFamily a a -> b + at T4272.hs:14:16 + Expected type: TermFamily a (TermFamily a a) + Actual type: TermFamily a a + • In the first argument of ‘terms’, namely + ‘(undefined :: TermFamily a a)’ + In the second argument of ‘prune’, namely + ‘(terms (undefined :: TermFamily a a))’ + In the expression: prune t (terms (undefined :: TermFamily a a)) + • Relevant bindings include + t :: TermFamily a a (bound at T4272.hs:15:6) + laws :: TermFamily a a -> b (bound at T4272.hs:15:1) diff --git a/testsuite/tests/indexed-types/should_fail/T7194.stderr b/testsuite/tests/indexed-types/should_fail/T7194.stderr index b28868abdb..d8655f0146 100644 --- a/testsuite/tests/indexed-types/should_fail/T7194.stderr +++ b/testsuite/tests/indexed-types/should_fail/T7194.stderr @@ -1,13 +1,14 @@ -T7194.hs:18:35: - Couldn't match expected type ‘b0’ with actual type ‘F a’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - the type signature for: g :: C (F a) => a -> Int - at T7194.hs:17:23-41 - In the expression: foo y - In the first argument of ‘length’, namely ‘[x, foo y]’ - Relevant bindings include - y :: a (bound at T7194.hs:18:20) - g :: a -> Int (bound at T7194.hs:18:18) - x :: b0 (bound at T7194.hs:17:9) +T7194.hs:18:35: error: + • Couldn't match expected type ‘b0’ with actual type ‘F a’ + because type variable ‘a’ would escape its scope + This (rigid, skolem) type variable is bound by + the type signature for: + g :: C (F a) => a -> Int + at T7194.hs:17:18-41 + • In the expression: foo y + In the first argument of ‘length’, namely ‘[x, foo y]’ + • Relevant bindings include + y :: a (bound at T7194.hs:18:20) + g :: a -> Int (bound at T7194.hs:18:18) + x :: b0 (bound at T7194.hs:17:9) diff --git a/testsuite/tests/indexed-types/should_fail/T9036.stderr b/testsuite/tests/indexed-types/should_fail/T9036.stderr index 2fdf9c6557..3bae5a6ef2 100644 --- a/testsuite/tests/indexed-types/should_fail/T9036.stderr +++ b/testsuite/tests/indexed-types/should_fail/T9036.stderr @@ -1,13 +1,11 @@ - -T9036.hs:17:17: - Couldn't match type ‘Curried t0 [t0]’ with ‘Curried t [t]’ - 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] - In the ambiguity check for the type signature for ‘simpleLogger’: - simpleLogger :: forall t after. - Maybe (GetMonad t after) -> Curried t [t] - To defer the ambiguity check to use sites, enable AllowAmbiguousTypes - In the type signature for ‘simpleLogger’: - simpleLogger :: Maybe (GetMonad t after) -> t `Curried` [t] +
+T9036.hs:17:17: error:
+ Couldn't match type ‘Curried t0 [t0]’ with ‘Curried t [t]’
+ 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]
+ In the ambiguity check for ‘simpleLogger’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature:
+ simpleLogger :: Maybe (GetMonad t after) -> t `Curried` [t]
diff --git a/testsuite/tests/indexed-types/should_fail/T9171.stderr b/testsuite/tests/indexed-types/should_fail/T9171.stderr index 28c1a2373f..9a618c50bf 100644 --- a/testsuite/tests/indexed-types/should_fail/T9171.stderr +++ b/testsuite/tests/indexed-types/should_fail/T9171.stderr @@ -1,22 +1,11 @@ - -T9171.hs:10:1: - Couldn't match expected type ‘GetParam Base (GetParam Base Int)’ - with actual type ‘GetParam Base (GetParam Base Int)’ - NB: ‘GetParam’ is a type function, and may not be injective - The kind variable ‘k0’ is ambiguous - Use -fprint-explicit-kinds to see the kind arguments - When checking that ‘foo’ has the inferred type - foo :: forall (k :: BOX). GetParam Base (GetParam Base Int) - Probable cause: the inferred type is ambiguous - -T9171.hs:10:20: - Couldn't match expected type ‘GetParam Base (GetParam Base Int)’ - with actual type ‘GetParam Base (GetParam Base Int)’ - NB: ‘GetParam’ is a type function, and may not be injective - The kind variable ‘k0’ is ambiguous - Use -fprint-explicit-kinds to see the kind arguments - In the ambiguity check for an expression type signature: - forall (k :: BOX). GetParam Base (GetParam Base Int) - To defer the ambiguity check to use sites, enable AllowAmbiguousTypes - In an expression type signature: GetParam Base (GetParam Base Int) - In the expression: undefined :: GetParam Base (GetParam Base Int) +
+T9171.hs:10:20: error:
+ Couldn't match expected type ‘GetParam Base (GetParam Base Int)’
+ with actual type ‘GetParam Base (GetParam Base Int)’
+ NB: ‘GetParam’ is a type function, and may not be injective
+ The kind variable ‘k0’ is ambiguous
+ Use -fprint-explicit-kinds to see the kind arguments
+ In the ambiguity check for an expression type signature
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In an expression type signature: GetParam Base (GetParam Base Int)
+ In the expression: undefined :: GetParam Base (GetParam Base Int)
diff --git a/testsuite/tests/indexed-types/should_fail/T9433.stderr b/testsuite/tests/indexed-types/should_fail/T9433.stderr index bd4ab42878..73dfe9e900 100644 --- a/testsuite/tests/indexed-types/should_fail/T9433.stderr +++ b/testsuite/tests/indexed-types/should_fail/T9433.stderr @@ -1,4 +1,4 @@ T9433.hs:14:6: error:
The type family ‘Id’ should have 1 argument, but has been given none
- In the type signature for ‘x’: x :: Map Id [Bool]
+ In the type signature: x :: Map Id [Bool]
diff --git a/testsuite/tests/indexed-types/should_fail/T9662.stderr b/testsuite/tests/indexed-types/should_fail/T9662.stderr index 3c800183a1..2d55f9dcea 100644 --- a/testsuite/tests/indexed-types/should_fail/T9662.stderr +++ b/testsuite/tests/indexed-types/should_fail/T9662.stderr @@ -1,84 +1,84 @@ T9662.hs:49:7: error: - Couldn't match type ‘k’ with ‘n’ + • Couldn't match type ‘k’ with ‘n’ ‘k’ is a rigid type variable bound by - the type signature for: - test :: Shape (((sh :. k) :. m) :. n) - -> Shape (((sh :. m) :. n) :. k) - at T9662.hs:44:9 + the type signature for: + test :: forall sh k m n. + Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k) + at T9662.hs:44:9 ‘n’ is a rigid type variable bound by - the type signature for: - test :: Shape (((sh :. k) :. m) :. n) - -> Shape (((sh :. m) :. n) :. k) - at T9662.hs:44:9 - Expected type: Exp (((sh :. m) :. n) :. k) - -> Exp (((sh :. k) :. m) :. n) - Actual type: Exp (((sh :. k) :. m) :. n) - -> Exp (((sh :. k) :. m) :. n) - In the second argument of ‘backpermute’, namely ‘id’ - In the expression: - backpermute - (modify - (atom :. atom :. atom :. atom) - (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k))) - id - Relevant bindings include - test :: Shape (((sh :. k) :. m) :. n) - -> Shape (((sh :. m) :. n) :. k) - (bound at T9662.hs:45:1) + the type signature for: + test :: forall sh k m n. + Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k) + at T9662.hs:44:9 + Expected type: Exp (((sh :. m) :. n) :. k) + -> Exp (((sh :. k) :. m) :. n) + Actual type: Exp (((sh :. k) :. m) :. n) + -> Exp (((sh :. k) :. m) :. n) + • In the second argument of ‘backpermute’, namely ‘id’ + In the expression: + backpermute + (modify + (atom :. atom :. atom :. atom) + (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k))) + id + • Relevant bindings include + test :: Shape (((sh :. k) :. m) :. n) + -> Shape (((sh :. m) :. n) :. k) + (bound at T9662.hs:45:1) T9662.hs:49:7: error: - Couldn't match type ‘m’ with ‘k’ + • Couldn't match type ‘m’ with ‘k’ ‘m’ is a rigid type variable bound by - the type signature for: - test :: Shape (((sh :. k) :. m) :. n) - -> Shape (((sh :. m) :. n) :. k) - at T9662.hs:44:9 + the type signature for: + test :: forall sh k m n. + Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k) + at T9662.hs:44:9 ‘k’ is a rigid type variable bound by - the type signature for: - test :: Shape (((sh :. k) :. m) :. n) - -> Shape (((sh :. m) :. n) :. k) - at T9662.hs:44:9 - Expected type: Exp (((sh :. m) :. n) :. k) - -> Exp (((sh :. k) :. m) :. n) - Actual type: Exp (((sh :. k) :. m) :. n) - -> Exp (((sh :. k) :. m) :. n) - In the second argument of ‘backpermute’, namely ‘id’ - In the expression: - backpermute - (modify - (atom :. atom :. atom :. atom) - (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k))) - id - Relevant bindings include - test :: Shape (((sh :. k) :. m) :. n) - -> Shape (((sh :. m) :. n) :. k) - (bound at T9662.hs:45:1) + the type signature for: + test :: forall sh k m n. + Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k) + at T9662.hs:44:9 + Expected type: Exp (((sh :. m) :. n) :. k) + -> Exp (((sh :. k) :. m) :. n) + Actual type: Exp (((sh :. k) :. m) :. n) + -> Exp (((sh :. k) :. m) :. n) + • In the second argument of ‘backpermute’, namely ‘id’ + In the expression: + backpermute + (modify + (atom :. atom :. atom :. atom) + (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k))) + id + • Relevant bindings include + test :: Shape (((sh :. k) :. m) :. n) + -> Shape (((sh :. m) :. n) :. k) + (bound at T9662.hs:45:1) T9662.hs:49:7: error: - Couldn't match type ‘n’ with ‘m’ + • Couldn't match type ‘n’ with ‘m’ ‘n’ is a rigid type variable bound by - the type signature for: - test :: Shape (((sh :. k) :. m) :. n) - -> Shape (((sh :. m) :. n) :. k) - at T9662.hs:44:9 + the type signature for: + test :: forall sh k m n. + Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k) + at T9662.hs:44:9 ‘m’ is a rigid type variable bound by - the type signature for: - test :: Shape (((sh :. k) :. m) :. n) - -> Shape (((sh :. m) :. n) :. k) - at T9662.hs:44:9 - Expected type: Exp (((sh :. m) :. n) :. k) - -> Exp (((sh :. k) :. m) :. n) - Actual type: Exp (((sh :. k) :. m) :. n) - -> Exp (((sh :. k) :. m) :. n) - In the second argument of ‘backpermute’, namely ‘id’ - In the expression: - backpermute - (modify - (atom :. atom :. atom :. atom) - (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k))) - id - Relevant bindings include - test :: Shape (((sh :. k) :. m) :. n) - -> Shape (((sh :. m) :. n) :. k) - (bound at T9662.hs:45:1) + the type signature for: + test :: forall sh k m n. + Shape (((sh :. k) :. m) :. n) -> Shape (((sh :. m) :. n) :. k) + at T9662.hs:44:9 + Expected type: Exp (((sh :. m) :. n) :. k) + -> Exp (((sh :. k) :. m) :. n) + Actual type: Exp (((sh :. k) :. m) :. n) + -> Exp (((sh :. k) :. m) :. n) + • In the second argument of ‘backpermute’, namely ‘id’ + In the expression: + backpermute + (modify + (atom :. atom :. atom :. atom) + (\ (sh :. k :. m :. n) -> (sh :. m :. n :. k))) + id + • Relevant bindings include + test :: Shape (((sh :. k) :. m) :. n) + -> Shape (((sh :. m) :. n) :. k) + (bound at T9662.hs:45:1) |