[Haskell-cafe] derivation of mapP, a parallel, lazy map
Roberto Zunino
zunino at di.unipi.it
Mon Feb 25 16:41:48 EST 2008
Felipe Lessa wrote:
> Have you seen parBuffer? I'd also recommend looking at its source.
I wonder if it would be possible to make a variant of parBuffer so that
the following evaluates to 1:
> take 1 $ parBuffer 10 r0 (1:2:3:undefined)
*** Exception: Prelude.undefined
Maybe we should use a more complex intermediate structure as
data ExcList a = Nil | Cons a (ExcList a) | Deferred Exception
and catch the exception through some unsafe stuff? Would that be a good
idea?
Zun.
More information about the Haskell-Cafe
mailing list