[Haskell-beginners] Parsec Library Questions

Brandon Allbery allbery.b at gmail.com
Tue Jan 22 16:18:41 CET 2013


On Tue, Jan 22, 2013 at 7:52 AM, Sean Cormican <seancormican1 at gmail.com>wrote:

> 1. I seem to be having some issues with importing Parsec modules for
> instance.
> "import Parsec" as outlined in the introduction causes errors as does a
> number of the imports used later on in the paper and a solution that I have
> found is to further specify "import Text.Parsec" is this due to some
> changes to importing since the paper was written (in 2001 I believe)?
>

Flat Haskell98 modules are no longer used; they pollute the namespace.
 Additionally, the Parsec3 API was for a time not 100% backward compatible
(and may still require type annotations sometimes) and at one point was
significantly slower than Parsec2, so it was relocated in order to allow
them to coexist in a somewhat comprehensible way.


> 3. I have also tried to run the files that I have created in hugs and ghc
> and while they work in ghc, hugs on the other hand complains about the
> import statements I making e.g. "import Text.Parsec.Expr"
>

hugs is no longer maintained; I doubt it can handle Parsec3 fully.  If for
some reason you must use Hugs, you might want to stick to Parsec2.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130122/53b33e87/attachment.htm>


More information about the Beginners mailing list