[GHC] #9977: Nicer imports

#9977: Nicer imports -------------------------------------+------------------------------------- Reporter: tolysz | Owner: Type: feature | Status: new request | Milestone: Priority: lowest | Version: 7.11 Component: Compiler | Operating System: Unknown/Multiple (Parser) | Type of failure: None/Unknown Keywords: imports | Blocked By: Architecture: | Related Tickets: Unknown/Multiple | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Hi, I wonder if we could have {{{#!hs import Data A B (ba, bb, bc) C as C C1 as C1 (ca,cb,cc) D qualified E as E qualified F as F qualified (fa, fb, fc) Libs.Other -- Data.E qualified as E -- both valid -- Data.F qualified as F (fa, fb, fc) }}} to desugar to {{{#!hs import Data.A import Data.B (ba, bb, bc) import Data.C as C import qualified Data.D import qualified Data.E as E import qualified Data.F as F (fa, fb, fc) import Libs.Other }}} so we could make syntax more dry? What it does if there is indentation it uses previous levels as prefix -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9977 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9977: Nicer imports -------------------------------------+------------------------------------- Reporter: tolysz | Owner: Type: feature request | Status: new Priority: lowest | Milestone: Component: Compiler | Version: 7.11 (Parser) | Keywords: imports Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by rwbarton): In your example, how would you distinguish whether or not you intend to import the module `Data`? Or more realistically, how do I import both `Data.ByteString` and `Data.ByteString.Lazy` without repeating `ByteString`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9977#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9977: Nicer imports -------------------------------------+------------------------------------- Reporter: tolysz | Owner: Type: feature request | Status: new Priority: lowest | Milestone: Component: Compiler | Version: 7.11 (Parser) | Keywords: imports Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by tolysz): {{{#!hs import Data.ByteString @ Lazy import Data.ByteString {@, Lazy} import Data.ByteString {@, Lazy} }}} You got me, there needs to be a symbol for indicating current node, and not sure which would be the best one `@` here is just an example. Curly brackets to de-sugaring to indentation would help as well :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9977#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9977: Nicer imports -------------------------------------+------------------------------------- Reporter: tolysz | Owner: Type: feature request | Status: new Priority: lowest | Milestone: ⊥ Component: Compiler | Version: 7.11 (Parser) | Keywords: imports Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by ezyang): * milestone: => ⊥ Comment: Unfortunately, this proposal is completely incompatible with how layout rule works in Haskell today, which is that is triggered on a few special keywords. There is nothing of the sort here, so you would have to enforce layout through an alternate mechanism. I think it's unlikely that we'd accept this proposal. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9977#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9977: Nicer imports -------------------------------------+------------------------------------- Reporter: tolysz | Owner: Type: feature request | Status: closed Priority: lowest | Milestone: ⊥ Component: Compiler | Version: 7.11 (Parser) | Keywords: imports Resolution: wontfix | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => wontfix Comment: Try to get support for this on one of the mailing lists first. See also: WorkingConventions/AddingFeatures. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9977#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC