[Haskell-cafe] Actually loading a Cabal package in GHCi

dlb at patriot.net dlb at patriot.net
Sun Jul 11 15:25:44 EDT 2010

Daniel and Filipe, both of you, thank you.

Let me be specific.  I have done a "cabal install Haskore" and also
downloaded some HasChorus source, which uses Haskore.  I was imprecise
before: the package is there, I just can't see it.  As follows:


dlb at Hypno:~/haschorus-1.2.1$ ghci
GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m Haskore
Prelude Haskore> :l HasScales
[1 of 1] Compiling HasScales        ( HasScales.lhs, interpreted )

    Not in scope: type constructor or class `AbsPitch'


And so on (lots of similar errors).  Haskore defines AbsPitch.  I can't
even load Haskore, because it is a "package module", to wit:


Prelude Haskore> :l Haskore

<no location info>: module `Haskore' is a package module
Failed, modules loaded: none.


So that's where I am.  I don't know how to make the stuff Haskore has
visible to the modules I'm working with in an interpreted context.

Again, I know this is easy; I just can't figure it out!

Dave Barton

More information about the Haskell-Cafe mailing list