Re: [Haskell-cafe] State monad is missing Applicative instance

2009-03-15 Thread Peter Verswyvelen
ouch, I was confusing the mtl and transformers package... so basically transformers is a better replacement for mtl? or does mtl offer things transformers does not? On Sun, Mar 15, 2009 at 12:04 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Sat, 14 Mar 2009, Peter

Re: [Haskell-cafe] State monad is missing Applicative instance

2009-03-15 Thread Henning Thielemann
Peter Verswyvelen schrieb: ouch, I was confusing the mtl and transformers package... so basically transformers is a better replacement for mtl? or does mtl offer things transformers does not? transformers and monad-fd are cleanly separated, transformers is Haskell 98 and monad-fd uses

Re: [Haskell-cafe] State monad is missing Applicative instance

2009-03-14 Thread Peter Verswyvelen
I was using the transformers but still had to implement the Applicative instance of State This package contains an applicative instance for StateT but not for State On Sat, Mar 14, 2009 at 3:05 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Thu, 12 Mar 2009, Peter Verswyvelen

Re: [Haskell-cafe] State monad is missing Applicative instance

2009-03-14 Thread Henning Thielemann
On Sat, 14 Mar 2009, Peter Verswyvelen wrote: I was using the transformers but still had to implement the Applicative instance of State This package contains an applicative instance for StateT but not for State In 'transformers' State is a type synonym for StateT Identity and thus does not

Re: [Haskell-cafe] State monad is missing Applicative instance

2009-03-13 Thread Wolfgang Jeltsch
Am Freitag, 13. März 2009 05:09 schrieb Denis Bueno: This works because every monad induces an Applicative instance in a way I've ingested just enough wine to forget. =] pure = return (*) = ap Best wishes, Wolfgang ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] State monad is missing Applicative instance

2009-03-13 Thread Henning Thielemann
On Thu, 12 Mar 2009, Peter Verswyvelen wrote: I think. Or is it defined in some other package? The 'transformers' package has those instances. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] State monad is missing Applicative instance

2009-03-12 Thread Peter Verswyvelen
I think. Or is it defined in some other package? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] State monad is missing Applicative instance

2009-03-12 Thread Matt Hellige
Looks like it may be defined in the package applicative-extras: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/applicative-extras But I'm not positive about that, and the docs are... sparse. Matt 2009/3/12 Peter Verswyvelen bugf...@gmail.com: I think. Or is it defined in some

Re: [Haskell-cafe] State monad is missing Applicative instance

2009-03-12 Thread Bas van Dijk
2009/3/12 Peter Verswyvelen bugf...@gmail.com: I think. Or is it defined in some other package? There's an existing ticket about this: http://hackage.haskell.org/trac/ghc/ticket/2316 Note that the ticket links to some old threads on librar...@haskell.org about the issue. regards, Bas

Re: [Haskell-cafe] State monad is missing Applicative instance

2009-03-12 Thread Denis Bueno
2009/3/12 Peter Verswyvelen bugf...@gmail.com: I think. Or is it defined in some other package? Note that you can get an Applicative instance for free by using WrapMonad in Control.Applicative. For example, just today I was writing a quickcheck Arbitrary instance, and the Gen monad doesn't have