#2362: allow full import syntax in GHCi
---------------------------------+------------------------------------------
    Reporter:  Isaac Dupree      |        Owner:  igloo       
        Type:  feature request   |       Status:  new         
    Priority:  high              |    Milestone:  6.14.1      
   Component:  Compiler          |      Version:  6.8.2       
    Keywords:  ghci, import      |   Difficulty:  Unknown     
          Os:  Unknown/Multiple  |     Testcase:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by simonmar):

 Replying to [comment:20 SamAnklesaria]:
 > Thanks for the comments. `parseName` relies internally on a function
 from HscMain that does just that: name parsing.  I don't think it can
 handle import declarations, which is why I wrote `hscImport`.

 Yes - I'm just suggesting that instead of `getImportDecl` you call it
 `parseImportDecl` and make it parse a complete import declaration for
 consistency.

 > As I removed the "import" from the string the user entered (saving all
 the import parts in a `remembered_ctx` seems redundant), it needs to be
 prepended or the parser won't understand it.

 My suggestion is to not remove it in the first place, that seems simpler.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2362#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to