E.g., is there something we can do, like (Recursive t f, PatternMonoid f) => Monoid t (where PatternMonoid is the missing piece), and similarly for other type classes.
We have (or maybe used to have?) things like this for Functor and Foldable, but should try to expand it as much as possible. I think I remember seeing some instances like this in the Haskell world (perhaps in @pa-ba /compdata).
E.g., is there something we can do, like
(Recursive t f, PatternMonoid f) => Monoid t
(wherePatternMonoid
is the missing piece), and similarly for other type classes.We have (or maybe used to have?) things like this for
Functor
andFoldable
, but should try to expand it as much as possible. I think I remember seeing some instances like this in the Haskell world (perhaps in @pa-ba /compdata).