summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/annotations/should_fail/annfail08.stderr7
-rw-r--r--testsuite/tests/annotations/should_fail/annfail10.stderr20
-rw-r--r--testsuite/tests/deriving/should_fail/T5287.stderr2
-rw-r--r--testsuite/tests/deriving/should_fail/drvfail011.stderr4
-rw-r--r--testsuite/tests/driver/T5147/T5147.stderr3
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break003.stderr5
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break006.stderr16
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print019.stderr8
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr19
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stdout11
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4485.stderr60
-rw-r--r--testsuite/tests/rebindable/rebindable6.stderr16
-rw-r--r--testsuite/tests/safeHaskell/ghci/p15.stderr3
-rw-r--r--testsuite/tests/simplCore/should_compile/T3772.stdout2
-rw-r--r--testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/IPFail.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T2846b.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T3592.stderr27
-rw-r--r--testsuite/tests/typecheck/should_fail/mc22.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/mc23.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/mc24.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/mc25.stderr21
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail008.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail010.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail017.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail018.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail020.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail040.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail043.stderr77
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail067.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail072.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail102.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail125.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail128.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail133.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail142.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail152.hs18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail152.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail171.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail181.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail194.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail208.stderr5
42 files changed, 288 insertions, 225 deletions
diff --git a/testsuite/tests/annotations/should_fail/annfail08.stderr b/testsuite/tests/annotations/should_fail/annfail08.stderr
index 7e9b112dca..d10fbe55d6 100644
--- a/testsuite/tests/annotations/should_fail/annfail08.stderr
+++ b/testsuite/tests/annotations/should_fail/annfail08.stderr
@@ -2,18 +2,13 @@
annfail08.hs:9:1:
No instance for (Data.Data.Data (a0 -> a0))
arising from an annotation
- The type variable `a0' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
Possible fix:
add an instance declaration for (Data.Data.Data (a0 -> a0))
In the expression: (id + 1)
In the annotation: {-# ANN f (id + 1) #-}
annfail08.hs:9:15:
- No instance for (Num (a0 -> a0))
- arising from a use of `+'
- The type variable `a0' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
+ No instance for (Num (a0 -> a0)) arising from a use of `+'
Possible fix: add an instance declaration for (Num (a0 -> a0))
In the expression: (id + 1)
In the annotation: {-# ANN f (id + 1) #-}
diff --git a/testsuite/tests/annotations/should_fail/annfail10.stderr b/testsuite/tests/annotations/should_fail/annfail10.stderr
index 33a4c16a9b..8b2e59375b 100644
--- a/testsuite/tests/annotations/should_fail/annfail10.stderr
+++ b/testsuite/tests/annotations/should_fail/annfail10.stderr
@@ -1,16 +1,28 @@
annfail10.hs:9:1:
- No instance for (Data.Data.Data a0)
- arising from an annotation
+ No instance for (Data.Data.Data a0) arising from an annotation
The type variable `a0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Data.Data.Data () -- Defined in `Data.Data'
+ instance (Data.Data.Data a, Data.Data.Data b) =>
+ Data.Data.Data (a, b)
+ -- Defined in `Data.Data'
+ instance (Data.Data.Data a, Data.Data.Data b, Data.Data.Data c) =>
+ Data.Data.Data (a, b, c)
+ -- Defined in `Data.Data'
+ ...plus 27 others
In the expression: 1
In the annotation: {-# ANN f 1 #-}
annfail10.hs:9:11:
- No instance for (Num a0)
- arising from the literal `1'
+ No instance for (Num a0) arising from the literal `1'
The type variable `a0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus 11 others
In the expression: 1
In the annotation: {-# ANN f 1 #-}
diff --git a/testsuite/tests/deriving/should_fail/T5287.stderr b/testsuite/tests/deriving/should_fail/T5287.stderr
index e95212f67e..93ea7d6cb7 100644
--- a/testsuite/tests/deriving/should_fail/T5287.stderr
+++ b/testsuite/tests/deriving/should_fail/T5287.stderr
@@ -2,8 +2,6 @@
T5287.hs:6:29:
No instance for (A e oops)
arising from the 'deriving' clause of a data type declaration
- The type variable `oops' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
diff --git a/testsuite/tests/deriving/should_fail/drvfail011.stderr b/testsuite/tests/deriving/should_fail/drvfail011.stderr
index 80e486628b..9bb04bfde7 100644
--- a/testsuite/tests/deriving/should_fail/drvfail011.stderr
+++ b/testsuite/tests/deriving/should_fail/drvfail011.stderr
@@ -1,7 +1,7 @@
drvfail011.hs:8:1:
- No instance for (Eq a)
- arising from a use of `=='
+ No instance for (Eq a) arising from a use of `=='
+ Possible fix: add (Eq a) to the context of the instance declaration
In the expression: ((a1 == b1))
In an equation for `==': == (T1 a1) (T1 b1) = ((a1 == b1))
When typechecking the code for `=='
diff --git a/testsuite/tests/driver/T5147/T5147.stderr b/testsuite/tests/driver/T5147/T5147.stderr
index b38cad9850..9d37468dfe 100644
--- a/testsuite/tests/driver/T5147/T5147.stderr
+++ b/testsuite/tests/driver/T5147/T5147.stderr
@@ -1,7 +1,6 @@
A.hs:6:15:
- No instance for (Show (Fields v))
- arising from a use of `show'
+ No instance for (Show (Fields v)) arising from a use of `show'
Possible fix: add an instance declaration for (Show (Fields v))
In the expression: show a
In an equation for `showField': showField a = show a
diff --git a/testsuite/tests/ghci.debugger/scripts/break003.stderr b/testsuite/tests/ghci.debugger/scripts/break003.stderr
index 58f1b68f78..36c125babf 100644
--- a/testsuite/tests/ghci.debugger/scripts/break003.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break003.stderr
@@ -1,8 +1,5 @@
<interactive>:5:1:
- No instance for (Show (t -> a))
- arising from a use of `print'
- Cannot resolve unknown runtime types `t', `a'
- Use :print or :force to determine these types
+ No instance for (Show (t -> a)) arising from a use of `print'
Possible fix: add an instance declaration for (Show (t -> a))
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stderr b/testsuite/tests/ghci.debugger/scripts/break006.stderr
index 7ee08988ab..6ebe46bb85 100644
--- a/testsuite/tests/ghci.debugger/scripts/break006.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break006.stderr
@@ -1,14 +1,22 @@
<interactive>:6:1:
- No instance for (Show a)
- arising from a use of `print'
+ No instance for (Show a) arising from a use of `print'
Cannot resolve unknown runtime type `a'
Use :print or :force to determine these types
+ Note: there are several potential instances:
+ instance Show Double -- Defined in `GHC.Float'
+ instance Show Float -- Defined in `GHC.Float'
+ instance Show () -- Defined in `GHC.Show'
+ ...plus 24 others
In a stmt of an interactive GHCi command: print it
<interactive>:8:1:
- No instance for (Show a)
- arising from a use of `print'
+ No instance for (Show a) arising from a use of `print'
Cannot resolve unknown runtime type `a'
Use :print or :force to determine these types
+ Note: there are several potential instances:
+ instance Show Double -- Defined in `GHC.Float'
+ instance Show Float -- Defined in `GHC.Float'
+ instance Show () -- Defined in `GHC.Show'
+ ...plus 24 others
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci.debugger/scripts/print019.stderr b/testsuite/tests/ghci.debugger/scripts/print019.stderr
index e272ce9e1f..091cf6602d 100644
--- a/testsuite/tests/ghci.debugger/scripts/print019.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/print019.stderr
@@ -1,7 +1,11 @@
<interactive>:11:1:
- No instance for (Show a1)
- arising from a use of `print'
+ No instance for (Show a1) arising from a use of `print'
Cannot resolve unknown runtime type `a1'
Use :print or :force to determine these types
+ Note: there are several potential instances:
+ instance Show a => Show (List1 a) -- Defined at ../Test.hs:11:12
+ instance Show MyInt -- Defined at ../Test.hs:14:16
+ instance Show a => Show (MkT a) -- Defined at ../Test.hs:17:13
+ ...plus 32 others
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index cd146ddbff..831da73914 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -13,15 +13,13 @@
In an equation for `a': a = 'p'
../../typecheck/should_run/Defer01.hs:18:9: Warning:
- No instance for (Eq B)
- arising from a use of `=='
+ No instance for (Eq B) arising from a use of `=='
Possible fix: add an instance declaration for (Eq B)
In the expression: x == x
In an equation for `b': b x = x == x
../../typecheck/should_run/Defer01.hs:28:5: Warning:
- No instance for (Num (a -> a))
- arising from the literal `1'
+ No instance for (Num (a -> a)) arising from the literal `1'
Possible fix: add an instance declaration for (Num (a -> a))
In the expression: 1
In an equation for `d': d = 1
@@ -49,18 +47,19 @@
In the expression: (not (K a))
../../typecheck/should_run/Defer01.hs:43:5: Warning:
- No instance for (MyClass a1)
- arising from a use of `myOp'
- The type variable `a1' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
+ No instance for (MyClass a1) arising from a use of `myOp'
In the expression: myOp 23
In an equation for `j': j = myOp 23
../../typecheck/should_run/Defer01.hs:43:10: Warning:
- No instance for (Num a1)
- arising from the literal `23'
+ No instance for (Num a1) arising from the literal `23'
The type variable `a1' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
In the first argument of `myOp', namely `23'
In the expression: myOp 23
In an equation for `j': j = myOp 23
diff --git a/testsuite/tests/ghci/scripts/Defer02.stdout b/testsuite/tests/ghci/scripts/Defer02.stdout
index e845c09d4b..32e51d6d65 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stdout
+++ b/testsuite/tests/ghci/scripts/Defer02.stdout
@@ -12,15 +12,13 @@ Hello World*** Exception: ../../typecheck/should_run/Defer01.hs:11:40:
In an equation for `a': a = 'p'
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:18:9:
- No instance for (Eq B)
- arising from a use of `=='
+ No instance for (Eq B) arising from a use of `=='
Possible fix: add an instance declaration for (Eq B)
In the expression: x == x
In an equation for `b': b x = x == x
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:28:5:
- No instance for (Num (a -> a))
- arising from the literal `1'
+ No instance for (Num (a -> a)) arising from the literal `1'
Possible fix: add an instance declaration for (Num (a -> a))
In the expression: 1
In an equation for `d': d = 1
@@ -48,10 +46,7 @@ Hello World*** Exception: ../../typecheck/should_run/Defer01.hs:11:40:
In the expression: (not (K a))
(deferred type error)
"*** Exception: ../../typecheck/should_run/Defer01.hs:43:5:
- No instance for (MyClass a1)
- arising from a use of `myOp'
- The type variable `a1' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
+ No instance for (MyClass a1) arising from a use of `myOp'
In the expression: myOp 23
In an equation for `j': j = myOp 23
(deferred type error)
diff --git a/testsuite/tests/indexed-types/should_fail/T4485.stderr b/testsuite/tests/indexed-types/should_fail/T4485.stderr
index 21811da390..d07eedce97 100644
--- a/testsuite/tests/indexed-types/should_fail/T4485.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4485.stderr
@@ -1,29 +1,31 @@
-
-T4485.hs:47:15:
- Overlapping instances for EmbedAsChild
- (IdentityT IO) (XMLGenT m0 (XML m0))
- arising from a use of `asChild'
- Matching instances:
- instance [overlap ok] (EmbedAsChild m c, m1 ~ m) =>
- EmbedAsChild m (XMLGenT m1 c)
- -- Defined at T4485.hs:29:10
- instance [overlap ok] EmbedAsChild
- (IdentityT IO) (XMLGenT Identity ())
- -- Defined at T4485.hs:42:10
- (The choice depends on the instantiation of `m0'
- To pick the first instance above, use -XIncoherentInstances
- when compiling the other instance declarations)
- In the expression: asChild
- In the expression: asChild $ (genElement "foo")
- In an equation for `asChild':
- asChild b = asChild $ (genElement "foo")
-
-T4485.hs:47:26:
- No instance for (XMLGen m0)
- arising from a use of `genElement'
- The type variable `m0' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
- In the second argument of `($)', namely `(genElement "foo")'
- In the expression: asChild $ (genElement "foo")
- In an equation for `asChild':
- asChild b = asChild $ (genElement "foo")
+
+T4485.hs:47:15:
+ Overlapping instances for EmbedAsChild
+ (IdentityT IO) (XMLGenT m0 (XML m0))
+ arising from a use of `asChild'
+ Matching instances:
+ instance [overlap ok] (EmbedAsChild m c, m1 ~ m) =>
+ EmbedAsChild m (XMLGenT m1 c)
+ -- Defined at T4485.hs:29:10
+ instance [overlap ok] EmbedAsChild
+ (IdentityT IO) (XMLGenT Identity ())
+ -- Defined at T4485.hs:42:10
+ (The choice depends on the instantiation of `m0'
+ To pick the first instance above, use -XIncoherentInstances
+ when compiling the other instance declarations)
+ In the expression: asChild
+ In the expression: asChild $ (genElement "foo")
+ In an equation for `asChild':
+ asChild b = asChild $ (genElement "foo")
+
+T4485.hs:47:26:
+ No instance for (XMLGen m0) arising from a use of `genElement'
+ The type variable `m0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there is a potential instance available:
+ instance [overlap ok] XMLGen (IdentityT m)
+ -- Defined at T4485.hs:36:10
+ In the second argument of `($)', namely `(genElement "foo")'
+ In the expression: asChild $ (genElement "foo")
+ In an equation for `asChild':
+ asChild b = asChild $ (genElement "foo")
diff --git a/testsuite/tests/rebindable/rebindable6.stderr b/testsuite/tests/rebindable/rebindable6.stderr
index d38e53dbff..f380db4446 100644
--- a/testsuite/tests/rebindable/rebindable6.stderr
+++ b/testsuite/tests/rebindable/rebindable6.stderr
@@ -4,6 +4,9 @@ rebindable6.hs:106:17:
arising from a do statement
The type variable `t0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there is a potential instance available:
+ instance HasSeq (IO a -> IO b -> IO b)
+ -- Defined at rebindable6.hs:52:18
Possible fix:
add an instance declaration for (HasSeq (IO a -> t0 -> IO b))
In a stmt of a 'do' block: f
@@ -18,15 +21,16 @@ rebindable6.hs:106:17:
return b }
rebindable6.hs:107:17:
- No instances for (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0),
- HasFail ([Prelude.Char] -> t1))
+ No instance for (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0))
arising from a do statement
The type variables `t0', `t1' are ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there is a potential instance available:
+ instance HasBind (IO a -> (a -> IO b) -> IO b)
+ -- Defined at rebindable6.hs:47:18
Possible fix:
- add instance declarations for
- (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0),
- HasFail ([Prelude.Char] -> t1))
+ add an instance declaration for
+ (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0))
In a stmt of a 'do' block: Just (b :: b) <- g
In the expression:
do { f;
@@ -43,6 +47,8 @@ rebindable6.hs:108:17:
arising from a use of `return'
The type variable `t1' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there is a potential instance available:
+ instance HasReturn (a -> IO a) -- Defined at rebindable6.hs:42:18
Possible fix: add an instance declaration for (HasReturn (b -> t1))
In a stmt of a 'do' block: return b
In the expression:
diff --git a/testsuite/tests/safeHaskell/ghci/p15.stderr b/testsuite/tests/safeHaskell/ghci/p15.stderr
index 883f541c7b..30c24471f7 100644
--- a/testsuite/tests/safeHaskell/ghci/p15.stderr
+++ b/testsuite/tests/safeHaskell/ghci/p15.stderr
@@ -3,8 +3,7 @@
Can't create hand written instances of Typeable in Safe Haskell! Can only derive them
<interactive>:22:22:
- No instance for (Typeable G)
- arising from a use of `cast'
+ No instance for (Typeable G) arising from a use of `cast'
Possible fix: add an instance declaration for (Typeable G)
In the expression: (cast y) :: Maybe H
In a pattern binding: (Just y_as_H) = (cast y) :: Maybe H
diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout
index eee8ce61a9..85cca2ab63 100644
--- a/testsuite/tests/simplCore/should_compile/T3772.stdout
+++ b/testsuite/tests/simplCore/should_compile/T3772.stdout
@@ -1,6 +1,6 @@
==================== Tidy Core ====================
-Result size = 26
+ Result size = 26
Rec {
xs :: GHC.Prim.Int# -> ()
diff --git a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
index 24b2149bf5..1cf4e9f1cc 100644
--- a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
+++ b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
@@ -1,13 +1,12 @@
FailDueToGivenOverlapping.hs:27:9:
- Overlapping instances for E [t0]
- arising from a use of `eop'
- Matching instances:
- instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10
+ 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 dbb25d553f..efad8b3d56 100644
--- a/testsuite/tests/typecheck/should_fail/IPFail.stderr
+++ b/testsuite/tests/typecheck/should_fail/IPFail.stderr
@@ -4,10 +4,7 @@ IPFail.hs:6:18:
from the context (?x::Int)
bound by the type signature for f0 :: (?x::Int) => () -> Bool
at IPFail.hs:5:7-31
- Possible fix:
- add (Num Bool) to the context of
- the type signature for f0 :: (?x::Int) => () -> Bool
- or add an instance declaration for (Num Bool)
+ Possible fix: add an instance declaration for (Num Bool)
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/T2846b.stderr b/testsuite/tests/typecheck/should_fail/T2846b.stderr
index de90637c2a..56b1a13ab0 100644
--- a/testsuite/tests/typecheck/should_fail/T2846b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2846b.stderr
@@ -1,9 +1,6 @@
T2846b.hs:5:5:
- No instance for (Show (Num a0 => a0))
- arising from a use of `show'
- The type variable `a0' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
+ No instance for (Show (Num a0 => a0)) arising from a use of `show'
Possible fix: add an instance declaration for (Show (Num a0 => a0))
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 c2c96cc873..477c3aa675 100644
--- a/testsuite/tests/typecheck/should_fail/T3592.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3592.stderr
@@ -1,13 +1,14 @@
-
-T3592.hs:8:5:
- No instance for (Show (T a))
- arising from a use of `show'
- Possible fix: add an instance declaration for (Show (T a))
- 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'
- In the expression: show x
- In an equation for `g': g x = show x
+
+T3592.hs:8:5:
+ No instance for (Show (T a)) arising from a use of `show'
+ Possible fix: add an instance declaration for (Show (T a))
+ 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/mc22.stderr b/testsuite/tests/typecheck/should_fail/mc22.stderr
index a309d3bf4b..e4247abcc1 100644
--- a/testsuite/tests/typecheck/should_fail/mc22.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc22.stderr
@@ -1,9 +1,6 @@
mc22.hs:8:11:
- No instance for (Num (t0 [Char]))
- arising from a use of `+'
- The type variable `t0' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
+ No instance for (Num (t0 [Char])) arising from a use of `+'
Possible fix: add an instance declaration for (Num (t0 [Char]))
In the expression: x + 1
In the expression:
@@ -12,10 +9,14 @@ mc22.hs:8:11:
foo = [x + 1 | x <- ["Hello", "World"], then group using take 5]
mc22.hs:10:9:
- No instance for (Functor t0)
- arising from a use of `fmap'
+ No instance for (Functor t0) arising from a use of `fmap'
The type variable `t0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Functor ((,) a) -- Defined in `GHC.Base'
+ instance Functor ((->) r) -- Defined in `GHC.Base'
+ instance Functor IO -- Defined in `GHC.Base'
+ ...plus one other
In the expression: fmap
In a stmt of a monad comprehension: then group using take 5
In the expression:
diff --git a/testsuite/tests/typecheck/should_fail/mc23.stderr b/testsuite/tests/typecheck/should_fail/mc23.stderr
index 6e69a1df15..b3bad44e47 100644
--- a/testsuite/tests/typecheck/should_fail/mc23.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc23.stderr
@@ -4,15 +4,24 @@ mc23.hs:9:15:
arising from the arithmetic sequence `1 .. 10'
The type variable `b0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Enum Double -- Defined in `GHC.Float'
+ instance Enum Float -- Defined in `GHC.Float'
+ instance Enum () -- Defined in `GHC.Enum'
+ ...plus five others
In a stmt of a monad comprehension: x <- [1 .. 10]
In a stmt of a monad comprehension: then take 5 by x
In the expression: [x | x <- [1 .. 10], then take 5 by x]
mc23.hs:9:16:
- No instance for (Num b0)
- arising from the literal `1'
+ No instance for (Num b0) arising from the literal `1'
The type variable `b0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
In the expression: 1
In a stmt of a monad comprehension: x <- [1 .. 10]
In a stmt of a monad comprehension: then take 5 by x
@@ -22,6 +31,10 @@ mc23.hs:9:24:
arising from a statement in a monad comprehension
The type variable `t0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Monad ((->) r) -- Defined in `GHC.Base'
+ instance Monad IO -- Defined in `GHC.Base'
+ instance Monad [] -- Defined in `GHC.Base'
In a stmt of a monad comprehension: then take 5 by x
In the expression: [x | x <- [1 .. 10], then take 5 by x]
In an equation for `z': z = [x | x <- [1 .. 10], then take 5 by x]
diff --git a/testsuite/tests/typecheck/should_fail/mc24.stderr b/testsuite/tests/typecheck/should_fail/mc24.stderr
index 4856dc75ad..30d664a3fe 100644
--- a/testsuite/tests/typecheck/should_fail/mc24.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc24.stderr
@@ -4,16 +4,25 @@ mc24.hs:9:14:
arising from the arithmetic sequence `1 .. 10'
The type variable `a1' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Enum Double -- Defined in `GHC.Float'
+ instance Enum Float -- Defined in `GHC.Float'
+ instance Enum () -- Defined in `GHC.Enum'
+ ...plus five others
In a stmt of a monad comprehension: x <- [1 .. 10]
In a stmt of a monad comprehension: then group by x using take 2
In the expression:
[length x | x <- [1 .. 10], then group by x using take 2]
mc24.hs:9:15:
- No instance for (Num a1)
- arising from the literal `1'
+ No instance for (Num a1) arising from the literal `1'
The type variable `a1' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
In the expression: 1
In a stmt of a monad comprehension: x <- [1 .. 10]
In a stmt of a monad comprehension: then group by x using take 2
@@ -23,6 +32,10 @@ mc24.hs:10:9:
arising from a statement in a monad comprehension
The type variable `t0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Monad ((->) r) -- Defined in `GHC.Base'
+ instance Monad IO -- Defined in `GHC.Base'
+ instance Monad [] -- Defined in `GHC.Base'
In a stmt of a monad comprehension: then group by x using take 2
In the expression:
[length x | x <- [1 .. 10], then group by x using take 2]
diff --git a/testsuite/tests/typecheck/should_fail/mc25.stderr b/testsuite/tests/typecheck/should_fail/mc25.stderr
index 71559fb3d2..8caa47b3b4 100644
--- a/testsuite/tests/typecheck/should_fail/mc25.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc25.stderr
@@ -4,24 +4,37 @@ mc25.hs:9:15:
arising from the arithmetic sequence `1 .. 10'
The type variable `t0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Enum Double -- Defined in `GHC.Float'
+ instance Enum Float -- Defined in `GHC.Float'
+ instance Enum () -- Defined in `GHC.Enum'
+ ...plus five others
In a stmt of a monad comprehension: x <- [1 .. 10]
In a stmt of a monad comprehension: then group by x using take
In the expression: [x | x <- [1 .. 10], then group by x using take]
mc25.hs:9:16:
- No instance for (Num t0)
- arising from the literal `1'
+ No instance for (Num t0) arising from the literal `1'
The type variable `t0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
In the expression: 1
In a stmt of a monad comprehension: x <- [1 .. 10]
In a stmt of a monad comprehension: then group by x using take
mc25.hs:9:24:
- No instance for (Functor t1)
- arising from a use of `fmap'
+ No instance for (Functor t1) arising from a use of `fmap'
The type variable `t1' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Functor ((,) a) -- Defined in `GHC.Base'
+ instance Functor ((->) r) -- Defined in `GHC.Base'
+ instance Functor IO -- Defined in `GHC.Base'
+ ...plus one other
In the expression: fmap
In a stmt of a monad comprehension: then group by x using take
In the expression: [x | x <- [1 .. 10], then group by x using take]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail008.stderr b/testsuite/tests/typecheck/should_fail/tcfail008.stderr
index a6d97c71af..b50f77e05e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail008.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail008.stderr
@@ -7,6 +7,11 @@ tcfail008.hs:3:5:
o :: [a0] (bound at tcfail008.hs:3:1)
Probable fix: give these definition(s) an explicit type signature
or use -XNoMonomorphismRestriction
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
In the first argument of `(:)', namely `1'
In the expression: 1 : 2
In an equation for `o': o = 1 : 2
@@ -14,11 +19,6 @@ tcfail008.hs:3:5:
tcfail008.hs:3:7:
No instance for (Num [a0])
arising from the literal `2'
- The type variable `a0' is ambiguous
- Possible cause: the monomorphism restriction applied to the following:
- o :: [a0] (bound at tcfail008.hs:3:1)
- Probable fix: give these definition(s) an explicit type signature
- or use -XNoMonomorphismRestriction
Possible fix: add an instance declaration for (Num [a0])
In the second argument of `(:)', namely `2'
In the expression: 1 : 2
diff --git a/testsuite/tests/typecheck/should_fail/tcfail010.stderr b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
index 9371d51dcd..5f22a3a20e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail010.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
@@ -1,12 +1,6 @@
tcfail010.hs:3:17:
- No instance for (Num [t0])
- arising from a use of `+'
- The type variable `t0' is ambiguous
- Possible cause: the monomorphism restriction applied to the following:
- q :: [t0] -> [t0] (bound at tcfail010.hs:3:1)
- Probable fix: give these definition(s) an explicit type signature
- or use -XNoMonomorphismRestriction
+ No instance for (Num [t0]) arising from a use of `+'
Possible fix: add an instance declaration for (Num [t0])
In the expression: z + 2
In the expression: \ (y : z) -> z + 2
diff --git a/testsuite/tests/typecheck/should_fail/tcfail017.stderr b/testsuite/tests/typecheck/should_fail/tcfail017.stderr
index 4f09814afa..9ac3c7d64f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail017.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail017.stderr
@@ -4,7 +4,5 @@ tcfail017.hs:10:10:
arising from the superclasses of an instance declaration
from the context (B a)
bound by the instance declaration at tcfail017.hs:10:10-23
- Possible fix:
- add (C [a]) to the context of the instance declaration
- or add an instance declaration for (C [a])
+ Possible fix: add an instance declaration for (C [a])
In the instance declaration for `B [a]'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail018.stderr b/testsuite/tests/typecheck/should_fail/tcfail018.stderr
index 1aa13624e9..54df69888e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail018.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail018.stderr
@@ -1,12 +1,6 @@
tcfail018.hs:5:10:
- No instance for (Num [t0])
- arising from the literal `1'
- The type variable `t0' is ambiguous
- Possible cause: the monomorphism restriction applied to the following:
- a :: t0 (bound at tcfail018.hs:5:2)
- Probable fix: give these definition(s) an explicit type signature
- or use -XNoMonomorphismRestriction
+ No instance for (Num [t0]) arising from the literal `1'
Possible fix: add an instance declaration for (Num [t0])
In the expression: 1
In a pattern binding: (a : []) = 1
diff --git a/testsuite/tests/typecheck/should_fail/tcfail020.stderr b/testsuite/tests/typecheck/should_fail/tcfail020.stderr
index 3e0df9e42b..f15fd98084 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail020.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail020.stderr
@@ -4,7 +4,5 @@ tcfail020.hs:10:10:
arising from the superclasses of an instance declaration
from the context (A a)
bound by the instance declaration at tcfail020.hs:10:10-23
- Possible fix:
- add (A [a]) to the context of the instance declaration
- or add an instance declaration for (A [a])
+ Possible fix: add an instance declaration for (A [a])
In the instance declaration for `B [a]'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail040.stderr b/testsuite/tests/typecheck/should_fail/tcfail040.stderr
index cd5ef7a742..8ee305f03f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail040.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail040.stderr
@@ -1,9 +1,10 @@
tcfail040.hs:19:5:
- No instance for (ORD a0)
- arising from a use of `<<'
+ No instance for (ORD a0) arising from a use of `<<'
The type variable `a0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there is a potential instance available:
+ instance ORD (a -> b) -- Defined at tcfail040.hs:17:10
In the first argument of `(===)', namely `(<<)'
In the expression: (<<) === (<<)
In an equation for `f': f = (<<) === (<<)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail043.stderr b/testsuite/tests/typecheck/should_fail/tcfail043.stderr
index cf161d4af2..3e52e69c56 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail043.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail043.stderr
@@ -1,37 +1,40 @@
-
-tcfail043.hs:38:17:
- No instance for (Ord_ a0)
- arising from a use of `gt'
- The type variable `a0' is ambiguous
- Possible cause: the monomorphism restriction applied to the following:
- search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
- Probable fix: give these definition(s) an explicit type signature
- or use -XNoMonomorphismRestriction
- In the expression: gt (hd bs) a
- In the expression:
- if gt (hd bs) a then
- False
- else
- if eq a (hd bs) then True else search a (tl bs)
- In the expression:
- \ a bs
- -> if gt (hd bs) a then
- False
- else
- if eq a (hd bs) then True else search a (tl bs)
-
-tcfail043.hs:40:25:
- No instance for (Eq_ a0)
- arising from a use of `eq'
- The type variable `a0' is ambiguous
- Possible cause: the monomorphism restriction applied to the following:
- search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
- Probable fix: give these definition(s) an explicit type signature
- or use -XNoMonomorphismRestriction
- In the expression: eq a (hd bs)
- In the expression: if eq a (hd bs) then True else search a (tl bs)
- In the expression:
- if gt (hd bs) a then
- False
- else
- if eq a (hd bs) then True else search a (tl bs)
+
+tcfail043.hs:38:17:
+ No instance for (Ord_ a0) arising from a use of `gt'
+ The type variable `a0' is ambiguous
+ Possible cause: the monomorphism restriction applied to the following:
+ search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
+ Probable fix: give these definition(s) an explicit type signature
+ or use -XNoMonomorphismRestriction
+ Note: there is a potential instance available:
+ instance Ord_ Int -- Defined at tcfail043.hs:34:10
+ In the expression: gt (hd bs) a
+ In the expression:
+ if gt (hd bs) a then
+ False
+ else
+ if eq a (hd bs) then True else search a (tl bs)
+ In the expression:
+ \ a bs
+ -> if gt (hd bs) a then
+ False
+ else
+ if eq a (hd bs) then True else search a (tl bs)
+
+tcfail043.hs:40:25:
+ No instance for (Eq_ a0) arising from a use of `eq'
+ The type variable `a0' is ambiguous
+ Possible cause: the monomorphism restriction applied to the following:
+ search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
+ Probable fix: give these definition(s) an explicit type signature
+ or use -XNoMonomorphismRestriction
+ Note: there are several potential instances:
+ instance Eq_ a => Eq_ [a] -- Defined at tcfail043.hs:23:10
+ instance Eq_ Int -- Defined at tcfail043.hs:20:10
+ In the expression: eq a (hd bs)
+ In the expression: if eq a (hd bs) then True else search a (tl bs)
+ In the expression:
+ if gt (hd bs) a then
+ False
+ else
+ if eq a (hd bs) then True else search a (tl bs)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
index 6be6ef494b..9e47a0bebc 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail067.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
@@ -3,15 +3,19 @@ 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'
+ 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'
+ 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
@@ -30,12 +34,11 @@ tcfail067.hs:46:12:
= show value ++ " :" ++ show lower ++ ".." ++ show upper
tcfail067.hs:61:12:
- Could not deduce (Show a, Ord a)
- arising from a use of `numSubRangeNegate'
+ Could not deduce (Show a) arising from a use of `numSubRangeNegate'
from the context (Num a)
bound by the instance declaration at tcfail067.hs:60:10-34
Possible fix:
- add (Show a, Ord a) to the context of the instance declaration
+ add (Show a) to the context of the instance declaration
In the expression: numSubRangeNegate
In an equation for `negate': negate = numSubRangeNegate
In the instance declaration for `Num (SubRange a)'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
index 052083f237..a8b7bc0efb 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
@@ -1,11 +1,18 @@
tcfail072.hs:23:13:
- Could not deduce (Ord p0, Ord q0) arising from a use of `g'
+ Could not deduce (Ord p0)
+ arising from a use of `g'
from the context (Ord p, Ord q)
bound by the type signature for
g :: (Ord p, Ord q) => AB p q -> Bool
at tcfail072.hs:22:6-38
- The type variables `p0', `q0' are ambiguous
+ The type variable `p0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Ord () -- Defined in `GHC.Classes'
+ instance (Ord a, Ord b) => Ord (a, b) -- Defined in `GHC.Classes'
+ instance (Ord a, Ord b, Ord c) => Ord (a, b, c)
+ -- Defined in `GHC.Classes'
+ ...plus 23 others
In the expression: g A
In an equation for `g': g (B _ _) = g A
diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
index 541bb432fa..4c651bf7d4 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail102.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
@@ -8,11 +8,7 @@ tcfail102.hs:9:15:
bound by the type signature for
f :: Integral a => P (Ratio a) -> P (Ratio a)
at tcfail102.hs:8:6-45
- Possible fix:
- add (Integral (Ratio a)) to the context of
- the type signature for
- f :: Integral a => P (Ratio a) -> P (Ratio a)
- or add an instance declaration for (Integral (Ratio a))
+ Possible fix: add an instance declaration for (Integral (Ratio a))
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/tcfail125.stderr b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
index 988540dad5..addd093bff 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail125.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
@@ -1,9 +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: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'
+ 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/tcfail128.stderr b/testsuite/tests/typecheck/should_fail/tcfail128.stderr
index 90793cf7d0..0834cc2fbd 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail128.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail128.stderr
@@ -4,6 +4,9 @@ tcfail128.hs:18:16:
arising from a use of `thaw'
The type variable `b0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there is a potential instance available:
+ instance Data.Array.Base.MArray GHC.IOArray.IOArray e IO
+ -- Defined in `Data.Array.Base'
Possible fix:
add an instance declaration for
(Data.Array.Base.MArray b0 FlatVector IO)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
index fb506dd7d1..a0c2ca4ec0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
@@ -1,12 +1,18 @@
-tcfail133.hs:2:61:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+tcfail133.hs:2:61: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail133.hs:68:7:
No instance for (Show a0)
arising from a use of `show'
The type variable `a0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Show Zero -- Defined at tcfail133.hs:8:29
+ instance Show One -- Defined at tcfail133.hs:9:28
+ instance (Show a, Show b, Number a, Digit b) => Show (a :@ b)
+ -- Defined at tcfail133.hs:11:54
+ ...plus 27 others
In the expression: show
In the expression: show $ add (One :@ Zero) (One :@ One)
In an equation for `foo':
@@ -15,8 +21,6 @@ tcfail133.hs:68:7:
tcfail133.hs:68:14:
No instance for (AddDigit (Zero :@ (One :@ One)) One a0)
arising from a use of `add'
- The type variable `a0' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
Possible fix:
add an instance declaration for
(AddDigit (Zero :@ (One :@ One)) One a0)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.stderr b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
index 3fd20cc2f9..635a670495 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail142.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
@@ -2,8 +2,6 @@
tcfail142.hs:21:12:
No instance for (Bar a0 r0)
arising from a use of `bar'
- The type variables `a0', `r0' are ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
In the first argument of `foo', namely `bar'
In the expression: foo bar
In an equation for `test': test = foo bar
diff --git a/testsuite/tests/typecheck/should_fail/tcfail152.hs b/testsuite/tests/typecheck/should_fail/tcfail152.hs
index 3ebb6fe0f6..5b3ec3f789 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail152.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail152.hs
@@ -1,10 +1,10 @@
{-# LANGUAGE ExistentialQuantification #-}
-
--- This test made Hugs fail (Oct 05) because the constraint
--- from the 'toInteger' call escaped from the pattern match
-
-module ShouldFail where
-
-data T = forall a. C a
-
-test (C x) = toInteger x
+
+-- This test made Hugs fail (Oct 05) because the constraint
+-- from the 'toInteger' call escaped from the pattern match
+
+module ShouldFail where
+
+data T = forall a. C a
+
+test (C x) = toInteger x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail152.stderr b/testsuite/tests/typecheck/should_fail/tcfail152.stderr
index 5ae2f52f00..24a872c9ee 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail152.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail152.stderr
@@ -1,6 +1,7 @@
tcfail152.hs:10:14:
- No instance for (Integral a)
- arising from a use of `toInteger'
+ No instance for (Integral a) arising from a use of `toInteger'
+ Possible fix:
+ add (Integral a) to the context of the data constructor `C'
In the expression: toInteger x
In an equation for `test': test (C x) = toInteger x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail171.stderr b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
index 714edb1f12..79ed5f80b7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail171.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
@@ -1,6 +1,8 @@
tcfail171.hs:9:10:
- No instances for (PrintfArg a, PrintfType b)
- arising from a use of `printf'
+ No instance for (PrintfArg a) arising from a use of `printf'
+ Possible fix:
+ add (PrintfArg a) 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/tcfail181.stderr b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
index 25e6cbf2af..0e00427aa5 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail181.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
@@ -4,6 +4,10 @@ tcfail181.hs:17:9:
arising from a use of `foo'
The type variable `m0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Monad ((->) r) -- Defined in `GHC.Base'
+ instance Monad IO -- Defined in `GHC.Base'
+ instance Monad [] -- Defined in `GHC.Base'
In the expression: foo
In the expression: foo {bar = return True}
In an equation for `wog': wog x = foo {bar = return True}
diff --git a/testsuite/tests/typecheck/should_fail/tcfail194.stderr b/testsuite/tests/typecheck/should_fail/tcfail194.stderr
index c206bd51f3..34cf179439 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail194.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail194.stderr
@@ -4,6 +4,11 @@ tcfail194.hs:9:15:
arising from the arithmetic sequence `1 .. 10'
The type variable `t0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Enum Double -- Defined in `GHC.Float'
+ instance Enum Float -- Defined in `GHC.Float'
+ instance Enum () -- Defined in `GHC.Enum'
+ ...plus five others
In the expression: [1 .. 10]
In a stmt of a list comprehension: x <- [1 .. 10]
In a stmt of a list comprehension: then take 5 by x
@@ -13,6 +18,11 @@ tcfail194.hs:9:16:
arising from the literal `1'
The type variable `t0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
In the expression: 1
In the expression: [1 .. 10]
In a stmt of a list comprehension: x <- [1 .. 10]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail208.stderr b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
index 0a4ce1cd4d..d606115ad1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail208.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
@@ -5,9 +5,6 @@ tcfail208.hs:4:19:
bound by the type signature for
f :: (Monad m, Eq a) => a -> m a -> Bool
at tcfail208.hs:3:6-40
- Possible fix:
- add (Eq (m a)) to the context of
- the type signature for f :: (Monad m, Eq a) => a -> m a -> Bool
- or add an instance declaration for (Eq (m a))
+ Possible fix: add an instance declaration for (Eq (m a))
In the expression: (return x == y)
In an equation for `f': f x y = (return x == y)