[Haskell-cafe] Re: Optimizing 'sequence'
Gracjan Polak
gracjanpolak at gmail.com
Tue Jul 22 03:15:40 EDT 2008
Antoine Latter <aslatter <at> gmail.com> writes:
>
> The function "runIdentity" is found in Control.Monad.Identity in the
> mtl package.
>
Thanks, I see it now! Laziness is not there!
But still... Identity is a bit special monad. What other monads need full
laziness in sequence? As far as I know IO is strict. What about lazy/strict
state monad?
Initially I spotted this possible optimization in context of monadic parser. I
am not really sure if I need this property there or not. How do I prove this to
myself?
Thanks to others who responded.
--
Gracjan
More information about the Haskell-Cafe
mailing list