Opened 7 months ago

Closed 7 months ago

#8386 closed bug (wontfix)

AMP warning on "hiding (join)"

Reported by: monoidal Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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 = ()

Change History (2)

comment:1 Changed 7 months ago 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

comment:2 Changed 7 months ago by monoidal

  • Resolution set to wontfix
  • Status changed from new to closed

Since this behavior was planned beforehand, I'm closing as "by design".

Note: See TracTickets for help on using tickets.