[Haskell-cafe] Why is Haskell flagging this?
ryani.spam at gmail.com
Wed Dec 22 21:02:21 CET 2010
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
<daniel.is.fischer at googlemail.com> wrote:
> 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.
More information about the Haskell-Cafe