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

Bas van Dijk v.dijk.bas at gmail.com
Wed Sep 19 14:28:37 EDT 2007


On 9/19/07, Roberto Zunino <zunino at di.unipi.it> wrote:
> Henning Thielemann wrote:
> > Then why are patterns in lambdas not lazy?
>
> Because they should allow for more branches! ;-))
>
> null = \ [] -> True
>           _  -> False

See http://hackage.haskell.org/trac/haskell-prime/ticket/114 for a
relevant proposal for Haskell Prime regarding something like this.

Bas


More information about the Haskell-Cafe mailing list