#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 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`.  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. Importing twice with different import lists is
 handled like in source files. Any ":m" commands will overwrite import
 declarations for the same module. The problem with representing an import
 in a `CtxCmd` is that it has a completely different syntax, so storing it
 in the same structure seems awkward.  A new patch should be up soon.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2362#comment:20>
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