[Haskell-cafe] Re: A problem with par and modules boundaries...

Alexander Dunlap alexander.dunlap at gmail.com
Sat May 23 16:15:02 EDT 2009


On Sat, May 23, 2009 at 11:34 AM, Max Rabkin <max.rabkin at gmail.com> wrote:
> On Sat, May 23, 2009 at 7:31 PM, Mario Blažević <mblazevic at 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
> _______________________________________________

GHC.Prim.lazy?

Alex


More information about the Haskell-Cafe mailing list