blob: f3ccc3df175e2797ebc0f0d0683270d91919665f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
overloadedlistsfail01.hs:5:8: error:
• Ambiguous type variable ‘a0’ arising from a use of ‘print’
prevents the constraint ‘(Show a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
Potentially matching instances:
instance Show Ordering -- Defined in ‘GHC.Show’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
...plus 25 others
...plus 14 instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: print [1]
In an equation for ‘main’: main = print [1]
overloadedlistsfail01.hs:5:14: error:
• Ambiguous type variable ‘a0’ arising from an overloaded list
prevents the constraint ‘(GHC.IsList.IsList a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
Potentially matching instance:
instance GHC.IsList.IsList [a] -- Defined in ‘GHC.IsList’
...plus four instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the first argument of ‘print’, namely ‘[1]’
In the expression: print [1]
In an equation for ‘main’: main = print [1]
overloadedlistsfail01.hs:5:15: error:
• Ambiguous type variable ‘a0’ arising from the literal ‘1’
prevents the constraint ‘(Num
(GHC.IsList.Item a0))’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
Potentially matching instances:
instance Num Integer -- Defined in ‘GHC.Num’
instance Num Double -- Defined in ‘GHC.Float’
...plus three others
...plus one instance involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: 1
In the first argument of ‘print’, namely ‘[1]’
In the expression: print [1]
|