#1463: Module → Package lookup in ghc-pkg?
-------------------------------+--------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |          Owner:             
     Type:  feature request    |         Status:  new        
 Priority:  normal             |      Milestone:  6.10 branch
Component:  Compiler           |        Version:  6.6.1      
 Severity:  normal             |     Resolution:             
 Keywords:                     |     Difficulty:  Unknown    
 Testcase:                     |   Architecture:  Unknown    
       Os:  Unknown            |  
-------------------------------+--------------------------------------------
Comment (by claus):

 Replying to [comment:10 simonpj]:
 > Replying to [comment:8 guest]:
 > I think that `GHC.parseName` should return an empty list (with no error
 message) if it doesn't find any bindings for the specified string.  That
 way the client of the API can complain if necessary.  Once `parseName` has
 returned a list of `Names` I think they should all be lookable up (using
 `GHC.getInfo`) without errors.

 yes, if `GHC.parseName` (and ghc api functions in general) could be made
 to behave that way, it would help. i could then ignore that extra error
 output in case i've already found module-related info.

 there seems to be a third case, btw, failing to load interface:
 {{{
 $ /cygdrive/c/fptools/ghc/compiler/stage2/ghc-inplace --interactive
 GHCi, version 6.9.20071106: http://www.haskell.org/ghc/  :? for help
 Loading package base ... linking ... done.
 Prelude> :i foo/bar
 <interactive>:1:3: parse error on input `/'
 []

 Prelude> :i List
 module List -- in package haskell98

 Top level: Not in scope: type constructor or class `List'
 []

 Prelude> :i Data.List
 module Data.List -- in package base

 Top level:
     Failed to load interface for `Data':
       Use -v to see a list of the files searched for.
 []
 }}}

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