T2494.hs:15:14: error: • Couldn't match type ‘b’ with ‘a’ Expected: Maybe (m a) -> Maybe (m a) Actual: Maybe (m b) -> Maybe (m b) ‘b’ is a rigid type variable bound by the RULE "foo/foo" at T2494.hs:(12,1)-(15,33) ‘a’ is a rigid type variable bound by the RULE "foo/foo" at T2494.hs:(12,1)-(15,33) • In the first argument of ‘foo’, namely ‘g’ In the second argument of ‘foo’, namely ‘(foo g x)’ In the expression: foo f (foo g x) • Relevant bindings include f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a) (bound at T2494.hs:13:11) g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b) (bound at T2494.hs:14:11) x :: Maybe a (bound at T2494.hs:14:65) T2494.hs:15:30: error: • Couldn't match type ‘b’ with ‘a’ Expected: Maybe (m a) -> Maybe (m a) Actual: Maybe (m b) -> Maybe (m b) ‘b’ is a rigid type variable bound by the RULE "foo/foo" at T2494.hs:(12,1)-(15,33) ‘a’ is a rigid type variable bound by the RULE "foo/foo" at T2494.hs:(12,1)-(15,33) • In the second argument of ‘(.)’, namely ‘g’ In the first argument of ‘foo’, namely ‘(f . g)’ In the expression: foo (f . g) x • Relevant bindings include f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a) (bound at T2494.hs:13:11) g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b) (bound at T2494.hs:14:11) x :: Maybe a (bound at T2494.hs:14:65)