
22 Dec
2010
22 Dec
'10
3:02 p.m.
Interesting. In that case,
state f = StateT $ \s -> Identity (f s)
allows "state" to replace "State" in that code.
On Wed, Dec 22, 2010 at 4:56 AM, Daniel Fischer
On Wednesday 22 December 2010 12:03:01, Ryan Ingram wrote:
Huh, that's weird, I just copy and pasted this into a new file and it worked for me.
As a guess, you have mtl-1.*? In mtl-2.*, State s is made a type synonym for StateT s Identity, so there's no longer a data constructor State.