[GHC] #10478: Shorter import syntax

GHC ghc-devs at haskell.org
Wed Jun 3 01:03:31 UTC 2015


#10478: Shorter import syntax
-------------------------------------+-------------------------------------
              Reporter:  acowley     |             Owner:
                  Type:  feature     |            Status:  new
  request                            |         Milestone:
              Priority:  normal      |           Version:  7.10.1
             Component:  Compiler    |  Operating System:  Unknown/Multiple
              Keywords:              |   Type of failure:  None/Unknown
          Architecture:              |        Blocked By:
  Unknown/Multiple                   |   Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 It would be helpful to support a short syntax for importing unqualified
 identifiers while establishing a short qualified name. An example of the
 proposed syntax is,

 {{{#!hs
 import Data.Map (Map) as M
 }}}

 The desired semantics are that `Map` be imported unqualified, and `M` be
 defined as an alias for `Data.Map`. This replaces the existing convention
 of writing,

 {{{#!hs
 import Data.Map (Map)
 import qualified Data.Map as M
 }}}

 The proposed syntax is currently an error, I think, so adding support for
 it should not break anything.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10478>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list