blob: 7aa78d56a9369a99ea2241ef1a2e1de9956ea88b (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
T14273.hs:7:27: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Could not deduce (Show a1) arising from a use of ‘show’
from the context: Show a
bound by the type signature for:
pleaseShow :: forall a. Show a => Bool -> a -> Maybe String
at T14273.hs:5:1-49
The type variable ‘a1’ is ambiguous
These potential instances exist:
instance (Show a, Show b) => Show (Either a b)
-- Defined in ‘Data.Either’
instance Show Ordering -- Defined in ‘GHC.Show’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
...plus N others
...plus N instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the first argument of ‘Just’, namely ‘(show _a)’
In the expression: Just (show _a)
In an equation for ‘pleaseShow’: pleaseShow True a = Just (show _a)
T14273.hs:7:32: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _a :: a1
Where: ‘a1’ is an ambiguous type variable
Or perhaps ‘_a’ is mis-spelled, or not in scope
• In the first argument of ‘show’, namely ‘_a’
In the first argument of ‘Just’, namely ‘(show _a)’
In the expression: Just (show _a)
• Relevant bindings include
a :: a (bound at T14273.hs:7:17)
pleaseShow :: Bool -> a -> Maybe String (bound at T14273.hs:6:1)
Constraints include Show a (from T14273.hs:5:1-49)
Valid hole fits include
a :: a (bound at T14273.hs:7:17)
k :: String (bound at T14273.hs:10:1)
otherwise :: Bool
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Base’))
False :: Bool
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
True :: Bool
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
LT :: Ordering
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
EQ :: Ordering
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
GT :: Ordering
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
() :: () (bound at <wired into compiler>)
pi :: forall a. Floating a => a
with pi @Double
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Float’))
T14273.hs:13:10: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Ambiguous type variable ‘a0’ arising from a use of ‘show’
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 (Show a, Show b) => Show (Either a b)
-- Defined in ‘Data.Either’
instance Show Ordering -- Defined in ‘GHC.Show’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
...plus N others
...plus N instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: show (_h ++ [])
In an equation for ‘foo’: foo xs = show (_h ++ [])
T14273.hs:13:16: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _h :: [a0]
Where: ‘a0’ is an ambiguous type variable
Or perhaps ‘_h’ is mis-spelled, or not in scope
• In the first argument of ‘(++)’, namely ‘_h’
In the first argument of ‘show’, namely ‘(_h ++ [])’
In the expression: show (_h ++ [])
• Relevant bindings include
xs :: [a] (bound at T14273.hs:13:5)
foo :: [a] -> String (bound at T14273.hs:13:1)
Valid hole fits include k :: String (defined at T14273.hs:10:1)
|