[Haskell-cafe] Why isn't pattern matching lazy by default?

Henning Thielemann lemming at henning-thielemann.de
Wed Sep 19 12:13:22 EDT 2007

On Wed, 19 Sep 2007, Miguel Mitrofanov wrote:

>>> Now why isn't pattern matching lazy by default?  This seems odd for a 
>>> newbie since everything else is lazy by default.
>> It's even more confusing that pattern matching in 'let' _is_ lazy.
> No, it's not.
> See, in let or where constructs you don't have a choice; you can't do 
> different things depending on whether some value is Just x or Nothing. 
> Therefore, there is no need to perform pattern matching strictly.

Then why are patterns in lambdas not lazy?

More information about the Haskell-Cafe mailing list