2 tcfail043.hs:38:17: error:
3 Ambiguous type variable ‘a0’ arising from a use of ‘gt’
4 prevents the constraint ‘(Ord_ a0)’ from being solved.
5 Relevant bindings include
6 bs :: [a0] (bound at tcfail043.hs:38:8)
7 a :: a0 (bound at tcfail043.hs:38:6)
8 search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
9 Probable fix: use a type annotation to specify what ‘a0’ should be.
10 These potential instance exist:
11 instance Ord_ Int -- Defined at tcfail043.hs:34:10
12 In the expression: gt (hd bs) a
17 if eq a (hd bs) then True else search a (tl bs)
20 -> if gt (hd bs) a then
23 if eq a (hd bs) then True else search a (tl bs)
25 tcfail043.hs:40:25: error:
26 Ambiguous type variable ‘a0’ arising from a use of ‘eq’
27 prevents the constraint ‘(Eq_ a0)’ from being solved.
28 Relevant bindings include
29 bs :: [a0] (bound at tcfail043.hs:38:8)
30 a :: a0 (bound at tcfail043.hs:38:6)
31 search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
32 Probable fix: use a type annotation to specify what ‘a0’ should be.
33 These potential instances exist:
34 instance Eq_ Int -- Defined at tcfail043.hs:20:10
35 instance Eq_ a => Eq_ [a] -- Defined at tcfail043.hs:23:10
36 In the expression: eq a (hd bs)
37 In the expression: if eq a (hd bs) then True else search a (tl bs)
42 if eq a (hd bs) then True else search a (tl bs)