summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T13651.stderr
blob: 150291c210533aefda87221bdaf9559123be3c78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

T13651.hs:11:8: error:
    • Could not deduce: F cr (Bar (Foo h) (Foo u)) ~ Bar h (Bar r u)
      from the context: (F cr cu ~ Bar h (Bar r u),
                         F cu cs ~ Bar (Foo h) (Bar u s))
        bound by the type signature for:
                   foo :: forall cr cu h r u cs s.
                          (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) =>
                          Bar h (Bar r u) -> Bar (Foo h) (Bar u s) -> Foo (cr -> cs)
        at T13651.hs:(11,8)-(13,65)
      Expected: forall cr cu h r u cs s.
                (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) =>
                Bar h (Bar r u) -> Bar (Foo h) (Bar u s) -> Foo (cr -> cs)
        Actual: forall cr cu h r u cs s.
                (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) =>
                Bar h (Bar r u) -> Bar (Foo h) (Bar u s) -> Foo (cr -> cs)
    • In the ambiguity check for ‘foo’
      To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
      In the type signature:
        foo :: (F cr cu ~ Bar h (Bar r u),
                F cu cs ~ Bar (Foo h) (Bar u s)) =>
               Bar h (Bar r u) -> Bar (Foo h) (Bar u s) -> Foo (cr -> cs)