Wow! Now we are talking!

Josef Svenningsson wrote:
So instead of:
newtype State s a = State { runState :: (s -> (a, s)) }
we have:
newtype StateP p s a = StateP { runStateP :: (s -> p a s) }
Now, instantiating this with different pair types with different
strictness properties will give us total control over strictness for
state and value.

Beautiful!

Iavor Diatchki wrote:
The state transformer inherits its behavior from the underlying
monad. For example: StateT Int IO is strict, but StateT Int Id
is lazy.

Fantastic!

I'm drooling. When can we get stuff like this into MTL?
And maybe it is finally time for me to bite the bullet and
try out monadLib again (is it still CPS? gulp).

Now let's attack Data.* libraries...

-Yitzchak
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to