[Haskell-cafe] Haskell-Cafe Digest, Vol 106, Issue 38

Richard O'Keefe ok at cs.otago.ac.nz
Wed Jun 27 03:15:58 CEST 2012

On 27/06/2012, at 12:51 PM, John Lato wrote:
> data Tree a = Leaf a | Branch (Tree a) ( Tree a)
>  deriving (Foldable, Show)

While I am familiar with deriving (Show),
I am not familiar with deriving (Foldable),
which looks rather useful.

just says "With -XDeriveFoldable, you can derive instances of the
class Foldable, defined in Data.Foldable." but it provides no details.

Would you care to explain more about deriving (Foldable)?

More information about the Haskell-Cafe mailing list