Text.ParserCombinators.Parsec requires -package text.

Simon Peyton-Jones simonpj at microsoft.com
Mon Sep 6 08:43:15 EDT 2004


It's documented behaviour.

* import Text.ParserCombinators.Parsec will work without any -package
flags, if any installed package has a module
Text.ParserCombinators.Parsec.  It's very tiresome adding -package flags
all the time.

* The link step needs -package flags, because it only gets .o files, and
we didn't want it to start hunting through .hi files (though that would
be possible)

* ghc Main.hs is by definition equivalent to ghc -c Main.hs; ghc Main.o,
and the latter step needs the package flag. If you say ghc --make
Main.hs you'll get what you want.

Simon

| -----Original Message-----
| From: glasgow-haskell-bugs-bounces at haskell.org
[mailto:glasgow-haskell-bugs-
| bounces at haskell.org] On Behalf Of George Russell
| Sent: 06 September 2004 11:35
| To: Ross Paterson
| Cc: glasgow-haskell-bugs at haskell.org
| Subject: Re: Text.ParserCombinators.Parsec requires -package text.
| 
| Ross Paterson wrote:
| > On Mon, Sep 06, 2004 at 12:10:09PM +0200, George Russell wrote:
| >
| >>With
| >>   ghc ParsecTest.hs -o pt
| >>you get a link-time failure, because it looks as if the base package
| >>Text.ParserCombinators.Parsec depends somehow on the package "text".
| >
| >
| > Try -package parsec
| 
| OK, I have.  But if parsec is required for linking, I think it should
also
| be required for compilation!
| 
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



More information about the Glasgow-haskell-bugs mailing list