aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/parser/environment.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/control/parser/environment.lux')
-rw-r--r--stdlib/source/library/lux/control/parser/environment.lux44
1 files changed, 0 insertions, 44 deletions
diff --git a/stdlib/source/library/lux/control/parser/environment.lux b/stdlib/source/library/lux/control/parser/environment.lux
deleted file mode 100644
index df9bf0fbc..000000000
--- a/stdlib/source/library/lux/control/parser/environment.lux
+++ /dev/null
@@ -1,44 +0,0 @@
-(.require
- [library
- [lux (.except)
- [control
- ["[0]" try (.only Try)]
- ["[0]" exception (.only exception)]]
- [data
- ["[0]" product]
- ["[0]" text (.only)
- ["%" \\format (.only format)]]
- [collection
- ["[0]" dictionary (.only Dictionary)]]]]]
- ["[0]" //])
-
-(type .public Property
- Text)
-
-(type .public Environment
- (Dictionary Property Text))
-
-(exception .public (unknown_property [property Property])
- (exception.report
- "Property" (%.text property)))
-
-(type .public (Parser a)
- (//.Parser Environment a))
-
-(def .public empty
- Environment
- (dictionary.empty text.hash))
-
-(def .public (property name)
- (-> Property (Parser Text))
- (function (_ environment)
- (case (dictionary.value name environment)
- {.#Some value}
- {try.#Success [environment value]}
-
- {.#None}
- (exception.except ..unknown_property [name]))))
-
-(def .public (result parser environment)
- (All (_ a) (-> (Parser a) Environment (Try a)))
- (at try.monad each product.right (parser environment)))