
#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): Replying to [comment:12 thomie]:
Potentially confusing things about these proposals, assuming full backward compatibility:
||= proposal =||= H2010 syntax =||= new syntax =||= Why confusing? =|| ||= acowley =|| **import A as B (x)** || **import A (x) as B** || look similar, do different things ||
Just to chime in to confirm that this is the most ripe for confusion part of the proposal. No semantics of working code change with the extension enabled, but this point of confusion is introduced. For context, the syntax `import A as B (x)` is used in 0.3% of all `import` statements over all the code in the Stackage package set. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10478#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler