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

T15883e.hs:16:1: error:
    • Ambiguous type variable ‘d0’ arising from a use of ‘k’
      prevents the constraint ‘(Data d0)’ from being solved.
      Probable fix: use a type annotation to specify what ‘d0’ should be.
      Potentially matching instances:
        instance (Data a, Data b) => Data (Either a b)
          -- Defined in ‘Data.Data’
        instance Data a => Data (Down a) -- Defined in ‘Data.Data’
        ...plus 21 others
        ...plus 48 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the expression: z (\ a1 -> MkFoo a1) `k` a1
      In an equation for ‘Data.Data.gfoldl’:
          Data.Data.gfoldl k z (MkFoo a1) = (z (\ a1 -> MkFoo a1) `k` a1)
      When typechecking the code for ‘Data.Data.gfoldl’
        in a derived instance for ‘Data (Foo LiftedRep)’:
        To see the code I am typechecking, use -ddump-deriv
      In the instance declaration for ‘Data (Foo LiftedRep)’

T15883e.hs:16:1: error:
    • Couldn't match expected type ‘a’ with actual type ‘d0’
        because type variable ‘a’ would escape its scope
      This (rigid, skolem) type variable is bound by
        a type expected by the context:
          forall a. a
        at T15883e.hs:16:1-52
    • In the first argument of ‘MkFoo’, namely ‘a1’
      In the expression: MkFoo a1
      In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’
      When typechecking the code for ‘Data.Data.gfoldl’
        in a derived instance for ‘Data (Foo LiftedRep)’:
        To see the code I am typechecking, use -ddump-deriv
    • Relevant bindings include a1 :: d0 (bound at T15883e.hs:16:1)

T15883e.hs:16:1: error:
    • Ambiguous type variable ‘b0’ arising from a use of ‘k’
      prevents the constraint ‘(Data b0)’ from being solved.
      Probable fix: use a type annotation to specify what ‘b0’ should be.
      Potentially matching instances:
        instance (Data a, Data b) => Data (Either a b)
          -- Defined in ‘Data.Data’
        instance Data a => Data (Down a) -- Defined in ‘Data.Data’
        ...plus 21 others
        ...plus 48 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the expression: k (z (\ a1 -> MkFoo a1))
      In an equation for ‘Data.Data.gunfold’:
          Data.Data.gunfold k z _ = k (z (\ a1 -> MkFoo a1))
      When typechecking the code for ‘Data.Data.gunfold’
        in a derived instance for ‘Data (Foo LiftedRep)’:
        To see the code I am typechecking, use -ddump-deriv
      In the instance declaration for ‘Data (Foo LiftedRep)’

T15883e.hs:16:1: error:
    • Couldn't match expected type ‘a’ with actual type ‘b0’
        because type variable ‘a’ would escape its scope
      This (rigid, skolem) type variable is bound by
        a type expected by the context:
          forall a. a
        at T15883e.hs:16:1-52
    • In the first argument of ‘MkFoo’, namely ‘a1’
      In the expression: MkFoo a1
      In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’
      When typechecking the code for ‘Data.Data.gunfold’
        in a derived instance for ‘Data (Foo LiftedRep)’:
        To see the code I am typechecking, use -ddump-deriv
    • Relevant bindings include a1 :: b0 (bound at T15883e.hs:16:1)