Network.Socket on win32

Simon Marlow simonmar at
Tue Mar 2 15:04:25 EST 2004

> Yup that worked.  Sort of an obscure error message
> to communicate "package not found"....
> Is there a convention so I know which package I
> need for which module?  My guess is sometimes (but
> randomly) you need to add a package
> on the command line corresponding to the first
> part of the qualified module name.  e.g. I just
> figured out that
> -package text worked to get me Text.ParserCombinators.Parsec
> OTOH, if this is the rule, it seems strange that
> GHC can't go and find the packages itself.

As far as it can, GHC does go and find the packages itself.  There's one
situation it can't: when doing batch linking from the command line,
because then GHC doesn't know which modules were imported by the
program.  If you use GHCi or --make, then GHC figures out the package
dependencies for itself.

To answer your question, the package for each module is listed in the
documentation: each module has the package name in the title at the top,
and the contents page also lists the package name alongside each module.

Incedentally, -package parsec is the right way to get


More information about the Glasgow-haskell-users mailing list