[Haskell-cafe] Maintaining laziness

Henning Thielemann schlepptop at henning-thielemann.de
Mon Dec 29 18:57:09 EST 2008


Jake McArthur schrieb:
> Henning Thielemann wrote:
>> I found it especially enlightening, that one can avoid a 'force'
>> function in a lazy parser by making the possibility of a parser
>> failure explicit in its type. I.e. a parser that cannot fail, need no
>> 'force'. (I learnt that in polyparse the 'force' function is hidden in
>> 'apply':
> 
> 
> I'm curious, what is the difference between using a force function and
> using lazy pattern matching?

Erm, nothing? Because 'force' is implemented by lazy pattern matching.


More information about the Haskell-Cafe mailing list