Commit Graph

12 Commits

Author SHA1 Message Date
Stephen Diehl
1e609fbff1 Merge pull request #65 from sgraf812/master
Added Alternative constraint and made some minor changes
2017-04-19 19:41:59 +01:00
Daniel Steinberg
a80a1543ed "Infix" --> "Prefix" in comment 2015-06-10 13:23:49 -04:00
Sebastian Graf
d86a804a29 DRY + nitpicking 2015-04-25 10:46:54 +02:00
Christian Sievers
7d2ecc4b9a chapter3/calc/Eval.hs: avoid recomputation of normal form in eval 2015-01-30 20:23:57 +01:00
Christian Sievers
11709255c3 chapter3/parsec.hs: change definition of option
Let (<|>) (which equals option) return all parses of the succeeding parser,
as seems to be implied by the description in the chapter on Parsing.

Example:  parse (empty <|> ((unit 'a') `combine` (unit 'b'))) ""
2015-01-30 18:29:15 +01:00
Christian Sievers
ca8b771489 chapter3/parsec.hs: handle ambigous parses in runParser
The text doesn't mention ambigous parses, and the code didn't handle them.
The easiest way to fix the code without necessarily having to write about
this case is to hande it as parse error and merge it with the no parse case
by replacing the [] pattern with _.
2015-01-30 18:20:08 +01:00
Jeffrey Rosenbluth
19bb1520c7 infixOp to prefixOp 2015-01-20 10:48:22 -05:00
Christian Sievers
59f038f3c0 Added transformers to cabal file. 2015-01-18 03:57:47 +01:00
Christian Sievers
607a739074 There is no Type module to import. 2015-01-18 03:40:22 +01:00
Dmitry Ivanov
360ffe84a2 Remove unused var from calculator grammar. 2015-01-07 23:38:08 +06:00
Stephen Diehl
065e55d02d emptyDef -> langDef 2015-01-06 15:32:02 -05:00
Stephen Diehl
9241ebe43c initial commit 2015-01-05 02:54:15 -05:00