[Haskell-cafe] Re: about Haskell code written to be "too smart"
wren ng thornton
wren at freegeek.org
Thu Mar 26 20:40:50 EDT 2009
John Lato wrote:
> > From: wren ng thornton <wren at freegeek.org>
> > Dan Weston wrote:
> > > So to be clear with the terminology:
> > >
> > > inductive = good consumer?
> > > coinductive = good producer?
> > >
> > > So fusion should be possible (automatically? or do I need a GHC rule?) with
> > > inductive . coinductive
> > >
> > > Or have I bungled it?
> > Not quite. Induction means starting from base cases and building things
> > upwards from those. Coinduction is the dual and can be thought of as
> > starting from the ceiling and building your way downwards (until you hit
> > the base cases, or possibly forever).
> ( quite a lot of text trimmed for brevity)
> Wren, thank you for contributing this post. Coming from the point of
> view of someone who doesn't grok it all yet, this is the best
> commentary I've read on deforestation/fusion, and in fact is helpful
> for category theory newbies as well (at least I found it so). It
> really should go on a wiki somewhere.
If you haven't read Rewriting Haskell Strings yet, it's an excellent
paper. There are a number of other canonical fusion papers, but RHS has
the best introduction I've seen and it goes into both the build/fold and
unfold/destroy styles. It doesn't have much on the category theory and
recursion theory side of things though.
More information about the Haskell-Cafe