summaryrefslogtreecommitdiff
path: root/testsuite/tests/ado/T13242a.stderr
blob: dc4564f168770a5a2890c1f04a4cbc9fabf173eb (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

T13242a.hs:10:5: error:
    • Couldn't match expected type ‘a0’ with actual type ‘a’
        because type variable ‘a’ would escape its scope
      This (rigid, skolem) type variable is bound by
        a pattern with constructor: A :: forall a. Eq a => a -> T,
        in a pattern binding in
             'do' block
        at T13242a.hs:10:3-5
    • In the expression:
        do A x <- undefined
           _ <- return 'a'
           _ <- return 'b'
           return (x == x)
      In an equation for ‘test’:
          test
            = do A x <- undefined
                 _ <- return 'a'
                 _ <- return 'b'
                 return (x == x)
    • Relevant bindings include x :: a (bound at T13242a.hs:10:5)

T13242a.hs:13:11: error:
    • Ambiguous type variable ‘a0’ arising from a use of ‘==’
      prevents the constraint ‘(Eq a0)’ from being solved.
      Relevant bindings include x :: a0 (bound at T13242a.hs:10:5)
      Probable fix: use a type annotation to specify what ‘a0’ should be.
      These potential instances exist:
        instance Eq Ordering -- Defined in ‘GHC.Classes’
        instance Eq Integer
          -- Defined in ‘integer-gmp-1.0.0.1:GHC.Integer.Type’
        instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Base’
        ...plus 22 others
        ...plus five instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In a stmt of a 'do' block: return (x == x)
      In the expression:
        do A x <- undefined
           _ <- return 'a'
           _ <- return 'b'
           return (x == x)
      In an equation for ‘test’:
          test
            = do A x <- undefined
                 _ <- return 'a'
                 _ <- return 'b'
                 return (x == x)