Opened 10 months ago

Last modified 7 months ago

#8043 new bug

Feature Request : Qualified module exports

Reported by: erikd Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: Cc: conrad@…, mle+hs@…, idhameed@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I quite like the practice of using -XNoImplicitPrelude and then defining my own (often per-project) Prelude doing things like:

module MyProject.Prelude
    ( module P
    )
import Data.Text as P (Text)
import Prelude as P hiding (head, init, tail, last)

As an extension to the above idea, I would like to add qualified module exports defined so that I can do this:

module MyProject.Prelude
    ( module P
    , qualified module T
    )
import Data.Text as P (Text)
import Prelude as P hiding (head, init, tail, last)
import qualified Data.Text as T

so that any file which imports MyProject.Prelude will then have all the identifiers that they would normally get if they did:

import qualified Data.Text as T

Is this something that would have to go through the Haskell Next procedure? If so, how does one get that kicked off?

Change History (7)

comment:1 Changed 10 months ago by conrad

  • Cc conrad@… added

comment:3 Changed 10 months ago by erikd

  • Cc mle+hs@… added

comment:4 Changed 8 months ago by ihameed

  • Cc idhameed@… added

comment:5 Changed 7 months ago by erikd

The original links to the mailing list have bit rotted but the emails are available at http://www.haskell.org/pipermail/haskell-cafe/2005-March/thread.html in the thread titled "Best practices for modular programming in Haskell".

comment:6 Changed 7 months ago by erikd

I've started documenting this proposal here: http://www.haskell.org/haskellwiki/GHC/QualifiedModuleExport

comment:7 Changed 7 months ago by simonmar

This may be the new location for that discussion: http://www.haskell.org/pipermail/libraries/2005-March/003139.html

Could someone please fix the mailing list links!

Note: See TracTickets for help on using tickets.