Jake Wheat的“在Haskell中用Parsec解析的介绍”已经过时了吗?

问题描述 投票:3回答:1

我关注an incredibly detailed Parsec tutorial。但是,某些示例不能按预期工作,例如,

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

是因为教程是outdated吗?最近有人试过吗?

haskell parsec
1个回答
4
投票

教程中有一个拼写错误。 term5应该是

term5 = term simpleExpr5
© www.soinside.com 2019 - 2024. All rights reserved.