
A foldable of a foldable is itself foldable. That fact is expressed in Control.Compose: https://hackage.haskell.org/package/TypeCompose-0.9.10/docs/Control-Compose.... instance (Foldable g, Foldable f, Functor g) => Foldable (:. g f) On 03/01/15 01:14, Julian Birch wrote:
Apologies if this isn't clear, I suspect if I understood the terminology better I'd already have solved the problem. I've got a foldable of a foldable of a. (Specifically `[Set a]`) and I want to be able to express the concept that I can treat `(Foldable f1, Foldable f2) => f1 (f2 a)` as `f3 a` i.e. a foldable of a foldable of a can be newtyped to a foldable of a. At least, I think that's right.
Sadly, my attempts at actually expressing this concept have met with incomprehension from GHC, could someone help me out, please?
Thanks,
Julian.
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners