
Ive been trying parsec And I gather that the modules structures are heavily reorganized eg https://kunigami.wordpress.com/2014/01/21/an-introduction-to-the-parsec-libr... starts with import Data.Char (char) which immediately gives Module ‘Data.Char’ does not export ‘char’ Change that to import Text.Parsec.Char (char) and that error goes and more and more arcane ones start Likewise all the stuff here http://jakewheat.github.io/intro_to_parsing/ seems to be wrong paths Is there no tutorial for the current versions? ghc 7.8.4 parsec 3.1.9-2

Il giorno 30 mar 2016, alle ore 17:16, Bardur Arantsson
ha scritto: On 03/30/2016 03:30 PM, Rustom Mody wrote:
Ive been trying parsec And I gather that the modules structures are heavily reorganized
Unless you're dead set on parsec specifically, I'd recommend looking into megaparsec instead.
If one cares about error messages, ‘trifecta’ is also a very good choice. In combination with the interface from the ‘parsers’ package is also very pleasant to use.
Regards,
Regards, Nicola

On Wednesday, March 30, 2016, Rustom Mody
Ive been trying parsec And I gather that the modules structures are heavily reorganized
eg https://kunigami.wordpress.com/2014/01/21/an-introduction-to-the-parsec-libr... starts with
import Data.Char (char)
That's incorrect and has never been correct. The parser you want is in Text.Parsec.Char. Data.Char is a standard Haskell module and has nothing to do with Parsec. Unfortunately I can't recommend any particular tutorial. Mostly I thrashed about, reading this and that. The principles are best explained in the original papers, such as this one: http://research.microsoft.com/en-us/um/people/daan/download/papers/parsec-pa... But unfortunately the original papers are somewhat out of date too.

Parsec isn't as maintained as Megaparsec
https://mrkkrp.github.io/megaparsec/.
I recommend checking out the tutorials here
https://mrkkrp.github.io/megaparsec/tutorials.html.
On Wed, Mar 30, 2016 at 6:30 AM, Rustom Mody
Ive been trying parsec And I gather that the modules structures are heavily reorganized
eg https://kunigami.wordpress.com/2014/01/21/an-introduction-to-the-parsec-libr... starts with
import Data.Char (char)
which immediately gives Module ‘Data.Char’ does not export ‘char’
Change that to import Text.Parsec.Char (char)
and that error goes and more and more arcane ones start Likewise all the stuff here http://jakewheat.github.io/intro_to_parsing/ seems to be wrong paths
Is there no tutorial for the current versions? ghc 7.8.4 parsec 3.1.9-2
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

Thanks all for the suggestions
The first tut I tried seems to have an omission. I needed to add a
import Control.Applicative
to
https://mrkkrp.github.io/megaparsec/tutorials/parsing-simple-imperative-lang...
[Saw it in the others so guessed it has to be added]
Can report if desirable but Im yet quite in noob stage...
On Wed, Mar 30, 2016 at 10:06 PM, Joe Hillenbrand
Parsec isn't as maintained as Megaparsec https://mrkkrp.github.io/megaparsec/.
I recommend checking out the tutorials here https://mrkkrp.github.io/megaparsec/tutorials.html.
On Wed, Mar 30, 2016 at 6:30 AM, Rustom Mody
wrote: Ive been trying parsec And I gather that the modules structures are heavily reorganized
eg https://kunigami.wordpress.com/2014/01/21/an-introduction-to-the-parsec-libr... starts with
import Data.Char (char)
which immediately gives Module ‘Data.Char’ does not export ‘char’
Change that to import Text.Parsec.Char (char)
and that error goes and more and more arcane ones start Likewise all the stuff here http://jakewheat.github.io/intro_to_parsing/ seems to be wrong paths
Is there no tutorial for the current versions? ghc 7.8.4 parsec 3.1.9-2
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

On Wed, Mar 30, 2016 at 07:00:40PM +0530, Rustom Mody wrote:
Ive been trying parsec And I gather that the modules structures are heavily reorganized
Indeed I recall having problems with modules being shifted around a bit when I first read the tutorial. Keeping an eye on the index [1] did it for me at the time. [1] http://hackage.haskell.org/package/parsec-3.1.9/docs/doc-index-All.html
participants (6)
-
Bardur Arantsson
-
Francesco Ariis
-
Joe Hillenbrand
-
Nicola Gigante
-
Omari Norman
-
Rustom Mody