diff options
| author | Matthew Hall <hallmatthew314@gmail.com> | 2023-02-18 16:22:54 +1300 |
|---|---|---|
| committer | Matthew Hall <hallmatthew314@gmail.com> | 2023-02-18 16:22:54 +1300 |
| commit | f8a928d18371e0b67741f5d75b8154d1c105327b (patch) | |
| tree | 78853084e99e2a0cc7fbc0112ef9c7010ec53e1e /DSL/BaseParsers.hs | |
| parent | 69276220df02d2c226021d79ee4a4fd173ae85ee (diff) | |
Introduce procs
Diffstat (limited to 'DSL/BaseParsers.hs')
| -rw-r--r-- | DSL/BaseParsers.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/DSL/BaseParsers.hs b/DSL/BaseParsers.hs index b4b5234..4da9c38 100644 --- a/DSL/BaseParsers.hs +++ b/DSL/BaseParsers.hs @@ -81,6 +81,9 @@ chain p q = do phrase :: Parser t a -> Parser t a phrase = (<* eof) +plus :: Parser t a -> Parser t b -> Parser t (a, b) +plus = liftA2 (,) + recover :: a -> Parser t a -> Parser t a recover x p = p <|> pure x |
