[GHC] #9588: Add `MonadPlus {IO, Either e}` and `Alternative (Either e)` instances

GHC ghc-devs at haskell.org
Sat Sep 13 14:59:50 UTC 2014


#9588: Add `MonadPlus {IO,Either e}` and `Alternative (Either e)` instances
-------------------------------------+-------------------------------------
              Reporter:  hvr         |            Owner:  hvr
                  Type:  task        |           Status:  new
              Priority:  normal      |        Milestone:  7.10.1
             Component:              |          Version:
  libraries/base                     |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by ekmett):

 The `IO` case is easy and should definitely go in. That one is a no-
 brainer.

 However, looking at it, I'm rather uncomfortable about the notion of
 moving the rather ad hoc `Error` class into `base`. Nobody likes it.

 Perhaps the fate of the `Either` instance should go back out to the
 libraries mailing list to try to round up ideas.

 We could

 a.) Leave it where it is
 b.) Bring `Error` into base.
 c.) Switch it to `Monoid`, which is sadly too big and may break some
 usecases where `noMsg /= mempty` holds now.
 d.) Bring `Default` into base, which IIRC was already rejected by the
 `libraries@` list, and use that instead.
 e.) Figure out something else.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9588#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list