summaryrefslogtreecommitdiff
path: root/DSL/BaseParsers.hs
diff options
context:
space:
mode:
Diffstat (limited to 'DSL/BaseParsers.hs')
-rw-r--r--DSL/BaseParsers.hs3
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