[GHC] #8386: AMP warning on "hiding (join)"

#8386: AMP warning on "hiding (join)" -------------------------+------------------------------------------------- Reporter: | Owner: monoidal | Status: new Type: bug | Milestone: Priority: | Version: 7.7 normal | Operating System: Unknown/Multiple Component: | Type of failure: Incorrect warning at Compiler | compile-time Keywords: | Test Case: Architecture: | Blocking: Unknown/Multiple | Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- This file gives an AMP warning, but it shouldn't. It's a slightly modified version of http://ghc.haskell.org/trac/ghc/ticket/8004#comment:15. {{{ module Foo (join) where import Prelude hiding (join) -- import Prelude () gives no warning join :: () join = () }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8386 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8386: AMP warning on "hiding (join)" -------------------------------------------------+------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect warning at | Unknown/Multiple compile-time | Difficulty: Test Case: | Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by quchen): I don't think there is an easy fix for this. When you write `import Plreude hiding (join)` right now, you're hiding a function that is not even in `Prelude`. GHC does not issue a warning here though; it just silently adds nothing to the hiding list. For that reason, you cannot check whether `join` is hidden from an import when it's not in there in the first place. See also http://www.haskell.org/haskellwiki/Functor-Applicative- Monad_Proposal#Future_Prelude_names -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8386#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8386: AMP warning on "hiding (join)" -------------------------------------------------+------------------------- Reporter: monoidal | Owner: Type: bug | Status: Priority: normal | closed Component: Compiler | Milestone: Resolution: wontfix | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect warning at | Architecture: compile-time | Unknown/Multiple Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by monoidal): * status: new => closed * resolution: => wontfix Comment: Since this behavior was planned beforehand, I'm closing as "by design". -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8386#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC