Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,323
Issues
4,323
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
363
Merge Requests
363
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
b2fb5b96
Commit
b2fb5b96
authored
Mar 09, 2012
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
42 changed files
with
288 additions
and
225 deletions
+288
-225
testsuite/tests/annotations/should_fail/annfail08.stderr
testsuite/tests/annotations/should_fail/annfail08.stderr
+1
-6
testsuite/tests/annotations/should_fail/annfail10.stderr
testsuite/tests/annotations/should_fail/annfail10.stderr
+16
-4
testsuite/tests/deriving/should_fail/T5287.stderr
testsuite/tests/deriving/should_fail/T5287.stderr
+0
-2
testsuite/tests/deriving/should_fail/drvfail011.stderr
testsuite/tests/deriving/should_fail/drvfail011.stderr
+2
-2
testsuite/tests/driver/T5147/T5147.stderr
testsuite/tests/driver/T5147/T5147.stderr
+1
-2
testsuite/tests/ghci.debugger/scripts/break003.stderr
testsuite/tests/ghci.debugger/scripts/break003.stderr
+1
-4
testsuite/tests/ghci.debugger/scripts/break006.stderr
testsuite/tests/ghci.debugger/scripts/break006.stderr
+12
-4
testsuite/tests/ghci.debugger/scripts/print019.stderr
testsuite/tests/ghci.debugger/scripts/print019.stderr
+6
-2
testsuite/tests/ghci/scripts/Defer02.stderr
testsuite/tests/ghci/scripts/Defer02.stderr
+9
-10
testsuite/tests/ghci/scripts/Defer02.stdout
testsuite/tests/ghci/scripts/Defer02.stdout
+3
-8
testsuite/tests/indexed-types/should_fail/T4485.stderr
testsuite/tests/indexed-types/should_fail/T4485.stderr
+31
-29
testsuite/tests/rebindable/rebindable6.stderr
testsuite/tests/rebindable/rebindable6.stderr
+11
-5
testsuite/tests/safeHaskell/ghci/p15.stderr
testsuite/tests/safeHaskell/ghci/p15.stderr
+1
-2
testsuite/tests/simplCore/should_compile/T3772.stdout
testsuite/tests/simplCore/should_compile/T3772.stdout
+1
-1
testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
...ts/typecheck/should_fail/FailDueToGivenOverlapping.stderr
+3
-4
testsuite/tests/typecheck/should_fail/IPFail.stderr
testsuite/tests/typecheck/should_fail/IPFail.stderr
+1
-4
testsuite/tests/typecheck/should_fail/T2846b.stderr
testsuite/tests/typecheck/should_fail/T2846b.stderr
+1
-4
testsuite/tests/typecheck/should_fail/T3592.stderr
testsuite/tests/typecheck/should_fail/T3592.stderr
+14
-13
testsuite/tests/typecheck/should_fail/mc22.stderr
testsuite/tests/typecheck/should_fail/mc22.stderr
+7
-6
testsuite/tests/typecheck/should_fail/mc23.stderr
testsuite/tests/typecheck/should_fail/mc23.stderr
+15
-2
testsuite/tests/typecheck/should_fail/mc24.stderr
testsuite/tests/typecheck/should_fail/mc24.stderr
+15
-2
testsuite/tests/typecheck/should_fail/mc25.stderr
testsuite/tests/typecheck/should_fail/mc25.stderr
+17
-4
testsuite/tests/typecheck/should_fail/tcfail008.stderr
testsuite/tests/typecheck/should_fail/tcfail008.stderr
+5
-5
testsuite/tests/typecheck/should_fail/tcfail010.stderr
testsuite/tests/typecheck/should_fail/tcfail010.stderr
+1
-7
testsuite/tests/typecheck/should_fail/tcfail017.stderr
testsuite/tests/typecheck/should_fail/tcfail017.stderr
+1
-3
testsuite/tests/typecheck/should_fail/tcfail018.stderr
testsuite/tests/typecheck/should_fail/tcfail018.stderr
+1
-7
testsuite/tests/typecheck/should_fail/tcfail020.stderr
testsuite/tests/typecheck/should_fail/tcfail020.stderr
+1
-3
testsuite/tests/typecheck/should_fail/tcfail040.stderr
testsuite/tests/typecheck/should_fail/tcfail040.stderr
+3
-2
testsuite/tests/typecheck/should_fail/tcfail043.stderr
testsuite/tests/typecheck/should_fail/tcfail043.stderr
+40
-37
testsuite/tests/typecheck/should_fail/tcfail067.stderr
testsuite/tests/typecheck/should_fail/tcfail067.stderr
+10
-7
testsuite/tests/typecheck/should_fail/tcfail072.stderr
testsuite/tests/typecheck/should_fail/tcfail072.stderr
+9
-2
testsuite/tests/typecheck/should_fail/tcfail102.stderr
testsuite/tests/typecheck/should_fail/tcfail102.stderr
+1
-5
testsuite/tests/typecheck/should_fail/tcfail125.stderr
testsuite/tests/typecheck/should_fail/tcfail125.stderr
+6
-4
testsuite/tests/typecheck/should_fail/tcfail128.stderr
testsuite/tests/typecheck/should_fail/tcfail128.stderr
+3
-0
testsuite/tests/typecheck/should_fail/tcfail133.stderr
testsuite/tests/typecheck/should_fail/tcfail133.stderr
+8
-4
testsuite/tests/typecheck/should_fail/tcfail142.stderr
testsuite/tests/typecheck/should_fail/tcfail142.stderr
+0
-2
testsuite/tests/typecheck/should_fail/tcfail152.hs
testsuite/tests/typecheck/should_fail/tcfail152.hs
+9
-9
testsuite/tests/typecheck/should_fail/tcfail152.stderr
testsuite/tests/typecheck/should_fail/tcfail152.stderr
+3
-2
testsuite/tests/typecheck/should_fail/tcfail171.stderr
testsuite/tests/typecheck/should_fail/tcfail171.stderr
+4
-2
testsuite/tests/typecheck/should_fail/tcfail181.stderr
testsuite/tests/typecheck/should_fail/tcfail181.stderr
+4
-0
testsuite/tests/typecheck/should_fail/tcfail194.stderr
testsuite/tests/typecheck/should_fail/tcfail194.stderr
+10
-0
testsuite/tests/typecheck/should_fail/tcfail208.stderr
testsuite/tests/typecheck/should_fail/tcfail208.stderr
+1
-4
No files found.
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]
...
...
testsuite/tests/typecheck/should_fail/mc24.stderr
View file @
b2fb5b96
...
...
@@ -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]
...
...
testsuite/tests/typecheck/should_fail/mc25.stderr
View file @
b2fb5b96
...
...
@@ -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]
...
...
testsuite/tests/typecheck/should_fail/tcfail008.stderr
View file @
b2fb5b96
...
...
@@ -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
...
...
testsuite/tests/typecheck/should_fail/tcfail010.stderr
View file @
b2fb5b96
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
...
...
testsuite/tests/typecheck/should_fail/tcfail017.stderr
View file @
b2fb5b96
...
...
@@ -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]'
testsuite/tests/typecheck/should_fail/tcfail018.stderr
View file @
b2fb5b96
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
testsuite/tests/typecheck/should_fail/tcfail020.stderr
View file @
b2fb5b96
...
...
@@ -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]'
testsuite/tests/typecheck/should_fail/tcfail040.stderr
View file @
b2fb5b96
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 = (<<) === (<<)
testsuite/tests/typecheck/should_fail/tcfail043.stderr
View file @
b2fb5b96
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