blob: dbc250d7949c350662ac008d88788d8d38a00ee4 (
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
|
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.
These potential instances exist:
instance [safe] Show Version -- Defined in ‘Data.Version’
instance Show Module -- Defined in ‘GHC.Show’
instance Show Ordering -- Defined in ‘GHC.Show’
...plus 26 others
(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 ‘(IsList a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance IsList Version -- Defined in ‘GHC.Exts’
instance IsList [a] -- Defined in ‘GHC.Exts’
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 (Item a0))’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance Num Integer -- Defined in ‘GHC.Num’
instance Num Double -- Defined in ‘GHC.Float’
instance Num Float -- Defined in ‘GHC.Float’
...plus two others
(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]
|