haskell,graph,typeclass,contract,foldable

There are currently very few Foldable laws, so you can do all sorts of things. In fact, there are several different Foldable instances you could write, corresponding to different traversal orders. The Foldable laws describe relationships among the different Foldable members and, if the type is also a Functor, an...

haskell,types,monoids,type-variables,foldable

I found that this typechecks: {-# LANGUAGE RankNTypes #-} module FoldableTA where import Control.Category import Prelude hiding (id, (.)) class FoldableTA fm where foldMapTA :: Category h => (forall b c . a b c -> h b c) -> fm a b d -> h b d foldrTA ::...