NoMatchErr.hs:20:12: Could not deduce (Memo d0 ~ Memo d) from the context (Fun d) bound by the type signature for f :: Fun d => Memo d a -> Memo d a at NoMatchErr.hs:20:1-15 NB: `Memo' is a type function, and may not be injective Expected type: Memo d a Actual type: Memo d0 a Expected type: Memo d a -> d0 -> a Actual type: Memo d0 a -> d0 -> a In the second argument of `(.)', namely `appl' In the expression: abst . appl