On Thu, Jan 1, 2009 at 1:31 PM, David Menendez <dave@zednenem.com> wrote:
2009/1/1 Luke Palmer <lrpalmer@gmail.com>:
>There is at least one transformer that will make a strict monad out of
> So that's the answer: there already is a Strict monad. And an attempt to
> make a lazier one strict just results in breaking the monad laws.
a non-strict monad.
newtype CPS m a = CPS { unCPS :: forall b. (a -> m b) -> m b }
No, Control.Monad.State.Strict and Control.Monad.State.Lazy never
> There's another answer though, regarding your question for why we don't just
> use StrictT State instead of a separate State.Strict. This message is
> already too long, and I suspect this will be the popular reply anyway, but
> the short answer is that Strict State is called that because it is strict in
> its state, not in its value.
force evaluation of their states.
Control.Monad.State.Strict> evalState (put undefined) '0'
()