Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
b2fb5b96
Commit
b2fb5b96
authored
Mar 09, 2012
by
Simon Peyton Jones
Browse files
Raft of wibbles after refactoring type-class constraint errors
...in response to Trac
#5858
parent
a56ce4f7
Changes
42
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/annotations/should_fail/annfail08.stderr
View file @
b2fb5b96
...
...
@@ -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) #-}
testsuite/tests/annotations/should_fail/annfail10.stderr
View file @
b2fb5b96
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 #-}
testsuite/tests/deriving/should_fail/T5287.stderr
View file @
b2fb5b96
...
...
@@ -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
...
...
testsuite/tests/deriving/should_fail/drvfail011.stderr
View file @
b2fb5b96
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 `=='
...
...
testsuite/tests/driver/T5147/T5147.stderr
View file @
b2fb5b96
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
testsuite/tests/ghci.debugger/scripts/break003.stderr
View file @
b2fb5b96
<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
testsuite/tests/ghci.debugger/scripts/break006.stderr
View file @
b2fb5b96
<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
testsuite/tests/ghci.debugger/scripts/print019.stderr
View file @
b2fb5b96
<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
testsuite/tests/ghci/scripts/Defer02.stderr
View file @
b2fb5b96
...
...
@@ -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
...
...
testsuite/tests/ghci/scripts/Defer02.stdout
View file @
b2fb5b96
...
...
@@ -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)
...
...
testsuite/tests/indexed-types/should_fail/T4485.stderr
View file @
b2fb5b96
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")
testsuite/tests/rebindable/rebindable6.stderr
View file @
b2fb5b96
...
...
@@ -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:
...
...
testsuite/tests/safeHaskell/ghci/p15.stderr
View file @
b2fb5b96
...
...
@@ -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
...
...
testsuite/tests/simplCore/should_compile/T3772.stdout
View file @
b2fb5b96
==================== Tidy Core ====================
Result size = 26
Result size = 26
Rec {
xs :: GHC.Prim.Int# -> ()
...
...
testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
View file @
b2fb5b96
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]
testsuite/tests/typecheck/should_fail/IPFail.stderr
View file @
b2fb5b96
...
...
@@ -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
testsuite/tests/typecheck/should_fail/T2846b.stderr
View file @
b2fb5b96
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])
testsuite/tests/typecheck/should_fail/T3592.stderr
View file @
b2fb5b96
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
testsuite/tests/typecheck/should_fail/mc22.stderr
View file @
b2fb5b96
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:
...
...
testsuite/tests/typecheck/should_fail/mc23.stderr
View file @
b2fb5b96
...
...
@@ -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]
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment