[GHC] #1847: Oddity with :browse!

GHC trac at galois.com
Wed Nov 7 07:45:09 EST 2007


#1847: Oddity with :browse!
----------------------+-----------------------------------------------------
 Reporter:  simonmar  |          Owner:  claus.reinke at talk21.com
     Type:  bug       |         Status:  new                    
 Priority:  normal    |      Milestone:  6.8.2                  
Component:  GHCi      |        Version:  6.8.1                  
 Severity:  normal    |     Resolution:                         
 Keywords:            |     Difficulty:  Unknown                
 Testcase:            |   Architecture:  Unknown                
       Os:  Unknown   |  
----------------------+-----------------------------------------------------
Comment (by guest):

 thanks for applying the patches. there are no outstanding platform issues
 with tests then?

 the purpose of `:browse!`, as per its ticket #1617, is to provide
 information about both qualified and unqualified names in scope, without
 blowing up the size of the listing with variations of each name. hence,
 the comments for each group of names, which list imports (qualifiers under
 which the names are available in the currect scope, which is `Main (A.hs)`
 here), not defining modules.

 the `:browse! C` output tells you that, in the current scope `Main`, from
 the module `C`, the items `g,h,f` are available unqualified, and the items
 `B.g,B.f,B.h` are available qualified.

 if you try `:browse! *C` (warning: lots of output), you'll get this
 {{{
 *Main> :browse! *C
 -- not currently imported
 B :: Float -> T
 C :: Int -> C
 A :: Int -> T
 x :: C -> Int
 data C
 data T = A Int | B Float
 -- imported from B
 f :: (Num a) => a -> a
 h :: (Integral a) => a -> a
 g :: (Num a) => a -> a
 -- imported from Prelude
 True :: Bool
 False :: Bool
 Nothing :: Maybe a
 Left :: a -> Either a b
 Right :: b -> Either a b
 ...
 }}}
 telling you about all items available in `C`, together with information
 detailing which items are not currently imported into `Main`, and which
 items are imported, from which module (with which qualifiers), such as `B`
 or `Prelude`.

 so the output is as expected, but you expected a different interpretation.
 would it help if i changed `from` to `via`?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1847#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list