[Haskell-cafe] Clearly, Haskell is ill-founded

Andrew Coppin andrewcoppin at btinternet.com
Tue Jul 10 16:22:02 EDT 2007

Dan Piponi wrote:
> (I got lost somewhere with the levels of quotation there...)
> It's more specific than this. Coalgebra, cohomology, codata, comonads
> and so on derive their name from the fact that they can be described
> using category theory. In category theory you draw lots of diagrams
> with arrows in them. When you flip all the arrows round you get a
> description of something else. Pairs of concepts connected in this way
> often differ by the prefix "co-". Often theorems you prove about
> objects have analogous theorems about the respective co-objects. In
> fact, often the proof is the same, just written with all the arrows
> pointing the other way.
> This carries over to Haskell too. You can sometimes write functional
> (as in useful) code simply by taking an already existing piece of code
> and figuring out what flipping the arrows means. It often means
> something very different, but it still makes sense. A really cool
> example is the relationship between fold and unfold. But I'll leave
> that for someone else.

Sounds a lot like the Boolean duality principle. (If a statement works 
one way, if you flip all the true/false and/or stuff, you get a brand 
new statement, which also works.)

More information about the Haskell-Cafe mailing list