[Haskell-cafe] Re: Church Encoding Function

Stefan Monnier monnier at iro.umontreal.ca
Sat Mar 10 14:52:08 EST 2007

> I'm pretty sure you can define a catamorphism for any regular algebraic
> data type.

Actually, so-called negative occurrences in (regular) data types cause
problems.  Try to define the catamorphism of

    data Exp = Num Int | Lam (Exp -> Exp) | App Exp Exp

to see the problem,


More information about the Haskell-Cafe mailing list