[GHC] #12160: MonadFail instance for (Either String)?
GHC
ghc-devs at haskell.org
Tue Sep 13 14:18:02 UTC 2016
#12160: MonadFail instance for (Either String)?
-------------------------------------+-------------------------------------
Reporter: lexi.lambda | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: libraries | Version: 8.0.1
(other) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #9588 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by hesiod):
I tried implementing this, however, simply adding the instance in
Data.Either leads to an import cycle because
{{{Data.String(IsString(..))}}} has to be imported:
{{{
Module imports form a cycle:
module ‘Data.Either’ (libraries/base/Data/Either.hs)
imports ‘Data.String’ (libraries/base/Data/String.hs)
which imports ‘Data.List’ (libraries/base/Data/List.hs)
which imports ‘Data.Traversable’ (libraries/base/Data/Traversable.hs)
which imports ‘Data.Either’ (libraries/base/Data/Either.hs)
}}}
However, I can't investigate this further atm, so if anyone wants to pick
this up, please go ahead. I guess some shuffling around (maybe creating a
hidden module for IsString) should solve the issue.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12160#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list