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

FD2.hs:26:34: error: [GHC-25897]
    • Couldn't match expected type ‘e1’ with actual type ‘e’
      ‘e1’ is a rigid type variable bound by
        the type signature for:
          mf :: forall e1. Elem a e1 => e1 -> Maybe e1 -> Maybe e1
        at FD2.hs:24:12-54
      ‘e’ is a rigid type variable bound by
        the type signature for:
          foldr1 :: forall e. Elem a e => (e -> e -> e) -> a -> e
        at FD2.hs:21:13-47
    • In the first argument of ‘Just’, namely ‘(f x y)’
      In the expression: Just (f x y)
      In an equation for ‘mf’: mf x (Just y) = Just (f x y)
    • Relevant bindings include
        y :: e1 (bound at FD2.hs:26:23)
        x :: e1 (bound at FD2.hs:26:15)
        mf :: e1 -> Maybe e1 -> Maybe e1 (bound at FD2.hs:25:12)
        f :: e -> e -> e (bound at FD2.hs:22:10)
        foldr1 :: (e -> e -> e) -> a -> e (bound at FD2.hs:22:3)