summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-01-03 23:27:21 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-01-06 14:18:44 +0000
commit00e1fc1b18e1b5aa5db18bee9f9adc67435f00b0 (patch)
treedebc157bb5e87e8cf464f9fd9517c089a9dd5861 /testsuite/tests/typecheck
parentf17992a4954ac14cc6a3fe6a61ec6544a098da93 (diff)
downloadhaskell-00e1fc1b18e1b5aa5db18bee9f9adc67435f00b0.tar.gz
Modify a couple of error messages slightly
In particular In the type signature for: f :: Int -> Int I added the colon Also reword the "maybe you haven't applied a function to enough arguments?" suggestion to make grammatical sense. These tiny changes affect a lot of error messages.
Diffstat (limited to 'testsuite/tests/typecheck')
-rw-r--r--testsuite/tests/typecheck/should_compile/FD1.stderr18
-rw-r--r--testsuite/tests/typecheck/should_compile/FD2.stderr38
-rw-r--r--testsuite/tests/typecheck/should_compile/FD3.stderr28
-rw-r--r--testsuite/tests/typecheck/should_compile/T7220a.stderr28
-rw-r--r--testsuite/tests/typecheck/should_compile/T9834.stderr142
-rw-r--r--testsuite/tests/typecheck/should_compile/tc141.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr24
-rw-r--r--testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr105
-rw-r--r--testsuite/tests/typecheck/should_fail/IPFail.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/T1899.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/T2714.stderr48
-rw-r--r--testsuite/tests/typecheck/should_fail/T2846b.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/T3592.stderr32
-rw-r--r--testsuite/tests/typecheck/should_fail/T5236.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/T5300.stderr64
-rw-r--r--testsuite/tests/typecheck/should_fail/T7453.stderr90
-rw-r--r--testsuite/tests/typecheck/should_fail/T7748a.stderr36
-rw-r--r--testsuite/tests/typecheck/should_fail/T8392a.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/T8450.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/T9109.stderr29
-rw-r--r--testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/mc22.stderr42
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail034.stderr24
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail065.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail067.stderr152
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail068.stderr192
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail072.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail097.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail099.stderr29
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail102.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail103.stderr30
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail125.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail131.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail142.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail153.stderr32
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail167.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail171.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail174.stderr64
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail175.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail179.stderr34
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail201.stderr40
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail206.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail208.stderr18
44 files changed, 840 insertions, 844 deletions
diff --git a/testsuite/tests/typecheck/should_compile/FD1.stderr b/testsuite/tests/typecheck/should_compile/FD1.stderr
index 34ea4bff61..2b0ac1733a 100644
--- a/testsuite/tests/typecheck/should_compile/FD1.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD1.stderr
@@ -1,9 +1,9 @@
-
-FD1.hs:16:1:
- 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
- Relevant bindings include plus :: Int -> a (bound at FD1.hs:16:1)
- The equation(s) for ‘plus’ have two arguments,
- but its type ‘Int -> a’ has only one
+
+FD1.hs:16:1:
+ 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
+ Relevant bindings include plus :: Int -> a (bound at FD1.hs:16:1)
+ The equation(s) for ‘plus’ have two arguments,
+ but its type ‘Int -> a’ has only one
diff --git a/testsuite/tests/typecheck/should_compile/FD2.stderr b/testsuite/tests/typecheck/should_compile/FD2.stderr
index 9ebfabee3b..0134d87768 100644
--- a/testsuite/tests/typecheck/should_compile/FD2.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD2.stderr
@@ -1,19 +1,19 @@
-
-FD2.hs:26:34:
- 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
- at FD2.hs:21:13
- ‘e1’ is a rigid type variable bound by
- the type signature for
- mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
- at FD2.hs:24:18
- Relevant bindings include
- y :: e1 (bound at FD2.hs:26:23)
- x :: e1 (bound at FD2.hs:26:15)
- mf :: e1 -> Maybe e1 -> Maybe e1 (bound at FD2.hs:25:12)
- f :: e -> e -> e (bound at FD2.hs:22:10)
- foldr1 :: (e -> e -> e) -> a -> e (bound at FD2.hs:22:3)
- In the first argument of ‘Just’, namely ‘(f x y)’
- In the expression: Just (f x y)
+
+FD2.hs:26:34:
+ 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
+ at FD2.hs:21:13
+ ‘e1’ is a rigid type variable bound by
+ the type signature for:
+ mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
+ at FD2.hs:24:18
+ Relevant bindings include
+ y :: e1 (bound at FD2.hs:26:23)
+ x :: e1 (bound at FD2.hs:26:15)
+ mf :: e1 -> Maybe e1 -> Maybe e1 (bound at FD2.hs:25:12)
+ f :: e -> e -> e (bound at FD2.hs:22:10)
+ foldr1 :: (e -> e -> e) -> a -> e (bound at FD2.hs:22:3)
+ In the first argument of ‘Just’, namely ‘(f x y)’
+ In the expression: Just (f x y)
diff --git a/testsuite/tests/typecheck/should_compile/FD3.stderr b/testsuite/tests/typecheck/should_compile/FD3.stderr
index 0ba6587273..3bed15a490 100644
--- a/testsuite/tests/typecheck/should_compile/FD3.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD3.stderr
@@ -1,14 +1,14 @@
-
-FD3.hs:15:15:
- Couldn't match type ‘a’ with ‘(String, a)’
- ‘a’ is a rigid type variable bound by
- the type signature for translate :: (String, a) -> A a
- at FD3.hs:14:14
- arising from a functional dependency between:
- constraint ‘MkA (String, a) a’ arising from a use of ‘mkA’
- instance ‘MkA a1 a1’ at FD3.hs:12:10-16
- Relevant bindings include
- a :: (String, a) (bound at FD3.hs:15:11)
- translate :: (String, a) -> A a (bound at FD3.hs:15:1)
- In the expression: mkA a
- In an equation for ‘translate’: translate a = mkA a
+
+FD3.hs:15:15:
+ Couldn't match type ‘a’ with ‘(String, a)’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: translate :: (String, a) -> A a
+ at FD3.hs:14:14
+ arising from a functional dependency between:
+ constraint ‘MkA (String, a) a’ arising from a use of ‘mkA’
+ instance ‘MkA a1 a1’ at FD3.hs:12:10-16
+ Relevant bindings include
+ a :: (String, a) (bound at FD3.hs:15:11)
+ translate :: (String, a) -> A a (bound at FD3.hs:15:1)
+ In the expression: mkA a
+ In an equation for ‘translate’: translate a = mkA a
diff --git a/testsuite/tests/typecheck/should_compile/T7220a.stderr b/testsuite/tests/typecheck/should_compile/T7220a.stderr
index 4be503d001..ef9900ebd8 100644
--- a/testsuite/tests/typecheck/should_compile/T7220a.stderr
+++ b/testsuite/tests/typecheck/should_compile/T7220a.stderr
@@ -1,14 +1,14 @@
-
-T7220a.hs:17:6:
- Could not deduce (C a b)
- from the context (C a0 b, TF b ~ Y)
- bound by the type signature for f :: (C a0 b, TF b ~ Y) => b
- at T7220a.hs:17:6-44
- Possible fix:
- add (C a b) to the context of
- the type signature for f :: (C a0 b, TF b ~ Y) => b
- In the ambiguity check for the type signature for ‘f’:
- f :: forall a. (forall b. (C a b, TF b ~ Y) => b) -> X
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f’:
- f :: (forall b. (C a b, TF b ~ Y) => b) -> X
+
+T7220a.hs:17:6:
+ Could not deduce (C a b)
+ from the context (C a0 b, TF b ~ Y)
+ bound by the type signature for: f :: (C a0 b, TF b ~ Y) => b
+ at T7220a.hs:17:6-44
+ Possible fix:
+ add (C a b) to the context of
+ the type signature for: f :: (C a0 b, TF b ~ Y) => b
+ In the ambiguity check for the type signature for ‘f’:
+ f :: forall a. (forall b. (C a b, TF b ~ Y) => b) -> X
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘f’:
+ f :: (forall b. (C a b, TF b ~ Y) => b) -> X
diff --git a/testsuite/tests/typecheck/should_compile/T9834.stderr b/testsuite/tests/typecheck/should_compile/T9834.stderr
index e4372e596e..534d16d7cb 100644
--- a/testsuite/tests/typecheck/should_compile/T9834.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9834.stderr
@@ -1,71 +1,71 @@
-
-T9834.hs:23:10: Warning:
- Couldn't match type ‘p’ with ‘(->) (p a0)’
- ‘p’ is a rigid type variable bound by
- the class declaration for ‘ApplicativeFix’ at T9834.hs:21:39
- Expected type: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- Actual type: (forall (q :: * -> *).
- Applicative q =>
- Nat (Comp p q) (Comp p q))
- -> p a0 -> p a0
- Relevant bindings include
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- (bound at T9834.hs:23:3)
- In the expression: wrapIdComp
- In an equation for ‘afix’: afix = wrapIdComp
-
-T9834.hs:23:10: Warning:
- Couldn't match type ‘a’ with ‘p a0’
- ‘a’ is a rigid type variable bound by
- the type signature for
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- at T9834.hs:22:11
- Expected type: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- Actual type: (forall (q :: * -> *).
- Applicative q =>
- Nat (Comp p q) (Comp p q))
- -> p a0 -> p a0
- Relevant bindings include
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- (bound at T9834.hs:23:3)
- In the expression: wrapIdComp
- In an equation for ‘afix’: afix = wrapIdComp
-
-T9834.hs:23:10: Warning:
- Couldn't match type ‘a’ with ‘a1’
- ‘a’ is a rigid type variable bound by
- the type signature for
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- at T9834.hs:22:11
- ‘a1’ is a rigid type variable bound by
- a type expected by the context:
- Applicative q => Comp p q a1 -> Comp p q a1
- at T9834.hs:23:10
- Expected type: Comp p q a1 -> Comp p q a1
- Actual type: Comp p q a -> Comp p q a
- Relevant bindings include
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- (bound at T9834.hs:23:3)
- In the expression: wrapIdComp
- In an equation for ‘afix’: afix = wrapIdComp
+
+T9834.hs:23:10: Warning:
+ Couldn't match type ‘p’ with ‘(->) (p a0)’
+ ‘p’ is a rigid type variable bound by
+ the class declaration for ‘ApplicativeFix’ at T9834.hs:21:39
+ Expected type: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ Actual type: (forall (q :: * -> *).
+ Applicative q =>
+ Nat (Comp p q) (Comp p q))
+ -> p a0 -> p a0
+ Relevant bindings include
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ (bound at T9834.hs:23:3)
+ In the expression: wrapIdComp
+ In an equation for ‘afix’: afix = wrapIdComp
+
+T9834.hs:23:10: Warning:
+ Couldn't match type ‘a’ with ‘p a0’
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ at T9834.hs:22:11
+ Expected type: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ Actual type: (forall (q :: * -> *).
+ Applicative q =>
+ Nat (Comp p q) (Comp p q))
+ -> p a0 -> p a0
+ Relevant bindings include
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ (bound at T9834.hs:23:3)
+ In the expression: wrapIdComp
+ In an equation for ‘afix’: afix = wrapIdComp
+
+T9834.hs:23:10: Warning:
+ Couldn't match type ‘a’ with ‘a1’
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ at T9834.hs:22:11
+ ‘a1’ is a rigid type variable bound by
+ a type expected by the context:
+ Applicative q => Comp p q a1 -> Comp p q a1
+ at T9834.hs:23:10
+ Expected type: Comp p q a1 -> Comp p q a1
+ Actual type: Comp p q a -> Comp p q a
+ Relevant bindings include
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ (bound at T9834.hs:23:3)
+ In the expression: wrapIdComp
+ In an equation for ‘afix’: afix = wrapIdComp
diff --git a/testsuite/tests/typecheck/should_compile/tc141.stderr b/testsuite/tests/typecheck/should_compile/tc141.stderr
index 9279d033b5..07adbfce6b 100644
--- a/testsuite/tests/typecheck/should_compile/tc141.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc141.stderr
@@ -36,7 +36,7 @@ tc141.hs:15:18:
Couldn't match expected type ‘a2’ with actual type ‘t’
because type variable ‘a2’ would escape its scope
This (rigid, skolem) type variable is bound by
- the type signature for v :: a2
+ the type signature for: v :: a2
at tc141.hs:14:19
Relevant bindings include
v :: a2 (bound at tc141.hs:15:14)
diff --git a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
index 895cc7df01..52e8d8a4eb 100644
--- a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
+++ b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
@@ -4,7 +4,7 @@ FDsFromGivens.hs:21:15:
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
+ arising from a pattern with constructor:
KCC :: C Char Char => () -> KCC,
in an equation for ‘bar’
at FDsFromGivens.hs:21:6-10
diff --git a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
index 5ccc035c76..f06ee68043 100644
--- a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
+++ b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
@@ -1,12 +1,12 @@
-
-FailDueToGivenOverlapping.hs:27:9:
- Overlapping instances for E [t0] arising from a use of ‘eop’
- Matching givens (or their superclasses):
- (E [Int])
- bound by the type signature for bar :: E [Int] => () -> ()
- at FailDueToGivenOverlapping.hs:26:8-26
- Matching instances:
- instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10
- (The choice depends on the instantiation of ‘t0’)
- In the expression: eop [undefined]
- In an equation for ‘bar’: bar _ = eop [undefined]
+
+FailDueToGivenOverlapping.hs:27:9:
+ Overlapping instances for E [t0] arising from a use of ‘eop’
+ Matching givens (or their superclasses):
+ (E [Int])
+ bound by the type signature for: bar :: E [Int] => () -> ()
+ at FailDueToGivenOverlapping.hs:26:8-26
+ Matching instances:
+ instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10
+ (The choice depends on the instantiation of ‘t0’)
+ In the expression: eop [undefined]
+ In an equation for ‘bar’: bar _ = eop [undefined]
diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
index 1261408eb8..ff39e7e6ef 100644
--- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
+++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
@@ -1,53 +1,52 @@
-
-FrozenErrorTests.hs:12:12:
- Couldn't match type ‘Int’ with ‘Bool’
- Inaccessible code in
- a pattern with constructor
- MkT3 :: forall a. (a ~ Bool) => T a,
- in a case alternative
- In the pattern: MkT3
- In a case alternative: MkT3 -> ()
- In the expression: case x of { MkT3 -> () }
-
-FrozenErrorTests.hs:26:9:
- Occurs check: cannot construct the infinite type: a ~ [a]
- Expected type: [a]
- Actual type: F a Bool
- Relevant bindings include
- test1 :: a (bound at FrozenErrorTests.hs:26:1)
- In the expression: goo1 False undefined
- In an equation for ‘test1’: test1 = goo1 False undefined
-
-FrozenErrorTests.hs:29:15:
- 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)’
- In the expression: goo2 (goo1 False undefined)
- In an equation for ‘test2’: test2 = goo2 (goo1 False undefined)
-
-FrozenErrorTests.hs:30:9:
- Couldn't match type ‘[Int]’ with ‘Int’
- Expected type: [[Int]]
- Actual type: F [Int] Bool
- In the expression: goo1 False (goo2 undefined)
- In an equation for ‘test3’: test3 = goo1 False (goo2 undefined)
-
-FrozenErrorTests.hs:45:15:
- Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
- Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
- Actual type: F (T2 (T2 c c) c) Bool
- Relevant bindings include
- test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
- In the first argument of ‘goo4’, namely ‘(goo3 False undefined)’
- In the expression: goo4 (goo3 False undefined)
- In an equation for ‘test4’: test4 = goo4 (goo3 False undefined)
-
-FrozenErrorTests.hs:46:9:
- Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
- Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
- Actual type: F (T2 (T2 c c) c) Bool
- Relevant bindings include
- test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
- In the expression: goo3 False (goo4 undefined)
- In an equation for ‘test5’: test5 = goo3 False (goo4 undefined)
+
+FrozenErrorTests.hs:12:12:
+ Couldn't match type ‘Int’ with ‘Bool’
+ Inaccessible code in
+ a pattern with constructor: MkT3 :: forall a. (a ~ Bool) => T a,
+ in a case alternative
+ In the pattern: MkT3
+ In a case alternative: MkT3 -> ()
+ In the expression: case x of { MkT3 -> () }
+
+FrozenErrorTests.hs:26:9:
+ Occurs check: cannot construct the infinite type: a ~ [a]
+ Expected type: [a]
+ Actual type: F a Bool
+ Relevant bindings include
+ test1 :: a (bound at FrozenErrorTests.hs:26:1)
+ In the expression: goo1 False undefined
+ In an equation for ‘test1’: test1 = goo1 False undefined
+
+FrozenErrorTests.hs:29:15:
+ 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)’
+ In the expression: goo2 (goo1 False undefined)
+ In an equation for ‘test2’: test2 = goo2 (goo1 False undefined)
+
+FrozenErrorTests.hs:30:9:
+ Couldn't match type ‘[Int]’ with ‘Int’
+ Expected type: [[Int]]
+ Actual type: F [Int] Bool
+ In the expression: goo1 False (goo2 undefined)
+ In an equation for ‘test3’: test3 = goo1 False (goo2 undefined)
+
+FrozenErrorTests.hs:45:15:
+ Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
+ Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
+ Actual type: F (T2 (T2 c c) c) Bool
+ Relevant bindings include
+ test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
+ In the first argument of ‘goo4’, namely ‘(goo3 False undefined)’
+ In the expression: goo4 (goo3 False undefined)
+ In an equation for ‘test4’: test4 = goo4 (goo3 False undefined)
+
+FrozenErrorTests.hs:46:9:
+ Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
+ Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
+ Actual type: F (T2 (T2 c c) c) Bool
+ Relevant bindings include
+ test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
+ In the expression: goo3 False (goo4 undefined)
+ In an equation for ‘test5’: test5 = goo3 False (goo4 undefined)
diff --git a/testsuite/tests/typecheck/should_fail/IPFail.stderr b/testsuite/tests/typecheck/should_fail/IPFail.stderr
index c617cfb776..1af8948019 100644
--- a/testsuite/tests/typecheck/should_fail/IPFail.stderr
+++ b/testsuite/tests/typecheck/should_fail/IPFail.stderr
@@ -1,9 +1,9 @@
-
-IPFail.hs:6:18:
- Could not deduce (Num Bool) arising from the literal ‘5’
- from the context (?x::Int)
- bound by the type signature for f0 :: (?x::Int) => () -> Bool
- at IPFail.hs:5:7-31
- In the expression: 5
- In the expression: let ?x = 5 in ?x
- In an equation for ‘f0’: f0 () = let ?x = 5 in ?x
+
+IPFail.hs:6:18:
+ Could not deduce (Num Bool) arising from the literal ‘5’
+ from the context (?x::Int)
+ bound by the type signature for: f0 :: (?x::Int) => () -> Bool
+ at IPFail.hs:5:7-31
+ In the expression: 5
+ In the expression: let ?x = 5 in ?x
+ In an equation for ‘f0’: f0 () = let ?x = 5 in ?x
diff --git a/testsuite/tests/typecheck/should_fail/T1899.stderr b/testsuite/tests/typecheck/should_fail/T1899.stderr
index 324eebbc9a..37e7b23d73 100644
--- a/testsuite/tests/typecheck/should_fail/T1899.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1899.stderr
@@ -1,13 +1,13 @@
-
-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 ‘Auxiliary’, namely ‘varSet’
- In the first argument of ‘Prop’, namely ‘(Auxiliary varSet)’
+
+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 ‘Auxiliary’, namely ‘varSet’
+ In the first argument of ‘Prop’, namely ‘(Auxiliary varSet)’
diff --git a/testsuite/tests/typecheck/should_fail/T2714.stderr b/testsuite/tests/typecheck/should_fail/T2714.stderr
index df64852557..65aa78cd90 100644
--- a/testsuite/tests/typecheck/should_fail/T2714.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2714.stderr
@@ -1,24 +1,24 @@
-
-T2714.hs:8:5:
- Couldn't match type ‘a’ with ‘f0 b’
- ‘a’ is a rigid type variable bound by
- the type signature for f :: ((a -> b) -> b) -> forall c. c -> a
- at T2714.hs:7:6
- Expected type: ((a -> b) -> b) -> c -> a
- Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
- Relevant bindings include
- f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
- In the expression: ffmap
- In an equation for ‘f’: f = ffmap
-
-T2714.hs:8:5:
- Couldn't match type ‘c’ with ‘f0 (a -> b)’
- ‘c’ is a rigid type variable bound by
- the type signature for f :: ((a -> b) -> b) -> c -> a
- at T2714.hs:8:1
- Expected type: ((a -> b) -> b) -> c -> a
- Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
- Relevant bindings include
- f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
- In the expression: ffmap
- In an equation for ‘f’: f = ffmap
+
+T2714.hs:8:5:
+ Couldn't match type ‘a’ with ‘f0 b’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: f :: ((a -> b) -> b) -> forall c. c -> a
+ at T2714.hs:7:6
+ Expected type: ((a -> b) -> b) -> c -> a
+ Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
+ Relevant bindings include
+ f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
+ In the expression: ffmap
+ In an equation for ‘f’: f = ffmap
+
+T2714.hs:8:5:
+ Couldn't match type ‘c’ with ‘f0 (a -> b)’
+ ‘c’ is a rigid type variable bound by
+ the type signature for: f :: ((a -> b) -> b) -> c -> a
+ at T2714.hs:8:1
+ Expected type: ((a -> b) -> b) -> c -> a
+ Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
+ Relevant bindings include
+ f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
+ In the expression: ffmap
+ In an equation for ‘f’: f = ffmap
diff --git a/testsuite/tests/typecheck/should_fail/T2846b.stderr b/testsuite/tests/typecheck/should_fail/T2846b.stderr
index ccf4f149ee..3008346ddd 100644
--- a/testsuite/tests/typecheck/should_fail/T2846b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2846b.stderr
@@ -1,7 +1,7 @@
-
-T2846b.hs:5:5:
- No instance for (Show (Num a0 => a0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘show’
- In the expression: show ([1, 2, 3] :: [Num a => a])
- In an equation for ‘f’: f = show ([1, 2, 3] :: [Num a => a])
+
+T2846b.hs:5:5:
+ No instance for (Show (Num a0 => a0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘show’
+ In the expression: show ([1, 2, 3] :: [Num a => a])
+ In an equation for ‘f’: f = show ([1, 2, 3] :: [Num a => a])
diff --git a/testsuite/tests/typecheck/should_fail/T3592.stderr b/testsuite/tests/typecheck/should_fail/T3592.stderr
index 05ea89a064..e55b693b15 100644
--- a/testsuite/tests/typecheck/should_fail/T3592.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3592.stderr
@@ -1,16 +1,16 @@
-
-T3592.hs:8:5:
- No instance for (Show a) arising from a use of ‘show’
- Possible fix:
- add (Show a) to the context of
- the type signature for f :: T a -> String
- In the expression: show
- In an equation for ‘f’: f = show
-
-T3592.hs:11:7:
- No instance for (Show a) arising from a use of ‘show’
- Possible fix:
- add (Show a) to the context of
- the type signature for g :: T a -> String
- In the expression: show x
- In an equation for ‘g’: g x = show x
+
+T3592.hs:8:5:
+ No instance for (Show a) arising from a use of ‘show’
+ Possible fix:
+ add (Show a) to the context of
+ the type signature for: f :: T a -> String
+ In the expression: show
+ In an equation for ‘f’: f = show
+
+T3592.hs:11:7:
+ No instance for (Show a) arising from a use of ‘show’
+ Possible fix:
+ add (Show a) to the context of
+ the type signature for: g :: T a -> String
+ In the expression: show x
+ In an equation for ‘g’: g x = show x
diff --git a/testsuite/tests/typecheck/should_fail/T5236.stderr b/testsuite/tests/typecheck/should_fail/T5236.stderr
index 7b5830c0ea..c1cbae3699 100644
--- a/testsuite/tests/typecheck/should_fail/T5236.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5236.stderr
@@ -1,11 +1,11 @@
-
-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 the type signature for ‘loop’:
- loop :: 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 the type signature for ‘loop’:
+ loop :: 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 14e069af9b..2adbed420b 100644
--- a/testsuite/tests/typecheck/should_fail/T5300.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5300.stderr
@@ -1,32 +1,32 @@
-
-T5300.hs:11:7:
- Could not deduce (C1 a b c0)
- from the context (Monad m, C1 a b c)
- bound by the type signature for
- f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
- at T5300.hs:11:7-50
- The type variable ‘c0’ is ambiguous
- In the ambiguity check for the type signature for ‘f1’:
- f1 :: forall a b (m :: * -> *) c.
- (Monad m, C1 a b c) =>
- a -> StateT (T b) m a
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f1’:
- f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
-
-T5300.hs:14:7:
- Could not deduce (C2 a2 b2 c20)
- 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 ‘c20’ is ambiguous
- In the ambiguity check for the type signature for ‘f2’:
- f2 :: forall a1 b2 (m :: * -> *) a2 b1 c1 c2.
- (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
- a1 -> StateT (T b2) m a2
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f2’:
- f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
- a1 -> StateT (T b2) m a2
+
+T5300.hs:11:7:
+ Could not deduce (C1 a b c0)
+ from the context (Monad m, C1 a b c)
+ bound by the type signature for:
+ f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
+ at T5300.hs:11:7-50
+ The type variable ‘c0’ is ambiguous
+ In the ambiguity check for the type signature for ‘f1’:
+ f1 :: forall a b (m :: * -> *) c.
+ (Monad m, C1 a b c) =>
+ a -> StateT (T b) m a
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘f1’:
+ f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
+
+T5300.hs:14:7:
+ Could not deduce (C2 a2 b2 c20)
+ 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 ‘c20’ is ambiguous
+ In the ambiguity check for the type signature for ‘f2’:
+ f2 :: forall a1 b2 (m :: * -> *) a2 b1 c1 c2.
+ (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
+ a1 -> StateT (T b2) m a2
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘f2’:
+ f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
+ a1 -> StateT (T b2) m a2
diff --git a/testsuite/tests/typecheck/should_fail/T7453.stderr b/testsuite/tests/typecheck/should_fail/T7453.stderr
index c474460155..2b891773c4 100644
--- a/testsuite/tests/typecheck/should_fail/T7453.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7453.stderr
@@ -1,45 +1,45 @@
-
-T7453.hs:10:30:
- Couldn't match expected type ‘t1’ with actual type ‘t’
- because type variable ‘t1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for z :: Id t1
- at T7453.hs:8:16-19
- Relevant bindings include
- aux :: Id t1 (bound at T7453.hs:10:21)
- z :: Id t1 (bound at T7453.hs:9:11)
- v :: t (bound at T7453.hs:7:7)
- cast1 :: t -> a (bound at T7453.hs:7:1)
- In the first argument of ‘Id’, namely ‘v’
- In the expression: Id v
-
-T7453.hs:16:33:
- Couldn't match expected type ‘t2’ with actual type ‘t’
- because type variable ‘t2’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for z :: () -> t2
- at T7453.hs:14:16-22
- Relevant bindings include
- aux :: b -> t2 (bound at T7453.hs:16:21)
- z :: () -> t2 (bound at T7453.hs:15:11)
- v :: t (bound at T7453.hs:13:7)
- cast2 :: t -> t1 (bound at T7453.hs:13:1)
- In the first argument of ‘const’, namely ‘v’
- In the expression: const v
-
-T7453.hs:21:15:
- Couldn't match expected type ‘t1’ with actual type ‘a’
- because type variable ‘t1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for z :: t1
- at T7453.hs:20:16
- Relevant bindings include
- aux :: forall b. b -> a (bound at T7453.hs:22:21)
- z :: t1 (bound at T7453.hs:21:11)
- v :: a (bound at T7453.hs:19:7)
- cast3 :: a -> t (bound at T7453.hs:19:1)
- In the expression: v
- In an equation for ‘z’:
- z = v
- where
- aux = const v
+
+T7453.hs:10:30:
+ Couldn't match expected type ‘t1’ with actual type ‘t’
+ because type variable ‘t1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for: z :: Id t1
+ at T7453.hs:8:16-19
+ Relevant bindings include
+ aux :: Id t1 (bound at T7453.hs:10:21)
+ z :: Id t1 (bound at T7453.hs:9:11)
+ v :: t (bound at T7453.hs:7:7)
+ cast1 :: t -> a (bound at T7453.hs:7:1)
+ In the first argument of ‘Id’, namely ‘v’
+ In the expression: Id v
+
+T7453.hs:16:33:
+ Couldn't match expected type ‘t2’ with actual type ‘t’
+ because type variable ‘t2’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for: z :: () -> t2
+ at T7453.hs:14:16-22
+ Relevant bindings include
+ aux :: b -> t2 (bound at T7453.hs:16:21)
+ z :: () -> t2 (bound at T7453.hs:15:11)
+ v :: t (bound at T7453.hs:13:7)
+ cast2 :: t -> t1 (bound at T7453.hs:13:1)
+ In the first argument of ‘const’, namely ‘v’
+ In the expression: const v
+
+T7453.hs:21:15:
+ Couldn't match expected type ‘t1’ with actual type ‘a’
+ because type variable ‘t1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for: z :: t1
+ at T7453.hs:20:16
+ Relevant bindings include
+ aux :: forall b. b -> a (bound at T7453.hs:22:21)
+ z :: t1 (bound at T7453.hs:21:11)
+ v :: a (bound at T7453.hs:19:7)
+ cast3 :: a -> t (bound at T7453.hs:19:1)
+ In the expression: v
+ In an equation for ‘z’:
+ z = v
+ where
+ aux = const v
diff --git a/testsuite/tests/typecheck/should_fail/T7748a.stderr b/testsuite/tests/typecheck/should_fail/T7748a.stderr
index 63cff4aa17..a8e2921a92 100644
--- a/testsuite/tests/typecheck/should_fail/T7748a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7748a.stderr
@@ -1,18 +1,18 @@
-
-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 }
+
+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/T8392a.stderr b/testsuite/tests/typecheck/should_fail/T8392a.stderr
index a51cc83932..290ae86a00 100644
--- a/testsuite/tests/typecheck/should_fail/T8392a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8392a.stderr
@@ -1,8 +1,8 @@
-
-T8392a.hs:6:8:
- Couldn't match type ‘Int’ with ‘Bool’
- Inaccessible code in
- the type signature for foo :: (Int ~ Bool) => a -> a
- In the ambiguity check for the type signature for ‘foo’:
- foo :: forall a. (Int ~ Bool) => a -> a
- In the type signature for ‘foo’: foo :: (Int ~ Bool) => a -> a
+
+T8392a.hs:6:8:
+ Couldn't match type ‘Int’ with ‘Bool’
+ Inaccessible code in
+ the type signature for: foo :: (Int ~ Bool) => a -> a
+ In the ambiguity check for the type signature for ‘foo’:
+ foo :: forall a. (Int ~ Bool) => a -> a
+ In the type signature for ‘foo’: foo :: (Int ~ Bool) => a -> a
diff --git a/testsuite/tests/typecheck/should_fail/T8450.stderr b/testsuite/tests/typecheck/should_fail/T8450.stderr
index 2cc9a6b7ab..1416f2aec2 100644
--- a/testsuite/tests/typecheck/should_fail/T8450.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8450.stderr
@@ -1,9 +1,9 @@
-
-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 ())
+
+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/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr
index 5ef2340a74..3f5236b778 100644
--- a/testsuite/tests/typecheck/should_fail/T9109.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9109.stderr
@@ -1,15 +1,14 @@
-
-T9109.hs:8:13:
- Couldn't match expected type ‘t’ with actual type ‘Bool’
- ‘t’ is untouchable
- inside the constraints (t1 ~ Bool)
- bound by a pattern with constructor
- GBool :: G Bool,
- in an equation for ‘foo’
- at T9109.hs:8:5-9
- ‘t’ is a rigid type variable bound by
- the inferred type of foo :: G t1 -> t at T9109.hs:8:1
- Possible fix: add a type signature for ‘foo’
- Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1)
- In the expression: True
- In an equation for ‘foo’: foo GBool = True
+
+T9109.hs:8:13:
+ Couldn't match expected type ‘t’ with actual type ‘Bool’
+ ‘t’ is untouchable
+ inside the constraints (t1 ~ Bool)
+ bound by a pattern with constructor: GBool :: G Bool,
+ in an equation for ‘foo’
+ at T9109.hs:8:5-9
+ ‘t’ is a rigid type variable bound by
+ the inferred type of foo :: G t1 -> t at T9109.hs:8:1
+ Possible fix: add a type signature for ‘foo’
+ Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1)
+ In the expression: True
+ In an equation for ‘foo’: foo GBool = True
diff --git a/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr b/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
index f11ec28f18..ead183c7a1 100644
--- a/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
+++ b/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
@@ -1,14 +1,14 @@
-
-TcStaticPointersFail02.hs:9:6:
- No instance for (Data.Typeable.Internal.Typeable b)
- arising from a static form
- In the expression: static (undefined :: (forall a. a -> a) -> b)
- In an equation for ‘f1’:
- f1 = static (undefined :: (forall a. a -> a) -> b)
-
-TcStaticPointersFail02.hs:12:6:
- No instance for (Data.Typeable.Internal.Typeable Monad)
- (maybe you haven't applied enough arguments to a function?)
- arising from a static form
- In the expression: static return
- In an equation for ‘f2’: f2 = static return
+
+TcStaticPointersFail02.hs:9:6:
+ No instance for (Data.Typeable.Internal.Typeable b)
+ arising from a static form
+ In the expression: static (undefined :: (forall a. a -> a) -> b)
+ In an equation for ‘f1’:
+ f1 = static (undefined :: (forall a. a -> a) -> b)
+
+TcStaticPointersFail02.hs:12:6:
+ No instance for (Data.Typeable.Internal.Typeable Monad)
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a static form
+ In the expression: static return
+ In an equation for ‘f2’: f2 = static return
diff --git a/testsuite/tests/typecheck/should_fail/mc22.stderr b/testsuite/tests/typecheck/should_fail/mc22.stderr
index ebae89eb9b..785bf07b76 100644
--- a/testsuite/tests/typecheck/should_fail/mc22.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc22.stderr
@@ -1,21 +1,21 @@
-
-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: [t a] -> [t 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
+
+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: [t a] -> [t 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/tcfail034.stderr b/testsuite/tests/typecheck/should_fail/tcfail034.stderr
index 9107051d8c..d2abc05944 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail034.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail034.stderr
@@ -1,12 +1,12 @@
-
-tcfail034.hs:17:13:
- Could not deduce (Integral a) arising from a use of ‘mod’
- from the context (Num a, Eq a)
- bound by the type signature for test :: (Num a, Eq a) => a -> Bool
- at tcfail034.hs:16:7-32
- Possible fix:
- add (Integral a) to the context of
- the type signature for test :: (Num a, Eq a) => a -> Bool
- In the first argument of ‘(==)’, namely ‘(x `mod` 3)’
- In the expression: (x `mod` 3) == 0
- In an equation for ‘test’: test x = (x `mod` 3) == 0
+
+tcfail034.hs:17:13:
+ Could not deduce (Integral a) arising from a use of ‘mod’
+ from the context (Num a, Eq a)
+ bound by the type signature for: test :: (Num a, Eq a) => a -> Bool
+ at tcfail034.hs:16:7-32
+ Possible fix:
+ add (Integral a) to the context of
+ the type signature for: test :: (Num a, Eq a) => a -> Bool
+ In the first argument of ‘(==)’, namely ‘(x `mod` 3)’
+ In the expression: (x `mod` 3) == 0
+ In an equation for ‘test’: test x = (x `mod` 3) == 0
diff --git a/testsuite/tests/typecheck/should_fail/tcfail065.stderr b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
index f912a68cdd..02338415d1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail065.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
@@ -1,13 +1,13 @@
-
-tcfail065.hs:29:20:
- Couldn't match expected type ‘x’ with actual type ‘x1’
- ‘x1’ is a rigid type variable bound by
- the type signature for setX :: x1 -> X x -> X x
- at tcfail065.hs:29:3
- ‘x’ is a rigid type variable bound by
- the instance declaration at tcfail065.hs:28:10
- Relevant bindings include
- x :: x1 (bound at tcfail065.hs:29:8)
- setX :: x1 -> X x -> X x (bound at tcfail065.hs:29:3)
- In the first argument of ‘X’, namely ‘x’
- In the expression: X x
+
+tcfail065.hs:29:20:
+ Couldn't match expected type ‘x’ with actual type ‘x1’
+ ‘x1’ is a rigid type variable bound by
+ the type signature for: setX :: x1 -> X x -> X x
+ at tcfail065.hs:29:3
+ ‘x’ is a rigid type variable bound by
+ the instance declaration at tcfail065.hs:28:10
+ Relevant bindings include
+ x :: x1 (bound at tcfail065.hs:29:8)
+ setX :: x1 -> X x -> X x (bound at tcfail065.hs:29:3)
+ In the first argument of ‘X’, namely ‘x’
+ In the expression: X x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
index fb6d6707fb..bdf479c5c8 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail067.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
@@ -1,76 +1,76 @@
-
-tcfail067.hs:1:14: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail067.hs:12:16:
- No instance for (Ord a) arising from a use of ‘SubRange’
- Possible fix:
- add (Ord a) to the context of
- the type signature for subRangeValue :: SubRange a -> a
- In the pattern: SubRange (lower, upper) value
- In an equation for ‘subRangeValue’:
- subRangeValue (SubRange (lower, upper) value) = value
-
-tcfail067.hs:15:11:
- No instance for (Ord a) arising from a use of ‘SubRange’
- Possible fix:
- add (Ord a) to the context of
- the type signature for subRange :: SubRange a -> (a, a)
- In the pattern: SubRange r value
- In an equation for ‘subRange’: subRange (SubRange r value) = r
-
-tcfail067.hs:46:12:
- Could not deduce (Ord a) arising from a use of ‘SubRange’
- from the context (Show a)
- bound by the type signature for
- showRange :: Show a => SubRange a -> String
- at tcfail067.hs:45:14-43
- Possible fix:
- add (Ord a) to the context of
- the type signature for showRange :: Show a => SubRange a -> String
- In the pattern: SubRange (lower, upper) value
- In an equation for ‘showRange’:
- showRange (SubRange (lower, upper) value)
- = show value ++ " :" ++ show lower ++ ".." ++ show upper
-
-tcfail067.hs:61:12:
- 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 (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)’
-
-tcfail067.hs:65:19:
- Could not deduce (Ord a) arising from a use of ‘SubRange’
- from the context (Num a)
- bound by the instance declaration at tcfail067.hs:60:10-34
- Possible fix:
- add (Ord a) to the context of the instance declaration
- In the expression:
- SubRange (fromInteger a, fromInteger a) (fromInteger a)
- In an equation for ‘fromInteger’:
- fromInteger a
- = SubRange (fromInteger a, fromInteger a) (fromInteger a)
- In the instance declaration for ‘Num (SubRange a)’
-
-tcfail067.hs:74:5:
- Could not deduce (Ord a) arising from a use of ‘SubRange’
- from the context (Num a)
- bound by the type signature for
- numSubRangeBinOp :: Num a =>
- (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
- at tcfail067.hs:(71,21)-(72,58)
- Possible fix:
- add (Ord a) to the context of
- the type signature for
- numSubRangeBinOp :: Num a =>
- (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
- In the expression: SubRange (result, result) result
- In an equation for ‘numSubRangeBinOp’:
- numSubRangeBinOp op a b
- = SubRange (result, result) result
- where
- result = (subRangeValue a) `op` (subRangeValue b)
+
+tcfail067.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail067.hs:12:16:
+ No instance for (Ord a) arising from a use of ‘SubRange’
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for: subRangeValue :: SubRange a -> a
+ In the pattern: SubRange (lower, upper) value
+ In an equation for ‘subRangeValue’:
+ subRangeValue (SubRange (lower, upper) value) = value
+
+tcfail067.hs:15:11:
+ No instance for (Ord a) arising from a use of ‘SubRange’
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for: subRange :: SubRange a -> (a, a)
+ In the pattern: SubRange r value
+ In an equation for ‘subRange’: subRange (SubRange r value) = r
+
+tcfail067.hs:46:12:
+ Could not deduce (Ord a) arising from a use of ‘SubRange’
+ from the context (Show a)
+ bound by the type signature for:
+ showRange :: Show a => SubRange a -> String
+ at tcfail067.hs:45:14-43
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for: showRange :: Show a => SubRange a -> String
+ In the pattern: SubRange (lower, upper) value
+ In an equation for ‘showRange’:
+ showRange (SubRange (lower, upper) value)
+ = show value ++ " :" ++ show lower ++ ".." ++ show upper
+
+tcfail067.hs:61:12:
+ 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 (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)’
+
+tcfail067.hs:65:19:
+ Could not deduce (Ord a) arising from a use of ‘SubRange’
+ from the context (Num a)
+ bound by the instance declaration at tcfail067.hs:60:10-34
+ Possible fix:
+ add (Ord a) to the context of the instance declaration
+ In the expression:
+ SubRange (fromInteger a, fromInteger a) (fromInteger a)
+ In an equation for ‘fromInteger’:
+ fromInteger a
+ = SubRange (fromInteger a, fromInteger a) (fromInteger a)
+ In the instance declaration for ‘Num (SubRange a)’
+
+tcfail067.hs:74:5:
+ Could not deduce (Ord a) arising from a use of ‘SubRange’
+ from the context (Num a)
+ bound by the type signature for:
+ numSubRangeBinOp :: Num a =>
+ (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
+ at tcfail067.hs:(71,21)-(72,58)
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for:
+ numSubRangeBinOp :: Num a =>
+ (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
+ In the expression: SubRange (result, result) result
+ In an equation for ‘numSubRangeBinOp’:
+ numSubRangeBinOp op a b
+ = SubRange (result, result) result
+ where
+ result = (subRangeValue a) `op` (subRangeValue b)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.stderr b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
index 233c92e6ae..a25e57524c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail068.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
@@ -1,96 +1,96 @@
-
-tcfail068.hs:14:9:
- 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
- ‘s’ is a rigid type variable bound by
- the type signature for
- itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
- at tcfail068.hs:11:10
- Expected type: GHC.ST.ST s1 (IndTree s a)
- Actual type: GHC.ST.ST s1 (STArray s1 (Int, Int) a)
- Relevant bindings include
- itgen :: (Int, Int) -> a -> IndTree s a
- (bound at tcfail068.hs:12:1)
- In the first argument of ‘runST’, namely
- ‘(newSTArray ((1, 1), n) x)’
- In the expression: runST (newSTArray ((1, 1), n) x)
-
-tcfail068.hs:19:21:
- Couldn't match type ‘s’ with ‘s1’
- ‘s’ is a rigid type variable bound by
- the type signature for
- itiap :: Constructed a =>
- (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:16:10
- ‘s1’ is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:18:9
- Expected type: STArray s1 (Int, Int) a
- Actual type: IndTree s a
- Relevant bindings include
- arr :: IndTree s a (bound at tcfail068.hs:17:11)
- itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- (bound at tcfail068.hs:17:1)
- In the first argument of ‘readSTArray’, namely ‘arr’
- In the first argument of ‘(>>=)’, namely ‘readSTArray arr i’
-
-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 =>
- ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:23:10
- ‘s1’ is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:24:29
- Expected type: GHC.ST.ST s1 (IndTree s a)
- Actual type: GHC.ST.ST s (IndTree s a)
- Relevant bindings include
- itrap' :: Int -> Int -> GHC.ST.ST s (IndTree s a)
- (bound at tcfail068.hs:26:9)
- itrapsnd :: Int -> Int -> GHC.ST.ST s (IndTree s a)
- (bound at tcfail068.hs:29:9)
- arr :: IndTree s a (bound at tcfail068.hs:24:23)
- itrap :: ((Int, Int), (Int, Int))
- -> (a -> a) -> IndTree s a -> IndTree s a
- (bound at tcfail068.hs:24:1)
- In the first argument of ‘runST’, namely ‘(itrap' i k)’
- In the expression: runST (itrap' i k)
-
-tcfail068.hs:36:46:
- Couldn't match type ‘s’ with ‘s1’
- ‘s’ is a rigid type variable 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
- ‘s1’ is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (c, IndTree s b)
- at tcfail068.hs:36:40
- Expected type: GHC.ST.ST s1 (c, IndTree s b)
- Actual type: GHC.ST.ST s (c, IndTree s b)
- Relevant bindings include
- itrapstate' :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
- (bound at tcfail068.hs:38:9)
- itrapstatesnd :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
- (bound at tcfail068.hs:41:9)
- arr :: IndTree s b (bound at tcfail068.hs:36:34)
- itrapstate :: ((Int, Int), (Int, Int))
- -> (a -> b -> (a, b))
- -> ((Int, Int) -> c -> a)
- -> (a -> c)
- -> c
- -> IndTree s b
- -> (c, IndTree s b)
- (bound at tcfail068.hs:36:1)
- In the first argument of ‘runST’, namely ‘(itrapstate' i k s)’
- In the expression: runST (itrapstate' i k s)
+
+tcfail068.hs:14:9:
+ 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
+ ‘s’ is a rigid type variable bound by
+ the type signature for:
+ itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
+ at tcfail068.hs:11:10
+ Expected type: GHC.ST.ST s1 (IndTree s a)
+ Actual type: GHC.ST.ST s1 (STArray s1 (Int, Int) a)
+ Relevant bindings include
+ itgen :: (Int, Int) -> a -> IndTree s a
+ (bound at tcfail068.hs:12:1)
+ In the first argument of ‘runST’, namely
+ ‘(newSTArray ((1, 1), n) x)’
+ In the expression: runST (newSTArray ((1, 1), n) x)
+
+tcfail068.hs:19:21:
+ Couldn't match type ‘s’ with ‘s1’
+ ‘s’ is a rigid type variable bound by
+ the type signature for:
+ itiap :: Constructed a =>
+ (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:16:10
+ ‘s1’ is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:18:9
+ Expected type: STArray s1 (Int, Int) a
+ Actual type: IndTree s a
+ Relevant bindings include
+ arr :: IndTree s a (bound at tcfail068.hs:17:11)
+ itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
+ (bound at tcfail068.hs:17:1)
+ In the first argument of ‘readSTArray’, namely ‘arr’
+ In the first argument of ‘(>>=)’, namely ‘readSTArray arr i’
+
+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 =>
+ ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:23:10
+ ‘s1’ is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:24:29
+ Expected type: GHC.ST.ST s1 (IndTree s a)
+ Actual type: GHC.ST.ST s (IndTree s a)
+ Relevant bindings include
+ itrap' :: Int -> Int -> GHC.ST.ST s (IndTree s a)
+ (bound at tcfail068.hs:26:9)
+ itrapsnd :: Int -> Int -> GHC.ST.ST s (IndTree s a)
+ (bound at tcfail068.hs:29:9)
+ arr :: IndTree s a (bound at tcfail068.hs:24:23)
+ itrap :: ((Int, Int), (Int, Int))
+ -> (a -> a) -> IndTree s a -> IndTree s a
+ (bound at tcfail068.hs:24:1)
+ In the first argument of ‘runST’, namely ‘(itrap' i k)’
+ In the expression: runST (itrap' i k)
+
+tcfail068.hs:36:46:
+ Couldn't match type ‘s’ with ‘s1’
+ ‘s’ is a rigid type variable 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
+ ‘s1’ is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (c, IndTree s b)
+ at tcfail068.hs:36:40
+ Expected type: GHC.ST.ST s1 (c, IndTree s b)
+ Actual type: GHC.ST.ST s (c, IndTree s b)
+ Relevant bindings include
+ itrapstate' :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
+ (bound at tcfail068.hs:38:9)
+ itrapstatesnd :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
+ (bound at tcfail068.hs:41:9)
+ arr :: IndTree s b (bound at tcfail068.hs:36:34)
+ itrapstate :: ((Int, Int), (Int, Int))
+ -> (a -> b -> (a, b))
+ -> ((Int, Int) -> c -> a)
+ -> (a -> c)
+ -> c
+ -> IndTree s b
+ -> (c, IndTree s b)
+ (bound at tcfail068.hs:36:1)
+ In the first argument of ‘runST’, namely ‘(itrapstate' i k s)’
+ In the expression: runST (itrapstate' i k s)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
index aeb0e9ae71..9d88d70c80 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
@@ -2,8 +2,8 @@
tcfail072.hs:23:13:
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
+ bound by the type signature for:
+ g :: (Ord p, Ord q) => AB p q -> Bool
at tcfail072.hs:22:6-38
The type variable ‘p0’ is ambiguous
Note: there are several potential instances:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail097.stderr b/testsuite/tests/typecheck/should_fail/tcfail097.stderr
index 821972402b..b5be488b40 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail097.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail097.stderr
@@ -1,11 +1,11 @@
-
-tcfail097.hs:5:6:
- Could not deduce (Eq a0)
- from the context (Eq a)
- bound by the type signature for f :: Eq a => Int -> Int
- at tcfail097.hs:5:6-23
- The type variable ‘a0’ is ambiguous
- In the ambiguity check for the type signature for ‘f’:
- f :: forall a. Eq a => Int -> Int
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f’: f :: Eq a => Int -> Int
+
+tcfail097.hs:5:6:
+ Could not deduce (Eq a0)
+ from the context (Eq a)
+ bound by the type signature for: f :: Eq a => Int -> Int
+ at tcfail097.hs:5:6-23
+ The type variable ‘a0’ is ambiguous
+ In the ambiguity check for the type signature for ‘f’:
+ f :: forall a. Eq a => Int -> Int
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘f’: f :: Eq a => Int -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail099.stderr b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
index 7b1f5bc0e0..cb3008cf7b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail099.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
@@ -1,15 +1,14 @@
-
-tcfail099.hs:9:20:
- Couldn't match expected type ‘a’ with actual type ‘t’
- because type variable ‘a’ would escape its scope
- This (rigid, skolem) type variable is bound by
- a pattern with constructor
- C :: forall a. (a -> Int) -> DS,
- in an equation for ‘call’
- at tcfail099.hs:9:7-9
- Relevant bindings include
- arg :: t (bound at tcfail099.hs:9:12)
- f :: a -> Int (bound at tcfail099.hs:9:9)
- call :: DS -> t -> Int (bound at tcfail099.hs:9:1)
- In the first argument of ‘f’, namely ‘arg’
- In the expression: f arg
+
+tcfail099.hs:9:20:
+ Couldn't match expected type ‘a’ with actual type ‘t’
+ because type variable ‘a’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ a pattern with constructor: C :: forall a. (a -> Int) -> DS,
+ in an equation for ‘call’
+ at tcfail099.hs:9:7-9
+ Relevant bindings include
+ arg :: t (bound at tcfail099.hs:9:12)
+ f :: a -> Int (bound at tcfail099.hs:9:9)
+ call :: DS -> t -> Int (bound at tcfail099.hs:9:1)
+ In the first argument of ‘f’, namely ‘arg’
+ In the expression: f arg
diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
index 01a8bba99a..f32dead217 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail102.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
@@ -1,13 +1,13 @@
-
-tcfail102.hs:1:14: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail102.hs:9:15:
- Could not deduce (Integral (Ratio a)) arising from a use of ‘p’
- from the context (Integral a)
- bound by the type signature for
- f :: Integral a => P (Ratio a) -> P (Ratio a)
- at tcfail102.hs:8:6-45
- In the ‘p’ field of a record
- In the expression: x {p = p x}
- In an equation for ‘f’: f x = x {p = p x}
+
+tcfail102.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail102.hs:9:15:
+ Could not deduce (Integral (Ratio a)) arising from a use of ‘p’
+ from the context (Integral a)
+ bound by the type signature for:
+ f :: Integral a => P (Ratio a) -> P (Ratio a)
+ at tcfail102.hs:8:6-45
+ In the ‘p’ field of a record
+ In the expression: x {p = p x}
+ In an equation for ‘f’: f x = x {p = p x}
diff --git a/testsuite/tests/typecheck/should_fail/tcfail103.stderr b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
index 1d71a6aa9a..1b57893608 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail103.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
@@ -1,15 +1,15 @@
-
-tcfail103.hs:15:23:
- Couldn't match type ‘t’ with ‘s’
- ‘t’ is a rigid type variable bound by
- the type signature for f :: ST t Int at tcfail103.hs:10:5
- ‘s’ is a rigid type variable bound by
- the type signature for g :: ST s Int at tcfail103.hs:13:14
- Expected type: STRef s Int
- Actual type: STRef t Int
- Relevant bindings include
- g :: ST s Int (bound at tcfail103.hs:15:9)
- v :: STRef t Int (bound at tcfail103.hs:12:5)
- f :: ST t Int (bound at tcfail103.hs:11:1)
- In the first argument of ‘readSTRef’, namely ‘v’
- In the expression: readSTRef v
+
+tcfail103.hs:15:23:
+ Couldn't match type ‘t’ with ‘s’
+ ‘t’ is a rigid type variable bound by
+ the type signature for: f :: ST t Int at tcfail103.hs:10:5
+ ‘s’ is a rigid type variable bound by
+ the type signature for: g :: ST s Int at tcfail103.hs:13:14
+ Expected type: STRef s Int
+ Actual type: STRef t Int
+ Relevant bindings include
+ g :: ST s Int (bound at tcfail103.hs:15:9)
+ v :: STRef t Int (bound at tcfail103.hs:12:5)
+ f :: ST t Int (bound at tcfail103.hs:11:1)
+ In the first argument of ‘readSTRef’, namely ‘v’
+ In the expression: readSTRef v
diff --git a/testsuite/tests/typecheck/should_fail/tcfail125.stderr b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
index b3e0720f79..5d31a29080 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail125.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
@@ -1,11 +1,11 @@
-
-tcfail125.hs:1:14: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail125.hs:11:4:
- No instance for (Show a) arising from a use of ‘LiftObs’
- Possible fix:
- add (Show a) to the context of
- the type signature for f :: Obs a -> String
- In the pattern: LiftObs _ _
- In an equation for ‘f’: f (LiftObs _ _) = "yes"
+
+tcfail125.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail125.hs:11:4:
+ No instance for (Show a) arising from a use of ‘LiftObs’
+ Possible fix:
+ add (Show a) to the context of
+ the type signature for: f :: Obs a -> String
+ In the pattern: LiftObs _ _
+ In an equation for ‘f’: f (LiftObs _ _) = "yes"
diff --git a/testsuite/tests/typecheck/should_fail/tcfail131.stderr b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
index f49a4b3975..cb2bd64e5b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail131.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
@@ -1,10 +1,10 @@
-
-tcfail131.hs:7:9:
- 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
- x :: b (bound at tcfail131.hs:7:5)
- g :: b -> b (bound at tcfail131.hs:7:3)
- In the expression: f x x
- In an equation for ‘g’: g x = f x x
+
+tcfail131.hs:7:9:
+ 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
+ x :: b (bound at tcfail131.hs:7:5)
+ g :: b -> b (bound at tcfail131.hs:7:3)
+ In the expression: f x x
+ In an equation for ‘g’: g x = f x x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.stderr b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
index fecb2f370f..3cde64a4bc 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail142.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
@@ -1,11 +1,11 @@
-
-tcfail142.hs:18:8:
- Could not deduce (Bar a0 r)
- from the context (Bar a r)
- bound by the type signature for bar :: Bar a r => r -> ()
- at tcfail142.hs:18:8-25
- The type variable ‘a0’ is ambiguous
- In the ambiguity check for the type signature for ‘bar’:
- bar :: forall r a. Bar a r => r -> ()
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘bar’: bar :: Bar a r => r -> ()
+
+tcfail142.hs:18:8:
+ Could not deduce (Bar a0 r)
+ from the context (Bar a r)
+ bound by the type signature for: bar :: Bar a r => r -> ()
+ at tcfail142.hs:18:8-25
+ The type variable ‘a0’ is ambiguous
+ In the ambiguity check for the type signature for ‘bar’:
+ bar :: forall r a. Bar a r => r -> ()
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘bar’: bar :: Bar a r => r -> ()
diff --git a/testsuite/tests/typecheck/should_fail/tcfail153.stderr b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
index 80efb9221c..aafe8a269a 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail153.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
@@ -1,16 +1,16 @@
-
-tcfail153.hs:6:7:
- Couldn't match type ‘a’ with ‘Bool’
- ‘a’ is a rigid type variable bound by
- the type signature for f :: a -> [a] at tcfail153.hs:5:6
- Expected type: [a]
- Actual type: [Bool]
- Relevant bindings include
- x :: a (bound at tcfail153.hs:6:3)
- f :: a -> [a] (bound at tcfail153.hs:6:1)
- In the expression: g x
- In an equation for ‘f’:
- f x
- = g x
- where
- g y = if y then [] else [...]
+
+tcfail153.hs:6:7:
+ Couldn't match type ‘a’ with ‘Bool’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: f :: a -> [a] at tcfail153.hs:5:6
+ Expected type: [a]
+ Actual type: [Bool]
+ Relevant bindings include
+ x :: a (bound at tcfail153.hs:6:3)
+ f :: a -> [a] (bound at tcfail153.hs:6:1)
+ In the expression: g x
+ In an equation for ‘f’:
+ f x
+ = g x
+ where
+ g y = if y then [] else [...]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail167.stderr b/testsuite/tests/typecheck/should_fail/tcfail167.stderr
index e20e1cfe7c..e274c5ddc7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail167.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail167.stderr
@@ -1,9 +1,8 @@
-
-tcfail167.hs:14:14:
- Couldn't match type ‘Char’ with ‘Float’
- Inaccessible code in
- a pattern with constructor
- C2 :: T Float,
- in an equation for ‘inaccessible’
- In the pattern: C2
- In an equation for ‘inaccessible’: inaccessible C2 = ' '
+
+tcfail167.hs:14:14:
+ Couldn't match type ‘Char’ with ‘Float’
+ Inaccessible code in
+ a pattern with constructor: C2 :: T Float,
+ in an equation for ‘inaccessible’
+ In the pattern: C2
+ In an equation for ‘inaccessible’: inaccessible C2 = ' '
diff --git a/testsuite/tests/typecheck/should_fail/tcfail171.stderr b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
index d29f91ef05..9c7a786026 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 (PrintfType b) arising from a use of ‘printf’
- Possible fix:
- 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
+
+tcfail171.hs:9:10:
+ No instance for (PrintfType b) arising from a use of ‘printf’
+ Possible fix:
+ 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/tcfail174.stderr b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
index 577c36e94b..42aa7a91fa 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail174.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
@@ -1,32 +1,32 @@
-
-tcfail174.hs:9:10:
- Couldn't match expected type ‘forall a. a -> a’
- with actual type ‘a0 -> a0’
- In the first argument of ‘Base’, namely ‘id’
- In the expression: Base id
-
-tcfail174.hs:13:14:
- Couldn't match type ‘a’ with ‘a1’
- because type variable ‘a1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type forall a2. a2 -> a2
- at tcfail174.hs:13:1-14
- Expected type: Capture (forall x. x -> a)
- Actual type: Capture (forall a. a -> a)
- Relevant bindings include
- h1 :: Capture a (bound at tcfail174.hs:13:1)
- In the first argument of ‘Capture’, namely ‘g’
- In the expression: Capture g
-
-tcfail174.hs:16:14:
- Couldn't match type ‘a’ with ‘b’
- ‘a’ is a rigid type variable bound by
- the type forall a1. a1 -> a1 at tcfail174.hs:1:1
- ‘b’ is a rigid type variable bound by
- the type signature for h2 :: Capture b at tcfail174.hs:15:7
- Expected type: Capture (forall x. x -> b)
- Actual type: Capture (forall a. a -> a)
- Relevant bindings include
- h2 :: Capture b (bound at tcfail174.hs:16:1)
- In the first argument of ‘Capture’, namely ‘g’
- In the expression: Capture g
+
+tcfail174.hs:9:10:
+ Couldn't match expected type ‘forall a. a -> a’
+ with actual type ‘a0 -> a0’
+ In the first argument of ‘Base’, namely ‘id’
+ In the expression: Base id
+
+tcfail174.hs:13:14:
+ Couldn't match type ‘a’ with ‘a1’
+ because type variable ‘a1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type forall a2. a2 -> a2
+ at tcfail174.hs:13:1-14
+ Expected type: Capture (forall x. x -> a)
+ Actual type: Capture (forall a. a -> a)
+ Relevant bindings include
+ h1 :: Capture a (bound at tcfail174.hs:13:1)
+ In the first argument of ‘Capture’, namely ‘g’
+ In the expression: Capture g
+
+tcfail174.hs:16:14:
+ Couldn't match type ‘a’ with ‘b’
+ ‘a’ is a rigid type variable bound by
+ the type forall a1. a1 -> a1 at tcfail174.hs:1:1
+ ‘b’ is a rigid type variable bound by
+ the type signature for: h2 :: Capture b at tcfail174.hs:15:7
+ Expected type: Capture (forall x. x -> b)
+ Actual type: Capture (forall a. a -> a)
+ Relevant bindings include
+ h2 :: Capture b (bound at tcfail174.hs:16:1)
+ In the first argument of ‘Capture’, namely ‘g’
+ In the expression: Capture g
diff --git a/testsuite/tests/typecheck/should_fail/tcfail175.stderr b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
index 623aab2706..8689fd1a6c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail175.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
@@ -1,10 +1,10 @@
-
-tcfail175.hs:11:1:
- Couldn't match expected type ‘String -> String -> String’
- with actual type ‘a’
- ‘a’ is a rigid type variable bound by
- the type signature for evalRHS :: Int -> a at tcfail175.hs:10:12
- Relevant bindings include
- evalRHS :: Int -> a (bound at tcfail175.hs:11:1)
- The equation(s) for ‘evalRHS’ have three arguments,
- but its type ‘Int -> a’ has only one
+
+tcfail175.hs:11:1:
+ Couldn't match expected type ‘String -> String -> String’
+ with actual type ‘a’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: evalRHS :: Int -> a at tcfail175.hs:10:12
+ Relevant bindings include
+ evalRHS :: Int -> a (bound at tcfail175.hs:11:1)
+ The equation(s) for ‘evalRHS’ have three arguments,
+ but its type ‘Int -> a’ has only one
diff --git a/testsuite/tests/typecheck/should_fail/tcfail179.stderr b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
index 0fdaeade03..51c66e138b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail179.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
@@ -1,17 +1,17 @@
-
-tcfail179.hs:14:39:
- Couldn't match expected type ‘s’ with actual type ‘x’
- ‘x’ is a rigid type variable bound by
- a pattern with constructor
- T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s,
- in a case alternative
- at tcfail179.hs:14:14
- ‘s’ is a rigid type variable bound by
- the type signature for run :: T s -> Int at tcfail179.hs:12:8
- Relevant bindings include
- x :: x (bound at tcfail179.hs:14:26)
- g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
- ts :: T s (bound at tcfail179.hs:13:5)
- run :: T s -> Int (bound at tcfail179.hs:13:1)
- In the first argument of ‘g’, namely ‘x’
- In the expression: g x id
+
+tcfail179.hs:14:39:
+ Couldn't match expected type ‘s’ with actual type ‘x’
+ ‘x’ is a rigid type variable bound by
+ a pattern with constructor:
+ T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s,
+ in a case alternative
+ at tcfail179.hs:14:14
+ ‘s’ is a rigid type variable bound by
+ the type signature for: run :: T s -> Int at tcfail179.hs:12:8
+ Relevant bindings include
+ x :: x (bound at tcfail179.hs:14:26)
+ g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
+ ts :: T s (bound at tcfail179.hs:13:5)
+ run :: T s -> Int (bound at tcfail179.hs:13:1)
+ In the first argument of ‘g’, namely ‘x’
+ In the expression: g x id
diff --git a/testsuite/tests/typecheck/should_fail/tcfail201.stderr b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
index 1270315a19..1414ceabb3 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
@@ -1,20 +1,20 @@
-
-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 }
+
+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/tcfail206.stderr b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
index 3eec7088cd..bd3d90df57 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail206.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
@@ -16,7 +16,7 @@ tcfail206.hs:8:5:
tcfail206.hs:11:5:
Couldn't match type ‘a’ with ‘Bool’
‘a’ is a rigid type variable bound by
- the type signature for c :: a -> (a, Bool) at tcfail206.hs:10:6
+ the type signature for: c :: a -> (a, Bool) at tcfail206.hs:10:6
Expected type: a -> (a, Bool)
Actual type: a -> (a, a)
Relevant bindings include
@@ -42,7 +42,7 @@ tcfail206.hs:17:5:
tcfail206.hs:20:5:
Couldn't match type ‘a’ with ‘Bool’
‘a’ is a rigid type variable bound by
- the type signature for f :: a -> (# a, Bool #) at tcfail206.hs:19:6
+ the type signature for: f :: a -> (# a, Bool #) at tcfail206.hs:19:6
Expected type: a -> (# a, Bool #)
Actual type: a -> (# a, a #)
Relevant bindings include
diff --git a/testsuite/tests/typecheck/should_fail/tcfail208.stderr b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
index c83c63be3f..ec3f4c668b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail208.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
@@ -1,9 +1,9 @@
-
-tcfail208.hs:4:19:
- Could not deduce (Eq (m a)) arising from a use of ‘==’
- from the context (Monad m, Eq a)
- bound by the type signature for
- f :: (Monad m, Eq a) => a -> m a -> Bool
- at tcfail208.hs:3:6-40
- In the expression: (return x == y)
- In an equation for ‘f’: f x y = (return x == y)
+
+tcfail208.hs:4:19:
+ Could not deduce (Eq (m a)) arising from a use of ‘==’
+ from the context (Monad m, Eq a)
+ bound by the type signature for:
+ f :: (Monad m, Eq a) => a -> m a -> Bool
+ at tcfail208.hs:3:6-40
+ In the expression: (return x == y)
+ In an equation for ‘f’: f x y = (return x == y)