[Haskell-cafe] Cost of seq (sorry about the old subject)

Chad Scherrer chad.scherrer at gmail.com
Fri Nov 3 09:40:37 EST 2006


On 11/2/06, Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:
> Hello Chad,
>
> Thursday, November 2, 2006, 8:49:17 PM, you [Chad] wrote:
> > Would it be possible for the type system to distinguish at compile
> > time whether something would need to be evaluated, and optimize away
> > redundant `seq`s? Maybe this is what the strictness analyzer does
> > already.
>
> afaik, seq cost is zero (except for evaluating expressions, of course)
>

So if x has already been evaluated, does x `seq` y evaluate just as
quickly as y alone, or does it require extra cycles to make sure x has
been evaluated?
-- 

Chad Scherrer

"Time flies like an arrow; fruit flies like a banana" -- Groucho Marx


More information about the Haskell-Cafe mailing list