[GHC] #8004: Applicative/Monad proposal related warnings (AMP phase 1)
GHC
ghc-devs at haskell.org
Thu Sep 12 17:42:57 CEST 2013
#8004: Applicative/Monad proposal related warnings (AMP phase 1)
-------------------------------------+------------------------------------
Reporter: quchen | Owner: quchen
Type: feature request | Status: new
Priority: high | Milestone: 7.8.1
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by tibbe):
Let me clarify what my concern here is: there are two ways to future proof
your code against the upcoming export of `join` et al in 7.10:
* Rename your local `join` function.
* Hide the import from the `Prelude` (this is what the example above
does).
Both will work when 7.10 comes around.
The problem is that the warning is overly trigger-happy; it warns if you
go for option 2. Since people like to have warning free code, this means
that in practice you have to go with the first option. There might be a
good reason to have a function called `join` in your module, just like
there might be a good reason to have a function called `map` (or any other
`Prelude` name).
I think the warning should be fixed such that it only happens if the code
would actually break in 7.10.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8004#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list