summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail043.stderr
blob: c30b5bf8545d4948cb6245e40de6fd79436dde3e (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

tcfail043.hs:38:17: error:
    Ambiguous type variable ‘a0’ arising from a use of ‘gt’
    prevents the constraint ‘(Ord_ a0)’ from being solved.
    Relevant bindings include
      bs :: [a0] (bound at tcfail043.hs:38:8)
      a :: a0 (bound at tcfail043.hs:38:6)
      search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
    Probable fix: use a type annotation to specify what ‘a0’ should be.
    These potential instance exist:
      instance Ord_ Int -- Defined at tcfail043.hs:34:10
    In the expression: gt (hd bs) a
    In the expression:
      if gt (hd bs) a then
          False
      else
          if eq a (hd bs) then True else search a (tl bs)
    In the expression:
      \ a bs
        -> if gt (hd bs) a then
               False
           else
               if eq a (hd bs) then True else search a (tl bs)

tcfail043.hs:40:25: error:
    Ambiguous type variable ‘a0’ arising from a use of ‘eq’
    prevents the constraint ‘(Eq_ a0)’ from being solved.
    Relevant bindings include
      bs :: [a0] (bound at tcfail043.hs:38:8)
      a :: a0 (bound at tcfail043.hs:38:6)
      search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
    Probable fix: use a type annotation to specify what ‘a0’ should be.
    These potential instances exist:
      instance Eq_ Int -- Defined at tcfail043.hs:20:10
      instance Eq_ a => Eq_ [a] -- Defined at tcfail043.hs:23:10
    In the expression: eq a (hd bs)
    In the expression: if eq a (hd bs) then True else search a (tl bs)
    In the expression:
      if gt (hd bs) a then
          False
      else
          if eq a (hd bs) then True else search a (tl bs)