[Haskell-cafe] Re: copy-on-write monad?

oleg at pobox.com oleg at pobox.com
Sat Jun 23 04:01:00 EDT 2007


Greg Meredith wrote:
> First, has anyone worked out a monadic
> approach to copy-on-write? (And, Is there any analysis of perf
> characteristics of said monadic schemes?)

If you use Zippers (Huet's or generic ones) with functional updates,
copy-on-write comes out automatically and by default. This is
explained in 
	http://okmij.org/ftp/Computation/Continuations.html#zipper
and, in a more readable form, in a recent paper
	http://okmij.org/ftp/papers/context-OS.pdf

The web page also contains the complete code.



More information about the Haskell-Cafe mailing list