[GHC] #10478: Shorter import syntax

GHC ghc-devs at haskell.org
Tue Sep 15 14:01:44 UTC 2015


#10478: Shorter import syntax
-------------------------------------+-------------------------------------
        Reporter:  acowley           |                   Owner:
            Type:  feature request   |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:  Phab:D1238
-------------------------------------+-------------------------------------

Comment (by acowley):

 Sure,


 {{{
 import modid maybeImpspec maybeAs
 }}}

 Semantics are the same as existing imports unless both an `impspec` (i.e.
 a parenthesised list of identifiers optionally prefixed with the `hiding`
 keyword) and an `as` (e.g. `as M`) are present. In such a case, all
 identifiers exported by `modid` are accessible behind the prefix given by
 the `as`.

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


More information about the ghc-tickets mailing list