summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-01-05 12:56:46 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-01-06 14:18:53 +0000
commitda9b2ec3e19edb1de0e73e8f32aa0443743f072c (patch)
treee917140da7b725bce9a44d048ac6013af113d6be /testsuite/tests/typecheck
parentd4f460feeb263f794774bf2fc330a48bde4ea81c (diff)
downloadhaskell-da9b2ec3e19edb1de0e73e8f32aa0443743f072c.tar.gz
Print singleton consraints without parens
The main change is in TypeRep.pprTheta, so we print Eq a for a singleton, but (Eq a, Show a) for multiple constraints. There are lots of trivial knock-on changes to error messages
Diffstat (limited to 'testsuite/tests/typecheck')
-rw-r--r--testsuite/tests/typecheck/should_compile/T7220a.stderr28
-rw-r--r--testsuite/tests/typecheck/should_compile/tc168.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr24
-rw-r--r--testsuite/tests/typecheck/should_fail/IPFail.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/T1897a.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T5300.stderr64
-rw-r--r--testsuite/tests/typecheck/should_fail/T5853.stderr40
-rw-r--r--testsuite/tests/typecheck/should_fail/T7279.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T7525.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T7857.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T8912.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T9109.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail034.stderr24
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail041.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail042.stderr48
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail067.stderr152
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail072.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail080.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail097.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail098.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail102.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail108.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail130.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail142.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail181.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail208.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail211.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail213.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail214.stderr2
29 files changed, 274 insertions, 274 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T7220a.stderr b/testsuite/tests/typecheck/should_compile/T7220a.stderr
index ef9900ebd8..ea0331b3dc 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/tc168.stderr b/testsuite/tests/typecheck/should_compile/tc168.stderr
index 16df4a466b..4eca08f17c 100644
--- a/testsuite/tests/typecheck/should_compile/tc168.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc168.stderr
@@ -1,7 +1,7 @@
tc168.hs:17:1:
Could not deduce (C a1 (a, b0))
- from the context (C a1 (a, b))
+ from the context: C a1 (a, b)
bound by the inferred type for ‘g’: C a1 (a, b) => a1 -> a
at tc168.hs:17:1-16
The type variable ‘b0’ is ambiguous
diff --git a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
index f06ee68043..62354d3f02 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/IPFail.stderr b/testsuite/tests/typecheck/should_fail/IPFail.stderr
index 1af8948019..d176d931fe 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/T1897a.stderr b/testsuite/tests/typecheck/should_fail/T1897a.stderr
index e0f76ee17c..5e7a590fa5 100644
--- a/testsuite/tests/typecheck/should_fail/T1897a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1897a.stderr
@@ -1,7 +1,7 @@
T1897a.hs:9:1:
Could not deduce (Wob a0 b)
- from the context (Wob a b)
+ from the context: Wob a b
bound by the inferred type for ‘foo’: Wob a b => b -> [b]
at T1897a.hs:9:1-24
The type variable ‘a0’ is ambiguous
diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr
index 2adbed420b..851d017035 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/T5853.stderr b/testsuite/tests/typecheck/should_fail/T5853.stderr
index 21145ca4ce..aa60ffe710 100644
--- a/testsuite/tests/typecheck/should_fail/T5853.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5853.stderr
@@ -1,20 +1,20 @@
-
-T5853.hs:15:52:
- Could not deduce (fb ~ Subst (Subst fb a) (Elem fb))
- from the context (F (Subst (Subst fb a) b),
- Elem (Subst (Subst fb a) b) ~ b,
- Subst (Subst (Subst fb a) b) (Elem fb) ~ fb,
- Subst fb b ~ Subst (Subst fb a) b,
- F (Subst fb a),
- Elem (Subst fb a) ~ a,
- Elem (Subst (Subst fb a) b) ~ b,
- Subst (Subst (Subst fb a) b) a ~ Subst fb a)
- bound by the RULE "map/map" at T5853.hs:15:2-57
- ‘fb’ is a rigid type variable bound by
- the RULE "map/map" at T5853.hs:15:2
- Relevant bindings include
- f :: b -> Elem fb (bound at T5853.hs:15:19)
- g :: a -> b (bound at T5853.hs:15:21)
- xs :: Subst fb a (bound at T5853.hs:15:23)
- In the expression: (f . g) <$> xs
- When checking the transformation rule "map/map"
+
+T5853.hs:15:52:
+ Could not deduce: fb ~ Subst (Subst fb a) (Elem fb)
+ from the context: (F (Subst (Subst fb a) b),
+ Elem (Subst (Subst fb a) b) ~ b,
+ Subst (Subst (Subst fb a) b) (Elem fb) ~ fb,
+ Subst fb b ~ Subst (Subst fb a) b,
+ F (Subst fb a),
+ Elem (Subst fb a) ~ a,
+ Elem (Subst (Subst fb a) b) ~ b,
+ Subst (Subst (Subst fb a) b) a ~ Subst fb a)
+ bound by the RULE "map/map" at T5853.hs:15:2-57
+ ‘fb’ is a rigid type variable bound by
+ the RULE "map/map" at T5853.hs:15:2
+ Relevant bindings include
+ f :: b -> Elem fb (bound at T5853.hs:15:19)
+ g :: a -> b (bound at T5853.hs:15:21)
+ xs :: Subst fb a (bound at T5853.hs:15:23)
+ In the expression: (f . g) <$> xs
+ When checking the transformation rule "map/map"
diff --git a/testsuite/tests/typecheck/should_fail/T7279.stderr b/testsuite/tests/typecheck/should_fail/T7279.stderr
index 10acbbec8b..33af730620 100644
--- a/testsuite/tests/typecheck/should_fail/T7279.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7279.stderr
@@ -1,7 +1,7 @@
T7279.hs:6:10:
Could not deduce (Show b0)
- from the context (Eq a, Show b)
+ from the context: (Eq a, Show b)
bound by an instance declaration: (Eq a, Show b) => Eq (T a)
at T7279.hs:6:10-35
The type variable ‘b0’ is ambiguous
diff --git a/testsuite/tests/typecheck/should_fail/T7525.stderr b/testsuite/tests/typecheck/should_fail/T7525.stderr
index ecf3eb1ab0..4d6f8d3a90 100644
--- a/testsuite/tests/typecheck/should_fail/T7525.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7525.stderr
@@ -1,8 +1,8 @@
T7525.hs:5:30:
- Could not deduce (?b::Bool)
+ Could not deduce: ?b::Bool
arising from a use of implicit parameter ‘?b’
- from the context (?a::Bool)
+ from the context: ?a::Bool
bound by the implicit-parameter binding for ?a at T7525.hs:5:7-31
In the second argument of ‘(&&)’, namely ‘?b’
In the expression: ?a && ?b
diff --git a/testsuite/tests/typecheck/should_fail/T7857.stderr b/testsuite/tests/typecheck/should_fail/T7857.stderr
index d1e7d3bea2..bc8fed9bf2 100644
--- a/testsuite/tests/typecheck/should_fail/T7857.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7857.stderr
@@ -1,7 +1,7 @@
T7857.hs:8:11:
Could not deduce (PrintfType r0) arising from a use of ‘printf’
- from the context (PrintfArg t)
+ from the context: PrintfArg t
bound by the inferred type of g :: PrintfArg t => t -> b
at T7857.hs:8:1-21
The type variable ‘r0’ is ambiguous
diff --git a/testsuite/tests/typecheck/should_fail/T8912.stderr b/testsuite/tests/typecheck/should_fail/T8912.stderr
index ad343f33c5..4e4515e7a1 100644
--- a/testsuite/tests/typecheck/should_fail/T8912.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8912.stderr
@@ -1,6 +1,6 @@
T8912.hs:7:10:
Illegal implicit parameter ‘?imp::Int’
- In the context: (?imp::Int)
+ In the context: ?imp::Int
While checking an instance declaration
In the instance declaration for ‘C [a]’
diff --git a/testsuite/tests/typecheck/should_fail/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr
index 3f5236b778..1c7e6e5c09 100644
--- a/testsuite/tests/typecheck/should_fail/T9109.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9109.stderr
@@ -1,14 +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/tcfail034.stderr b/testsuite/tests/typecheck/should_fail/tcfail034.stderr
index d2abc05944..f984848ea7 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/tcfail041.stderr b/testsuite/tests/typecheck/should_fail/tcfail041.stderr
index c81d30979a..fe116b5277 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail041.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail041.stderr
@@ -1,6 +1,6 @@
tcfail041.hs:5:1:
Illegal implicit parameter ‘?imp::Int’
- In the context: (?imp::Int)
+ In the context: ?imp::Int
While checking the super-classes of class ‘D’
In the class declaration for ‘D’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail042.stderr b/testsuite/tests/typecheck/should_fail/tcfail042.stderr
index 12e0ea6368..8180853c88 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail042.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail042.stderr
@@ -1,24 +1,24 @@
-
-tcfail042.hs:15:10:
- Could not deduce (Num a)
- arising from the superclasses of an instance declaration
- from the context (Eq a, Show a)
- bound by the instance declaration at tcfail042.hs:15:10-34
- Possible fix:
- add (Num a) to the context of the instance declaration
- In the instance declaration for ‘Bar [a]’
-
-tcfail042.hs:17:18:
- Could not deduce (Num a) arising from a use of ‘foo’
- from the context (Eq a, Show a)
- bound by the instance declaration at tcfail042.hs:15:10-34
- Possible fix:
- add (Num a) to the context of the instance declaration
- In the expression: foo xs
- In an equation for ‘bar’:
- bar (x : xs)
- = foo xs
- where
- u = x == x
- v = show x
- In the instance declaration for ‘Bar [a]’
+
+tcfail042.hs:15:10:
+ Could not deduce (Num a)
+ arising from the superclasses of an instance declaration
+ from the context: (Eq a, Show a)
+ bound by the instance declaration at tcfail042.hs:15:10-34
+ Possible fix:
+ add (Num a) to the context of the instance declaration
+ In the instance declaration for ‘Bar [a]’
+
+tcfail042.hs:17:18:
+ Could not deduce (Num a) arising from a use of ‘foo’
+ from the context: (Eq a, Show a)
+ bound by the instance declaration at tcfail042.hs:15:10-34
+ Possible fix:
+ add (Num a) to the context of the instance declaration
+ In the expression: foo xs
+ In an equation for ‘bar’:
+ bar (x : xs)
+ = foo xs
+ where
+ u = x == x
+ v = show x
+ In the instance declaration for ‘Bar [a]’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
index bdf479c5c8..e539ea881f 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/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
index 9d88d70c80..c08bb58fb1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
@@ -1,7 +1,7 @@
tcfail072.hs:23:13:
Could not deduce (Ord p0) arising from a use of ‘g’
- from the context (Ord p, Ord q)
+ from the context: (Ord p, Ord q)
bound by the type signature for:
g :: (Ord p, Ord q) => AB p q -> Bool
at tcfail072.hs:22:6-38
diff --git a/testsuite/tests/typecheck/should_fail/tcfail080.stderr b/testsuite/tests/typecheck/should_fail/tcfail080.stderr
index fcd974da90..3b8d8e9eb9 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail080.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail080.stderr
@@ -1,7 +1,7 @@
tcfail080.hs:27:1:
Could not deduce (Collection c0 a)
- from the context (Collection c a)
+ from the context: Collection c a
bound by the inferred type for ‘q’: Collection c a => a -> Bool
at tcfail080.hs:27:1-27
The type variable ‘c0’ is ambiguous
diff --git a/testsuite/tests/typecheck/should_fail/tcfail097.stderr b/testsuite/tests/typecheck/should_fail/tcfail097.stderr
index b5be488b40..e4a611774d 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/tcfail098.stderr b/testsuite/tests/typecheck/should_fail/tcfail098.stderr
index 8ac2960d3c..1d95319566 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail098.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail098.stderr
@@ -1,7 +1,7 @@
tcfail098.hs:12:10:
Could not deduce (Bar a0)
- from the context (Bar a)
+ from the context: Bar a
bound by an instance declaration: Bar a => Bar Bool
at tcfail098.hs:12:10-26
The type variable ‘a0’ is ambiguous
diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
index f32dead217..6bd3750138 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/tcfail108.stderr b/testsuite/tests/typecheck/should_fail/tcfail108.stderr
index 490640f74b..b23e9d91a5 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail108.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail108.stderr
@@ -2,6 +2,6 @@
tcfail108.hs:7:10:
Non type-variable argument in the constraint: Eq (f (Rec f))
(Use FlexibleContexts to permit this)
- In the context: (Eq (f (Rec f)))
+ In the context: Eq (f (Rec f))
While checking an instance declaration
In the instance declaration for ‘Eq (Rec f)’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail130.stderr b/testsuite/tests/typecheck/should_fail/tcfail130.stderr
index 8e71045bef..7640031cbd 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail130.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail130.stderr
@@ -1,5 +1,5 @@
tcfail130.hs:10:7:
- Unbound implicit parameter (?x::Int) arising from a use of ‘woggle’
+ Unbound implicit parameter ?x::Int arising from a use of ‘woggle’
In the expression: woggle 3
In an equation for ‘foo’: foo = woggle 3
diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.stderr b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
index 3cde64a4bc..c6553c1de6 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/tcfail181.stderr b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
index 84ba8768f4..e6380995bb 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail181.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
@@ -1,7 +1,7 @@
tcfail181.hs:17:9:
Could not deduce (Monad m0) arising from a use of ‘foo’
- from the context (Monad m)
+ from the context: Monad m
bound by the inferred type of
wog :: Monad m => t -> Something (m Bool) e
at tcfail181.hs:17:1-30
diff --git a/testsuite/tests/typecheck/should_fail/tcfail208.stderr b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
index ec3f4c668b..4b88fc0e58 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)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail211.stderr b/testsuite/tests/typecheck/should_fail/tcfail211.stderr
index 0d9d23d9b1..614aaf59fa 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail211.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail211.stderr
@@ -1,6 +1,6 @@
tcfail211.hs:5:1:
Illegal implicit parameter ‘?imp::Int’
- In the context: (?imp::Int)
+ In the context: ?imp::Int
While checking the super-classes of class ‘D’
In the class declaration for ‘D’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail213.stderr b/testsuite/tests/typecheck/should_fail/tcfail213.stderr
index f54379481f..a6b63bd9f1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail213.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail213.stderr
@@ -2,6 +2,6 @@
tcfail213.hs:8:1:
Illegal constraint ‘F a’ in a superclass/instance context
(Use UndecidableInstances to permit this)
- In the context: (F a)
+ In the context: F a
While checking the super-classes of class ‘C’
In the class declaration for ‘C’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail214.stderr b/testsuite/tests/typecheck/should_fail/tcfail214.stderr
index 93101f45cc..5520a3eff1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail214.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail214.stderr
@@ -2,6 +2,6 @@
tcfail214.hs:9:10:
Illegal constraint ‘F a’ in a superclass/instance context
(Use UndecidableInstances to permit this)
- In the context: (F a)
+ In the context: F a
While checking an instance declaration
In the instance declaration for ‘C [a]’