aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/source/library/lux/control/parser/binary.lux10
-rw-r--r--stdlib/source/library/lux/data/format/binary.lux23
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux.lux22
3 files changed, 12 insertions, 43 deletions
diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux
index 1491e0cea..846f952d3 100644
--- a/stdlib/source/library/lux/control/parser/binary.lux
+++ b/stdlib/source/library/lux/control/parser/binary.lux
@@ -123,16 +123,6 @@
(!variant [[0 [#.Left] left]
[1 [#.Right] right]]))
-(def: .public (or/5 p/0 p/1 p/2 p/3 p/4)
- (All (_ p/0 p/1 p/2 p/3 p/4)
- (-> (Parser p/0) (Parser p/1) (Parser p/2) (Parser p/3) (Parser p/4)
- (Parser (Or p/0 p/1 p/2 p/3 p/4))))
- (!variant [[0 [0 #0] p/0]
- [1 [1 #0] p/1]
- [2 [2 #0] p/2]
- [3 [3 #0] p/3]
- [4 [3 #1] p/4]]))
-
(def: .public (rec body)
(All (_ a) (-> (-> (Parser a) (Parser a)) (Parser a)))
(function (_ input)
diff --git a/stdlib/source/library/lux/data/format/binary.lux b/stdlib/source/library/lux/data/format/binary.lux
index e57bbf11c..71aeb6fc6 100644
--- a/stdlib/source/library/lux/data/format/binary.lux
+++ b/stdlib/source/library/lux/data/format/binary.lux
@@ -98,29 +98,6 @@
[1 #.Right right])
)))
-(def: .public (or/5 w/0 w/1 w/2 w/3 w/4)
- (All (_ w/0 w/1 w/2 w/3 w/4)
- (-> (Writer w/0) (Writer w/1) (Writer w/2) (Writer w/3) (Writer w/4)
- (Writer (Or w/0 w/1 w/2 w/3 w/4))))
- (function (_ altV)
- (case altV
- (^template [<number> <tag> <right?> <writer>]
- [(<tag> <right?> caseV)
- (let [[caseS caseT] (<writer> caseV)]
- [(.++ caseS)
- (function (_ [offset binary])
- (|> binary
- (binary.write/8! offset <number>)
- try.trusted
- [(.++ offset)]
- caseT))])])
- ([0 0 #0 w/0]
- [1 1 #0 w/1]
- [2 2 #0 w/2]
- [3 3 #0 w/3]
- [4 3 #1 w/4])
- )))
-
(def: .public (and pre post)
(All (_ a b) (-> (Writer a) (Writer b) (Writer [a b])))
(function (_ [preV postV])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux.lux
index 30465ca7d..8d0ac3171 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux.lux
@@ -36,11 +36,12 @@
alias (: (Writer Alias)
(_.and _.text _.text))
global (: (Writer Global)
- (_.or/5 definition
- global_type
- global_label
- global_label
- alias))]
+ ($_ _.or
+ definition
+ global_type
+ global_label
+ global_label
+ alias))]
($_ _.and
... #module_hash
_.nat
@@ -71,11 +72,12 @@
alias (: (Parser Alias)
(<>.and <b>.text <b>.text))
global (: (Parser Global)
- (<b>.or/5 definition
- global_type
- global_label
- global_label
- alias))]
+ ($_ <b>.or
+ definition
+ global_type
+ global_label
+ global_label
+ alias))]
($_ <>.and
... #module_hash
<b>.nat