Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Jake Wheat's "Intro to Parsing with Parsec in Haskell" outdated?

Tags:

haskell

parsec

I am following an incredibly detailed Parsec tutorial. However, some examples do not work as expected, e.g.,

ghci> parseWithWhitespace simpleExpr5 "(1+2)"
Left (line 1, column 3):
unexpected "+"
expecting digit or ")"

Is it because the tutorial is outdated? Has anyone tried it recently?

like image 798
sinoTrinity Avatar asked Sep 02 '25 07:09

sinoTrinity


1 Answers

There is a typo in the tutorial. term5 should be

term5 = term simpleExpr5
like image 176
sinoTrinity Avatar answered Sep 05 '25 00:09

sinoTrinity