On Sat, May 23, 2009 at 7:31 PM, Mario Blažević <mblaze...@stilo.com> wrote:
> Does anybody know of a pragma or another way to make a function *non-strict* 
> even
> if it does always evaluate its argument? In other words, is there a way to
> selectively disable the strictness optimization?

parallelize a b | False = (undefined, undefined)
                   | otherwise = a `par` (b `pseq` (a, b))

might do, unless strictness analysis is smart enough to know that the
False guard is always, well, False.

--Max
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to