
#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): I'm probably missing something here: we both pasted the exact same line from the spec, and I offered the changed version, {{{ impdecl -> import modid impspec as modid }}} This is different from the spec in that `qualified` does not appear, and the `impspec` has moved. Further, neither the `impspec` nor the `as modid` are optional if you want to trigger the new behavior. They both must appear to invoke `ShortImports` behavior. The proposed syntax is syntactically invalid in Haskell2010. I've included on the wiki several ways of writing the grammar in an attempt to find one that can communicate. The patch itself already works and is smaller than any of these posts, so perhaps the code would be clearer if one is used to happy syntax. I've updated the wiki page to come at these issues from every angle I could think of. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10478#comment:23 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler