Evan Laforge schrieb:
On Fri, Sep 11, 2009 at 6:10 AM, Edward Kmett ekm...@gmail.com wrote:
Unfortunately, the instance of Monad for Either a is somewhat misguided in
Haskell.
There is a spurious restraint that the Left value in your Either be a member
of some Error class, which was brought
You could, but then you need overlapping instances to define the one in
Control.Monad.Error.
-Edward Kmett
On Sat, Sep 12, 2009 at 4:26 PM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
Evan Laforge schrieb:
On Fri, Sep 11, 2009 at 6:10 AM, Edward Kmett ekm...@gmail.com wrote:
Unfortunately, the instance of Monad for Either a is somewhat misguided in
Haskell.
There is a spurious restraint that the Left value in your Either be a member
of some Error class, which was brought about by the deletion of MonadZero
from Haskell 98 (as part of the elimination of failure free
On Fri, Sep 11, 2009 at 6:10 AM, Edward Kmett ekm...@gmail.com wrote:
Unfortunately, the instance of Monad for Either a is somewhat misguided in
Haskell.
There is a spurious restraint that the Left value in your Either be a member
of some Error class, which was brought about by the deletion
Right. I know there was some argument a while back, but I thought
that position that instances are global period was pretty official.
At least it made sense to me. The more libraries you import the less
control you have over the extent of what they may import. But I guess
it wouldn't be
if I understand you correctly, all libraries that software I write depends
on, directly or indirectly, must be free of namespace conflicts. Is that
correct?
Well, it may be more accurate to say that class instances have no
namespaces, and are all implicitly global. When you import a module,
Is there any particular reason to not move the instance to the
prelude? A module was failing when imported from one place and ok
when imported from another, so I spent a frustrating 10 minutes
searching for the instance. I couldn't find a way to search haddock
for instances (not even grep on the
According to this
http://www.randomhacks.net/articles/2007/03/10/haskell-8-ways-to-report-errors
Either is an instance of class Monad, but when I try to use the do
notation I get a compiler error. What's going on?
E.
___
Haskell-Cafe mailing list
On 12/20/07, Eric [EMAIL PROTECTED] wrote:
According to this
http://www.randomhacks.net/articles/2007/03/10/haskell-8-ways-to-report-errors
Either is an instance of class Monad, but when I try to use the do
notation I get a compiler error. What's going on?
Near the bottom of that page is a
Tom Phoenix wrote:
On 12/20/07, Eric [EMAIL PROTECTED] wrote:
According to this
http://www.randomhacks.net/articles/2007/03/10/haskell-8-ways-to-report-errors
Either is an instance of class Monad, but when I try to use the do
notation I get a compiler error. What's going on?
Near the
Eric wrote:
According to this
http://www.randomhacks.net/articles/2007/03/10/haskell-8-ways-to-report-errors
Either is an instance of class Monad, but when I try to use the do
notation I get a compiler error. What's going on?
Try to import Control.Monad.Error to get a Monad instance for
11 matches
Mail list logo