aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library')
-rw-r--r--stdlib/source/library/lux/target/jvm/encoding/signed.lux2
-rw-r--r--stdlib/source/library/lux/target/ruby.lux3
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux13
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux5
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux52
5 files changed, 38 insertions, 37 deletions
diff --git a/stdlib/source/library/lux/target/jvm/encoding/signed.lux b/stdlib/source/library/lux/target/jvm/encoding/signed.lux
index 027174fd1..f4f664878 100644
--- a/stdlib/source/library/lux/target/jvm/encoding/signed.lux
+++ b/stdlib/source/library/lux/target/jvm/encoding/signed.lux
@@ -61,7 +61,7 @@
(def: .public <constructor>
(-> Int (Try <name>))
(let [positive (:representation <maximum>)
- negative (|> <bytes> (n.* i64.bits_per_byte) i64.mask i64.not)]
+ negative (i64.not positive)]
(function (_ value)
(if (i.= (if (i.< +0 value)
(i64.or negative value)
diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux
index 22cad3f00..eb3c30c2f 100644
--- a/stdlib/source/library/lux/target/ruby.lux
+++ b/stdlib/source/library/lux/target/ruby.lux
@@ -117,7 +117,8 @@
GVar
(..global <ruby_name>))]
- ["@" latest_error]
+ ["!" latest_error_message]
+ ["@" latest_error_location]
["_" last_string_read]
["." last_line_number_read]
["&" last_string_matched]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
index 84a4838b9..568e061a6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
@@ -94,14 +94,14 @@
(def: .public (install extender name handler)
(All (_ s i o)
- (-> (Extender s i o) Text (Handler s i o) (Operation s i o Any)))
+ (-> (Extender s i o) Name (Handler s i o) (Operation s i o Any)))
(function (_ [bundle state])
- (case (dictionary.value name bundle)
- {.#None}
- {try.#Success [[(dictionary.has name (extender handler) bundle) state]
+ (case (dictionary.has' name (extender handler) bundle)
+ {try.#Success bundle'}
+ {try.#Success [[bundle' state]
[]]}
- _
+ {try.#Failure _}
(exception.except ..cannot_overwrite name))))
(def: .public (with extender extensions)
@@ -172,8 +172,7 @@
(def: .public (lifted action)
(All (_ s i o v)
- (-> (//.Operation s v)
- (//.Operation [(Bundle s i o) s] v)))
+ (-> (//.Operation s v) (Operation s i o v)))
(function (_ [bundle state])
(case (action state)
{try.#Success [state' output]}
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux
index 25e88f063..aa59d8b01 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux
@@ -118,7 +118,7 @@
($_ _.composite
(_.set_label @branch)
branchG
- (_.goto @end))])))
+ (_.when_continuous (_.goto @end)))])))
conditionalsS))
.let [table (|> conditionalsG+
(list#each product.left)
@@ -134,7 +134,8 @@
conditionalsG
(_.set_label @else)
elseG
- (_.set_label @end)
+ (<| (_.when_acknowledged @end)
+ (_.set_label @end))
)))))]))
(def: (lux::is [referenceG sampleG])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
index e93e347e1..bd202b113 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
@@ -25,30 +25,30 @@
... [file-name, line, column] to keep track of their provenance and
... location, which is helpful for documentation and debugging.
(.using
- [library
- [lux "*"
- ["@" target]
- [abstract
- monad]
- [control
- ["[0]" maybe]
- ["[0]" exception {"+" exception:}]
- [parser
- [text {"+" Offset}]]]
- [data
- ["[0]" text
- ["%" format {"+" format}]]
- [collection
- ["[0]" list]
- ["[0]" dictionary {"+" Dictionary}]]]
- [macro
- ["[0]" template]]
- [math
- [number
- ["n" nat]
- ["[0]" int]
- ["[0]" rev]
- ["[0]" frac]]]]])
+ [library
+ [lux "*"
+ ["@" target]
+ [abstract
+ monad]
+ [control
+ ["[0]" maybe]
+ ["[0]" exception {"+" exception:}]
+ [parser
+ [text {"+" Offset}]]]
+ [data
+ ["[0]" text
+ ["%" format {"+" format}]]
+ [collection
+ ["[0]" list]
+ ["[0]" dictionary {"+" Dictionary}]]]
+ [macro
+ ["[0]" template]]
+ [math
+ [number
+ ["n" nat]
+ ["[0]" int]
+ ["[0]" rev]
+ ["[0]" frac]]]]])
(template: (inline: <declaration> <type> <body>)
[(for [@.python (def: <declaration> <type> <body>)
@@ -583,5 +583,5 @@
... Symbol
(!full_symbol_parser offset/0 [<consume_1>] where aliases .#Symbol))
)))
- )))
- ))
+ ))))
+ )