summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T13651.stderr
blob: a64d36e6ca8b42e1313ffc2c39fae6fa4a1d370f (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:12:8: error: [GHC-25897]
    • Could not deduce ‘cr ~ Bar h (Foo r)’
      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:(12,8)-(14,65)
      ‘cr’ is a rigid type variable 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:(12,8)-(14,65)
    • 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)