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

AmbigFDs.hs:10:8: error: [GHC-25897]
    • Couldn't match type ‘b2’ with ‘b1’
        arising from a functional dependency between constraints:
          ‘C a b1’
            arising from a type ambiguity check for
            the type signature for ‘foo’ at AmbigFDs.hs:10:8-35
          ‘C a b2’
            arising from the type signature for:
                           foo :: forall a b1 b2.
                                  (C a b1, C a b2) =>
                                  a -> Int at AmbigFDs.hs:10:8-35
      ‘b2’ is a rigid type variable bound by
        the type signature for:
          foo :: forall a b1 b2. (C a b1, C a b2) => a -> Int
        at AmbigFDs.hs:10:8-35
      ‘b1’ is a rigid type variable bound by
        the type signature for:
          foo :: forall a b1 b2. (C a b1, C a b2) => a -> Int
        at AmbigFDs.hs:10:8-35
    • In the ambiguity check for ‘foo’
      To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
      In the type signature: foo :: (C a b1, C a b2) => a -> Int