Re: [Haskell-cafe] Call for comments: neither package

It looks like good work, but I would be hesitent about depending on a
package which pulled in both mtl and tranformers.
Maybe that's just superstition - I haven't tried it.
Antoine
On Jun 28, 2010 5:51 PM, "Michael Snoyman"

As far as I know, the only issue with depending on both is the conflicting
orphan Monad instance for Either. Can anyone either confirm or deny this?
On Tue, Jun 29, 2010 at 5:11 AM, Antoine Latter
It looks like good work, but I would be hesitent about depending on a package which pulled in both mtl and tranformers.
Maybe that's just superstition - I haven't tried it.
Antoine
On Jun 28, 2010 5:51 PM, "Michael Snoyman"
wrote: Hi all,
I'll admit, the original idea for this package was something to place in ACME ;). However, it's goal is to solve a real problem: the lack of good instances on the Either type. As a brief summary, Either has no Applicative or Monad instances in the base library, has 2 reasonable definitions for Applicative, and there are conflicting orphan instances in the mtl and transformers packages. Also, the ErrorT transformer in those two packages introduces a superclass constraint many people would like to avoid.
neither supplies three datatypes: AEither, MEither and MEitherT. AEither provides the Monoid version of the Applicative instance, MEither is the monadic version, and MEitherT is a monad transformer. The package provides instances for both the transformers and mtl libraries for MonadTrans, MonadIO and MonadCatchIO.
The code is up on github[1], let me know what you think.
Michael
[1] http://github.com/snoyberg/neither
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 29 June 2010 15:20, Michael Snoyman
As far as I know, the only issue with depending on both is the conflicting orphan Monad instance for Either. Can anyone either confirm or deny this?
Since you're being naughty and using package-qualified imports, it should be OK (in terms of working).
On Tue, Jun 29, 2010 at 5:11 AM, Antoine Latter
wrote: It looks like good work, but I would be hesitent about depending on a package which pulled in both mtl and tranformers.
Maybe that's just superstition - I haven't tried it.
Antoine
On Jun 28, 2010 5:51 PM, "Michael Snoyman"
wrote: Hi all, I'll admit, the original idea for this package was something to place in ACME ;). However, it's goal is to solve a real problem: the lack of good instances on the Either type. As a brief summary, Either has no Applicative or Monad instances in the base library, has 2 reasonable definitions for Applicative, and there are conflicting orphan instances in the mtl and transformers packages. Also, the ErrorT transformer in those two packages introduces a superclass constraint many people would like to avoid. neither supplies three datatypes: AEither, MEither and MEitherT. AEither provides the Monoid version of the Applicative instance, MEither is the monadic version, and MEitherT is a monad transformer. The package provides instances for both the transformers and mtl libraries for MonadTrans, MonadIO and MonadCatchIO. The code is up on github[1], let me know what you think. Michael [1] http://github.com/snoyberg/neither _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Tue, Jun 29, 2010 at 8:24 AM, Ivan Miljenovic
On 29 June 2010 15:20, Michael Snoyman
wrote: As far as I know, the only issue with depending on both is the conflicting orphan Monad instance for Either. Can anyone either confirm or deny this?
Since you're being naughty and using package-qualified imports, it should be OK (in terms of working).
Is naughty simply tongue-in-cheek, or are there detriments to it? You know, besides not all compilers supporting them...
Michael

On 29 June 2010 15:38, Michael Snoyman
On Tue, Jun 29, 2010 at 8:24 AM, Ivan Miljenovic
wrote: On 29 June 2010 15:20, Michael Snoyman
wrote: As far as I know, the only issue with depending on both is the conflicting orphan Monad instance for Either. Can anyone either confirm or deny this?
Since you're being naughty and using package-qualified imports, it should be OK (in terms of working).
Is naughty simply tongue-in-cheek, or are there detriments to it? You know, besides not all compilers supporting them...
A bit of both. Someone (dons?) had a good discussion on the Haskell reddit about why you shouldn't use them, but I can't seem to find it at the moment (I did find this one, but I seem to recall a better discussion: http://www.reddit.com/r/haskell/comments/bfcfs/haskells_big_three/c0mhqtg ). Otherwise, the documentation for it discourages its use: http://haskell.org/ghc/docs/6.12.2/html/users_guide/syntax-extns.html#packag... -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
participants (3)
-
Antoine Latter
-
Ivan Miljenovic
-
Michael Snoyman