[Haskell-beginners] Which package is loaded?

Obscaenvs obscaenvs at gmail.com
Mon Mar 14 15:54:09 CET 2011


How do I find out which module a package is loaded from?
I have   xmonad-contrib-0.9.1 and    xmonad-contrib-0.9.2 installed. I did
$ sudo ghc-pkg hide xmonad-contrib-0.9.1
but it seems the module used is still xmonad-contrib-0.9.1 (I *think*).

I have in my xmonad.hs the line
"import qualified XMonad.Util.Dzen as Dzen" which works  - but only with 
the legacy functions (e.g. dzen , but *not* dzenConfig), hence my hobby 
conclusion that it is xmonad-contrib-0.9.1 that is used -- despite the 
fact that it is "hidden", but what do I know?

So how *does* GHC find a package, and within it, a module? I have been 
using "the Google" and the documentation for a while now, but I've come 
up emtpy handed. Is the module system really so badly documented?

/Fredrik Carlén




More information about the Beginners mailing list