aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
authorEduardo Julian2022-11-20 18:55:23 -0400
committerEduardo Julian2022-11-20 18:55:23 -0400
commitdf0e015145981602b3f97113bcfa586b4f6d0757 (patch)
tree3613c83b65df3bc83f6548abb7ad71fc801b434c /stdlib/source/library
parentd4c72c03c1a47fe388ec36e973db17cb95dfdcfb (diff)
Fixed a bug when optimization record access.
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/control/aspect.lux18
-rw-r--r--stdlib/source/library/lux/control/parser.lux6
-rw-r--r--stdlib/source/library/lux/data/color.lux41
-rw-r--r--stdlib/source/library/lux/data/color/cmyk.lux133
-rw-r--r--stdlib/source/library/lux/data/format/tar.lux123
-rw-r--r--stdlib/source/library/lux/ffi/export.js.lux12
-rw-r--r--stdlib/source/library/lux/ffi/export.lua.lux12
-rw-r--r--stdlib/source/library/lux/ffi/export.py.lux14
-rw-r--r--stdlib/source/library/lux/ffi/export.rb.lux12
-rw-r--r--stdlib/source/library/lux/math/modulus.lux2
-rw-r--r--stdlib/source/library/lux/meta.lux6
-rw-r--r--stdlib/source/library/lux/meta/compiler/default/init.lux42
-rw-r--r--stdlib/source/library/lux/meta/compiler/default/platform.lux6
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/analysis/evaluation.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/declaration.lux10
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux6
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux66
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux32
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux38
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/jvm/host.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/when.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/when.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/when.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/when.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/when.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/when.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/when.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/when.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/phase.lux6
-rw-r--r--stdlib/source/library/lux/meta/extension.lux103
-rw-r--r--stdlib/source/library/lux/meta/macro/syntax/definition.lux4
-rw-r--r--stdlib/source/library/lux/meta/type.lux2
-rw-r--r--stdlib/source/library/lux/meta/type/row.lux4
-rw-r--r--stdlib/source/library/lux/world/net/uri/query.lux4
-rw-r--r--stdlib/source/library/lux/world/time.lux2
-rw-r--r--stdlib/source/library/lux/world/time/date.lux4
-rw-r--r--stdlib/source/library/lux/world/time/year.lux2
41 files changed, 426 insertions, 312 deletions
diff --git a/stdlib/source/library/lux/control/aspect.lux b/stdlib/source/library/lux/control/aspect.lux
index df37fce28..f117ded5e 100644
--- a/stdlib/source/library/lux/control/aspect.lux
+++ b/stdlib/source/library/lux/control/aspect.lux
@@ -166,17 +166,17 @@
(-> Symbol (-> [Code .Global] (declaration.Operation anchor expression declaration of))
(declaration.Operation anchor expression declaration of)))
(do phase.monad
- [g!cache (declaration.lifted_analysis
+ [g!cache (declaration.of_analysis
(macro.symbol "g!cache"))
- [exported? global] (declaration.lifted_analysis
+ [exported? global] (declaration.of_analysis
(global_reference name))
.let [cache_name (%.code g!cache)]
- _ (declaration.lifted_analysis
+ _ (declaration.of_analysis
(module.define cache_name [exported? global]))
it (then [g!cache global])
- current_module_name (declaration.lifted_analysis
+ current_module_name (declaration.of_analysis
meta.current_module_name)
- _ (declaration.lifted_analysis
+ _ (declaration.of_analysis
(without_global [current_module_name cache_name]))]
(in it)))
@@ -196,12 +196,12 @@
(-> [Symbol .Global] (declaration.Operation anchor expression declaration of)
(declaration.Operation anchor expression declaration of)))
(do phase.monad
- [[exported? old] (declaration.lifted_analysis
+ [[exported? old] (declaration.of_analysis
(global_reference name))
- _ (declaration.lifted_analysis
+ _ (declaration.of_analysis
(module.override_definition name [exported? new]))
it then
- _ (declaration.lifted_analysis
+ _ (declaration.of_analysis
(module.override_definition name [exported? old]))]
(in it)))
@@ -284,7 +284,7 @@
(declaration (_ phase archive [aspect ?code.any
body ?code.any])
(do [! phase.monad]
- [aspect (declaration.lifted_analysis
+ [aspect (declaration.of_analysis
(meta.eval Aspect aspect))
.let [aspect (as Aspect aspect)]]
(list#mix (function (_ [original value] then)
diff --git a/stdlib/source/library/lux/control/parser.lux b/stdlib/source/library/lux/control/parser.lux
index 0d7fd1217..453c293b4 100644
--- a/stdlib/source/library/lux/control/parser.lux
+++ b/stdlib/source/library/lux/control/parser.lux
@@ -210,8 +210,10 @@
(function (_ input)
{try.#Failure message}))
-(def .public (lifted operation)
- (All (_ s a) (-> (Try a) (Parser s a)))
+(def .public (of_try operation)
+ (All (_ state of)
+ (-> (Try of)
+ (Parser state of)))
(function (_ input)
(when operation
{try.#Success output}
diff --git a/stdlib/source/library/lux/data/color.lux b/stdlib/source/library/lux/data/color.lux
index e2bd180f3..d61e01b02 100644
--- a/stdlib/source/library/lux/data/color.lux
+++ b/stdlib/source/library/lux/data/color.lux
@@ -40,13 +40,6 @@
(type .public HSL
[Frac Frac Frac])
-(type .public CMYK
- (Record
- [#cyan Frac
- #magenta Frac
- #yellow Frac
- #key Frac]))
-
(type .public HSB
[Frac Frac Frac])
@@ -226,40 +219,6 @@
try.trusted
of_rgb)))
-(def .public (cmyk color)
- (-> Color CMYK)
- (let [[red green blue] (rgb color)
- red (..down (rgb.number red))
- green (..down (rgb.number green))
- blue (..down (rgb.number blue))
- key (|> +1.0 (f.- (all f.max red green blue)))
- f (if (f.< +1.0 key)
- (|> +1.0 (f./ (|> +1.0 (f.- key))))
- +0.0)
- cyan (|> +1.0 (f.- red) (f.- key) (f.* f))
- magenta (|> +1.0 (f.- green) (f.- key) (f.* f))
- yellow (|> +1.0 (f.- blue) (f.- key) (f.* f))]
- [#cyan cyan
- #magenta magenta
- #yellow yellow
- #key key]))
-
-(def .public (of_cmyk [cyan magenta yellow key])
- (-> CMYK Color)
- (if (f.= +1.0 key)
- ..black
- (let [red (|> (|> +1.0 (f.- cyan))
- (f.* (|> +1.0 (f.- key))))
- green (|> (|> +1.0 (f.- magenta))
- (f.* (|> +1.0 (f.- key))))
- blue (|> (|> +1.0 (f.- yellow))
- (f.* (|> +1.0 (f.- key))))]
- (|> (rgb.rgb (..up red)
- (..up green)
- (..up blue))
- try.trusted
- of_rgb))))
-
(def (normal ratio)
(-> Frac Frac)
(cond (f.> +1.0 ratio)
diff --git a/stdlib/source/library/lux/data/color/cmyk.lux b/stdlib/source/library/lux/data/color/cmyk.lux
new file mode 100644
index 000000000..3e22ab333
--- /dev/null
+++ b/stdlib/source/library/lux/data/color/cmyk.lux
@@ -0,0 +1,133 @@
+(.require
+ [library
+ [lux (.except)
+ [abstract
+ [equivalence (.only Equivalence)]]
+ [control
+ ["[0]" try (.only Try)]
+ ["[0]" exception (.only Exception)]]
+ [data
+ [text
+ ["%" \\format]]]
+ [math
+ [number
+ ["f" frac]
+ ["[0]" int]]]
+ [meta
+ [type
+ ["[0]" primitive]]]]]
+ [//
+ ["[0]" rgb (.only RGB)]])
+
+(with_expansions [<min> +0.0
+ <max> +1.0]
+ (primitive.def .public Value
+ Frac
+
+ (with_template [<number> <name>]
+ [(def .public <name>
+ Value
+ (primitive.abstraction <number>))]
+
+ [<min> least]
+ [<max> most]
+ )
+
+ (exception.def .public (invalid it)
+ (Exception Frac)
+ (exception.report
+ (list ["Minimum" (%.frac (primitive.representation ..least))]
+ ["Maximum" (%.frac (primitive.representation ..most))]
+ ["Value" (%.frac it)])))
+
+ (def .public (value it)
+ (-> Frac
+ (Try Value))
+ (if (or (f.> (primitive.representation ..most)
+ it)
+ (f.< (primitive.representation ..least)
+ it))
+ (exception.except ..invalid [it])
+ {try.#Success (primitive.abstraction it)}))
+
+ (def .public number
+ (-> Value
+ Frac)
+ (|>> primitive.representation))
+
+ (type .public CMYK
+ (Record
+ [#cyan Value
+ #magenta Value
+ #yellow Value
+ #key Value]))
+
+ (def .public equivalence
+ (Equivalence CMYK)
+ (implementation
+ (def (= [cR mR yR kR] [cS mS yS kS])
+ (and (f.= (primitive.representation cR) (primitive.representation cS))
+ (f.= (primitive.representation mR) (primitive.representation mS))
+ (f.= (primitive.representation yR) (primitive.representation yS))
+ (f.= (primitive.representation kR) (primitive.representation kS))))))
+
+ (def top
+ (-- rgb.limit))
+
+ (def rgb_factor
+ (|> top .int int.frac))
+
+ (def down
+ (-> Nat
+ Frac)
+ (|>> .int int.frac (f./ rgb_factor)))
+
+ (def up
+ (-> Frac
+ Nat)
+ (|>> (f.* rgb_factor) f.int .nat))
+
+ (def (opposite it)
+ (-> Frac
+ Frac)
+ (f.- it <max>))
+
+ (def .public (cmyk it)
+ (-> RGB
+ CMYK)
+ (let [red (..down (rgb.number (the rgb.#red it)))
+ green (..down (rgb.number (the rgb.#green it)))
+ blue (..down (rgb.number (the rgb.#blue it)))
+ key (opposite (all f.max red green blue))
+ f (if (f.< <max> key)
+ (f./ (opposite key)
+ <max>)
+ <min>)
+ cyan (|> <max> (f.- red) (f.- key) (f.* f))
+ magenta (|> <max> (f.- green) (f.- key) (f.* f))
+ yellow (|> <max> (f.- blue) (f.- key) (f.* f))]
+ [#cyan (primitive.abstraction cyan)
+ #magenta (primitive.abstraction magenta)
+ #yellow (primitive.abstraction yellow)
+ #key (primitive.abstraction key)]))
+
+ (def .public (rgb it)
+ (-> CMYK
+ RGB)
+ (when (primitive.representation (the #key it))
+ <max>
+ rgb.black
+
+ key
+ (let [~key (opposite key)
+ red (f.* ~key
+ (opposite (primitive.representation (the #cyan it))))
+ green (f.* ~key
+ (opposite (primitive.representation (the #magenta it))))
+ blue (f.* ~key
+ (opposite (primitive.representation (the #yellow it))))]
+ (|> (rgb.rgb (..up red)
+ (..up green)
+ (..up blue))
+ try.trusted))))
+ ))
diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux
index aaa41f747..8daa5be57 100644
--- a/stdlib/source/library/lux/data/format/tar.lux
+++ b/stdlib/source/library/lux/data/format/tar.lux
@@ -3,7 +3,8 @@
[lux (.except Mode #mode and)
[ffi (.only)]
[abstract
- [monad (.only do)]]
+ [monad (.only do)]
+ [codec (.only Codec)]]
[control
["<>" parser]
["[0]" pipe]
@@ -13,8 +14,8 @@
["[0]" product]
["[0]" binary (.only Binary)
["[1]!" \\unsafe]
- ["[0]" \\format (.only Format) (.use "[1]#[0]" monoid)]
- ["<[1]>" \\parser (.only Parser)]]
+ ["![1]" \\format (.only Format) (.use "[1]#[0]" monoid)]
+ ["?[1]" \\parser (.only Parser)]]
["[0]" text (.only)
[char (.only Char)]
["%" \\format]
@@ -100,7 +101,7 @@
(..octal_padding <size>)
(text.suffix suffix)
(at utf8.codec encoded)
- (\\format.segment padded_size))))
+ (!binary.segment padded_size))))
(def <coercion>
(-> Nat <type>)
@@ -127,12 +128,12 @@
(def small_suffix
(Parser Any)
(do <>.monad
- [pre_end <binary>.bits_8
+ [pre_end ?binary.bits_8
_ (let [expected (`` (char (,, (static ..blank))))]
(<>.assertion (exception.error ..wrong_character [expected pre_end])
(n.= expected pre_end)))
- end <binary>.bits_8
+ end ?binary.bits_8
_ (let [expected (`` (char (,, (static ..null))))]
(<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end)))]
@@ -141,10 +142,10 @@
(def small_parser
(Parser Small)
(do <>.monad
- [digits (<binary>.segment ..small_size)
- digits (<>.lifted (at utf8.codec decoded digits))
+ [digits (?binary.segment ..small_size)
+ digits (<>.of_try (at utf8.codec decoded digits))
_ ..small_suffix]
- (<>.lifted
+ (<>.of_try
(do [! try.monad]
[value (at n.octal decoded digits)]
(..small value)))))
@@ -152,13 +153,13 @@
(def big_parser
(Parser Big)
(do <>.monad
- [digits (<binary>.segment ..big_size)
- digits (<>.lifted (at utf8.codec decoded digits))
- end <binary>.bits_8
+ [digits (?binary.segment ..big_size)
+ digits (<>.of_try (at utf8.codec decoded digits))
+ end ?binary.bits_8
_ (let [expected (`` (char (,, (static ..blank))))]
(<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end)))]
- (<>.lifted
+ (<>.of_try
(do [! try.monad]
[value (at n.octal decoded digits)]
(..big value)))))
@@ -203,15 +204,15 @@
..small_size)]
(|>> representation
(at utf8.codec encoded)
- (\\format.segment padded_size))))
+ (!binary.segment padded_size))))
(def checksum_parser
(Parser [Nat Checksum])
(do <>.monad
- [ascii (<binary>.segment ..small_size)
- digits (<>.lifted (at utf8.codec decoded ascii))
+ [ascii (?binary.segment ..small_size)
+ digits (<>.of_try (at utf8.codec decoded ascii))
_ ..small_suffix
- value (<>.lifted
+ value (<>.of_try
(at n.octal decoded digits))]
(in [value
(abstraction (%.format digits ..checksum_suffix))])))
@@ -288,17 +289,17 @@
(|>> representation
(text.suffix suffix)
(at utf8.codec encoded)
- (\\format.segment padded_size))))
+ (!binary.segment padded_size))))
(def <parser>
(Parser <type>)
(do <>.monad
- [string (<binary>.segment <size>)
- end <binary>.bits_8
+ [string (?binary.segment <size>)
+ end ?binary.bits_8
.let [expected (`` (char (,, (static ..null))))]
_ (<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end))]
- (<>.lifted
+ (<>.of_try
(do [! try.monad]
[text (at utf8.codec decoded (..un_padded string))]
(<in> text)))))
@@ -330,17 +331,17 @@
..magic_size)]
(|>> representation
(at utf8.codec encoded)
- (\\format.segment padded_size))))
+ (!binary.segment padded_size))))
(def magic_parser
(Parser Magic)
(do <>.monad
- [string (<binary>.segment ..magic_size)
- end <binary>.bits_8
+ [string (?binary.segment ..magic_size)
+ end ?binary.bits_8
.let [expected (`` (char (,, (static ..null))))]
_ (<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end))]
- (<>.lifted
+ (<>.of_try
(at try.monad each (|>> abstraction)
(at utf8.codec decoded string)))))
)
@@ -411,7 +412,7 @@
(def link_flag_format
(Format Link_Flag)
(|>> representation
- \\format.bits_8))
+ !binary.bits_8))
(with_expansions [<options> (these [0 old_normal]
[(char "0") normal]
@@ -438,7 +439,7 @@
(def link_flag_parser
(Parser Link_Flag)
(do <>.monad
- [it <binary>.bits_8]
+ [it ?binary.bits_8]
(when (.nat it)
(^.with_template [<value> <link_flag>]
[<value>
@@ -446,7 +447,7 @@
(<options>)
_
- (<>.lifted
+ (<>.of_try
(exception.except ..invalid_link_flag [(.nat it)]))))))
)
@@ -528,7 +529,7 @@
[value (at ! each ..from_small ..small_parser)]
(if (n.> (representation ..maximum_mode)
value)
- (<>.lifted
+ (<>.of_try
(exception.except ..invalid_mode [value]))
(in (abstraction value))))))
)
@@ -542,11 +543,11 @@
(primitive.def .public Content
[Big Binary]
- (def .public (content content)
+ (def .public (content it)
(-> Binary (Try Content))
(do try.monad
- [size (..big (binary!.size content))]
- (in (abstraction [size content]))))
+ [size (..big (binary!.size it))]
+ (in (abstraction [size it]))))
(def from_content
(-> Content [Big Binary])
@@ -569,11 +570,21 @@
[#name Name
#id ID]))
+(def .public no_owner
+ Owner
+ [#name (try.trusted (..name ""))
+ #id ..no_id])
+
(type .public Ownership
(Record
[#user Owner
#group Owner]))
+(def .public no_ownership
+ Ownership
+ [#user ..no_owner
+ #group ..no_owner])
+
(type .public File
[Path Instant Mode Ownership Content])
@@ -631,7 +642,7 @@
(def header_format'
(Format Header)
- (all \\format.and
+ (all !binary.and
..path_format
..mode_format
..small_format
@@ -652,12 +663,12 @@
(Format Header)
(let [checksum (|> header
(has #checksum ..dummy_checksum)
- (\\format.result ..header_format')
+ (!binary.result ..header_format')
..checksum_code)]
(|> header
(has #checksum checksum)
- (\\format.result ..header_format')
- (\\format.segment ..block_size))))
+ (!binary.result ..header_format')
+ (!binary.segment ..block_size))))
(def modification_time
(-> Instant Big)
@@ -670,9 +681,9 @@
(-> Link_Flag (Format File))
(function (_ [path modification_time mode ownership content])
(let [[size content] (..from_content content)
- format (all \\format.and
+ format (all !binary.and
..header_format
- (\\format.segment (..rounded_content_size size)))]
+ (!binary.segment (..rounded_content_size size)))]
(format [[#path path
#mode mode
#user_id (the [#user #id] ownership)
@@ -749,11 +760,11 @@
(Format Tar)
(let [end_of_archive (binary!.empty ..end_of_archive_size)]
(function (_ tar)
- (\\format#composite (sequence#mix (function (_ next total)
- (\\format#composite total (..entry_format next)))
- \\format#identity
- tar)
- (\\format.segment ..end_of_archive_size end_of_archive)))))
+ (!binary#composite (sequence#mix (function (_ next total)
+ (!binary#composite total (..entry_format next)))
+ !binary#identity
+ tar)
+ (!binary.segment ..end_of_archive_size end_of_archive)))))
(exception.def .public (wrong_checksum [expected actual])
(Exception [Nat Nat])
@@ -783,7 +794,7 @@
(def header_parser
(Parser Header)
(do <>.monad
- [binary_header (<>.speculative (<binary>.segment block_size))
+ [binary_header (<>.speculative (?binary.segment block_size))
path ..path_parser
mode ..mode_parser
user_id ..small_parser
@@ -792,7 +803,7 @@
modification_time ..big_parser
[actual checksum_code] ..checksum_parser
_ (let [expected (expected_checksum checksum_code binary_header)]
- (<>.lifted
+ (<>.of_try
(exception.assertion ..wrong_checksum [expected actual]
(n.= expected actual))))
link_flag ..link_flag_parser
@@ -802,7 +813,7 @@
group_name ..name_parser
major_device ..small_parser
minor_device ..small_parser
- _ (<binary>.segment ..header_padding_size)]
+ _ (?binary.segment ..header_padding_size)]
(in [#path path
#mode mode
#user_id user_id
@@ -823,9 +834,9 @@
(do <>.monad
[.let [size (the #size header)
rounded_size (..rounded_content_size size)]
- content (<binary>.segment (..from_big size))
- content (<>.lifted (..content content))
- _ (<binary>.segment (n.- (..from_big size) rounded_size))]
+ content (?binary.segment (..from_big size))
+ content (<>.of_try (..content content))
+ _ (?binary.segment (n.- (..from_big size) rounded_size))]
(in [(the #path header)
(|> header
(the #modification_time)
@@ -863,9 +874,9 @@
(def end_of_archive_block_parser
(Parser Any)
(do <>.monad
- [block (<binary>.segment ..block_size)]
+ [block (?binary.segment ..block_size)]
(let [actual (..checksum block)]
- (<>.lifted
+ (<>.of_try
(exception.assertion ..wrong_checksum [0 actual]
(n.= 0 actual))))))
@@ -875,8 +886,8 @@
(Parser Any)
(do <>.monad
[_ (<>.at_most 2 end_of_archive_block_parser)
- done? <binary>.end?]
- (<>.lifted
+ done? ?binary.end?]
+ (<>.of_try
(exception.assertion ..invalid_end_of_archive []
done?))))
@@ -885,3 +896,9 @@
(|> (<>.some ..entry_parser)
(at <>.monad each sequence.of_list)
(<>.before ..end_of_archive_parser)))
+
+(def .public codec
+ (Codec Binary Tar)
+ (implementation
+ (def encoded (!binary.result ..format))
+ (def decoded (?binary.result ..parser))))
diff --git a/stdlib/source/library/lux/ffi/export.js.lux b/stdlib/source/library/lux/ffi/export.js.lux
index 1a54cb8ee..0ca0d157f 100644
--- a/stdlib/source/library/lux/ffi/export.js.lux
+++ b/stdlib/source/library/lux/ffi/export.js.lux
@@ -45,7 +45,7 @@
(all <>.and
<code>.local
<code>.any)))
- meta.lifted))
+ meta.of_try))
(with_expansions [<extension> (static.random (|>> %.nat (%.format "js export ") code.text)
random.nat)]
@@ -53,23 +53,23 @@
term <code>.any])
(do [! phase.monad]
[next declaration.analysis
- [_ term] (<| declaration.lifted_analysis
+ [_ term] (<| declaration.of_analysis
type.inferring
(next archive term))
next declaration.synthesis
- term (declaration.lifted_synthesis
+ term (declaration.of_synthesis
(next archive term))
- dependencies (declaration.lifted_translation
+ dependencies (declaration.of_translation
(dependency.dependencies archive term))
next declaration.translation
- [interim_artifacts term] (declaration.lifted_translation
+ [interim_artifacts term] (declaration.of_translation
(translation.with_interim_artifacts archive
(next archive term)))
- _ (declaration.lifted_translation
+ _ (declaration.of_translation
(do !
[@self (translation.learn_custom name (list#mix set.has dependencies interim_artifacts))
.let [$module (/.var "module")
diff --git a/stdlib/source/library/lux/ffi/export.lua.lux b/stdlib/source/library/lux/ffi/export.lua.lux
index 3153f1d47..64a94c874 100644
--- a/stdlib/source/library/lux/ffi/export.lua.lux
+++ b/stdlib/source/library/lux/ffi/export.lua.lux
@@ -45,7 +45,7 @@
(all <>.and
<code>.local
<code>.any)))
- meta.lifted))
+ meta.of_try))
... [15.2 – Privacy](https://www.lua.org/pil/15.2.html)
... [15.3 – Packages and Files](https://www.lua.org/pil/15.3.html)
@@ -57,23 +57,23 @@
term <code>.any])
(do [! phase.monad]
[next declaration.analysis
- [_ term] (<| declaration.lifted_analysis
+ [_ term] (<| declaration.of_analysis
type.inferring
(next archive term))
next declaration.synthesis
- term (declaration.lifted_synthesis
+ term (declaration.of_synthesis
(next archive term))
- dependencies (declaration.lifted_translation
+ dependencies (declaration.of_translation
(dependency.dependencies archive term))
next declaration.translation
- [interim_artifacts term] (declaration.lifted_translation
+ [interim_artifacts term] (declaration.of_translation
(translation.with_interim_artifacts archive
(next archive term)))
- _ (declaration.lifted_translation
+ _ (declaration.of_translation
(do !
[@self (translation.learn_custom name (list#mix set.has dependencies interim_artifacts))
.let [$exports (/.var "_REQUIREDNAME")
diff --git a/stdlib/source/library/lux/ffi/export.py.lux b/stdlib/source/library/lux/ffi/export.py.lux
index d46e632aa..21266bc51 100644
--- a/stdlib/source/library/lux/ffi/export.py.lux
+++ b/stdlib/source/library/lux/ffi/export.py.lux
@@ -42,31 +42,31 @@
(all <>.and
<code>.local
<code>.any)))
- meta.lifted))
+ meta.of_try))
(def .public export_one
(declaration (_ phase archive [name <code>.text
term <code>.any])
(do [! phase.monad]
[next declaration.analysis
- [_ term] (<| declaration.lifted_analysis
+ [_ term] (<| declaration.of_analysis
type.inferring
(next archive term))
- lux (declaration.lifted_analysis meta.compiler_state)
+ lux (declaration.of_analysis meta.compiler_state)
next declaration.synthesis
- term (declaration.lifted_synthesis
+ term (declaration.of_synthesis
(next lux archive term))
- dependencies (declaration.lifted_translation
+ dependencies (declaration.of_translation
(dependency.dependencies archive term))
next declaration.translation
- [interim_artifacts term] (declaration.lifted_translation
+ [interim_artifacts term] (declaration.of_translation
(translation.with_interim_artifacts archive
(next lux archive term)))
- _ (declaration.lifted_translation
+ _ (declaration.of_translation
(do !
[@self (translation.learn_custom name (list#mix set.has dependencies interim_artifacts))
.let [code (/.set (list (/.item (/.string name) /.globals/0)) term)]
diff --git a/stdlib/source/library/lux/ffi/export.rb.lux b/stdlib/source/library/lux/ffi/export.rb.lux
index 5d3fff361..023338afe 100644
--- a/stdlib/source/library/lux/ffi/export.rb.lux
+++ b/stdlib/source/library/lux/ffi/export.rb.lux
@@ -83,7 +83,7 @@
(all <>.and
(<text>.then ..name <code>.local)
<code>.any)))
- meta.lifted))
+ meta.of_try))
(with_expansions [<extension> (static.random (|>> %.nat (%.format "ruby export ") code.text)
random.nat)]
@@ -92,23 +92,23 @@
term <code>.any])
(do [! phase.monad]
[next declaration.analysis
- [type term] (<| declaration.lifted_analysis
+ [type term] (<| declaration.of_analysis
analysis.inferring
(next archive term))
next declaration.synthesis
- term (declaration.lifted_synthesis
+ term (declaration.of_synthesis
(next archive term))
- dependencies (declaration.lifted_translation
+ dependencies (declaration.of_translation
(dependency.dependencies archive term))
next declaration.translation
- [interim_artifacts term] (declaration.lifted_translation
+ [interim_artifacts term] (declaration.of_translation
(translation.with_interim_artifacts archive
(next archive term)))
- _ (declaration.lifted_translation
+ _ (declaration.of_translation
(do !
[@self (translation.learn_custom name (list#mix set.has dependencies interim_artifacts))
.let [[:input:/* :output:] (type.flat_function type)
diff --git a/stdlib/source/library/lux/math/modulus.lux b/stdlib/source/library/lux/math/modulus.lux
index ca56d9d74..ed7e5eb59 100644
--- a/stdlib/source/library/lux/math/modulus.lux
+++ b/stdlib/source/library/lux/math/modulus.lux
@@ -47,7 +47,7 @@
(def .public literal
(syntax (_ [divisor <code>.int])
- (meta.lifted
+ (meta.of_try
(do try.monad
[_ (..modulus divisor)]
(in (list (` (try.trusted (..modulus (, (code.int divisor)))))))))))
diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux
index 57476530a..fc31b8659 100644
--- a/stdlib/source/library/lux/meta.lux
+++ b/stdlib/source/library/lux/meta.lux
@@ -718,8 +718,10 @@
{.#Default _}
def_name))))
-(def .public (lifted result)
- (All (_ a) (-> (Try a) (Meta a)))
+(def .public (of_try result)
+ (All (_ of)
+ (-> (Try of)
+ (Meta of)))
(when result
{try.#Success output}
(at ..monad in output)
diff --git a/stdlib/source/library/lux/meta/compiler/default/init.lux b/stdlib/source/library/lux/meta/compiler/default/init.lux
index 2999dad49..d4c342829 100644
--- a/stdlib/source/library/lux/meta/compiler/default/init.lux
+++ b/stdlib/source/library/lux/meta/compiler/default/init.lux
@@ -107,7 +107,7 @@
dictionary.entries
(monad.each !
(function (_ [name handler])
- (///declaration.lifted_analysis
+ (///declaration.of_analysis
(moduleA.override_definition [.prelude name] [true {.#Default [.Analysis handler]}])))))]
(in [])))
@@ -119,7 +119,7 @@
dictionary.entries
(monad.each !
(function (_ [name handler])
- (///declaration.lifted_analysis
+ (///declaration.of_analysis
(moduleA.override_definition [.prelude name] [true {.#Default [.Synthesis handler]}])))))]
(in [])))
@@ -132,7 +132,7 @@
dictionary.entries
(monad.each !
(function (_ [name handler])
- (///declaration.lifted_analysis
+ (///declaration.of_analysis
(moduleA.override_definition [.prelude name] [true {.#Default [.Translation handler]}])))))]
(in [])))
@@ -146,7 +146,7 @@
(monad.each !
(function (_ [name handler])
(do !
- [_ (///declaration.lifted_analysis
+ [_ (///declaration.of_analysis
(moduleA.override_definition [.prelude name] [true {.#Default [.Declaration handler]}]))]
(in [])))))]
(in [])))
@@ -183,10 +183,10 @@
(do ///phase.monad
[.let [module (the ///.#module input)]
_ (///declaration.set_current_module module)
- _ (///declaration.lifted_analysis
+ _ (///declaration.of_analysis
(moduleA.create hash module))
_ (with_defaults module all_extensions)]
- (///declaration.lifted_analysis
+ (///declaration.of_analysis
(do [! ///phase.monad]
[_ (monad.each ! moduleA.import dependencies)
.let [source (///analysis.source (the ///.#module input) (the ///.#code input))]
@@ -199,14 +199,14 @@
(All (_ anchor expression declaration)
(///declaration.Operation anchor expression declaration [.Module (Payload declaration)])))
(do ///phase.monad
- [_ (///declaration.lifted_analysis
+ [_ (///declaration.of_analysis
(moduleA.set_compiled module))
analysis_module (<| (is (Operation .Module))
- ///declaration.lifted_analysis
+ ///declaration.of_analysis
meta.current_module)
- final_buffer (///declaration.lifted_translation
+ final_buffer (///declaration.of_translation
///translation.buffer)
- final_registry (///declaration.lifted_translation
+ final_registry (///declaration.of_translation
///translation.get_registry)]
(in [analysis_module [final_buffer
final_registry]])))
@@ -218,9 +218,9 @@
(///declaration.Operation anchor expression declaration
(Payload declaration))))
(do ///phase.monad
- [buffer (///declaration.lifted_translation
+ [buffer (///declaration.of_translation
///translation.buffer)
- registry (///declaration.lifted_translation
+ registry (///declaration.of_translation
///translation.get_registry)]
(in [buffer registry])))
@@ -232,9 +232,9 @@
[Requirements (Payload declaration)])))
(do ///phase.monad
[.let [[pre_buffer pre_registry] pre_payoad]
- _ (///declaration.lifted_translation
+ _ (///declaration.of_translation
(///translation.set_buffer pre_buffer))
- _ (///declaration.lifted_translation
+ _ (///declaration.of_translation
(///translation.set_registry pre_registry))
requirements (let [execute! (declarationP.phase wrapper extender expander)]
(execute! archive code))
@@ -247,7 +247,7 @@
(///declaration.Operation anchor expression declaration
[Source Requirements (Payload declaration)])))
(do ///phase.monad
- [[source code] (///declaration.lifted_analysis
+ [[source code] (///declaration.of_analysis
(..read source reader))
[requirements post_payload] (process_declaration wrapper archive extender expander pre_payload code)]
(in [source requirements post_payload])))
@@ -258,7 +258,7 @@
(///declaration.Operation anchor expression declaration
(Maybe [Source Requirements (Payload declaration)]))))
(do ///phase.monad
- [reader (///declaration.lifted_analysis
+ [reader (///declaration.of_analysis
(..reader module aliases source))]
(function (_ state)
(when (///phase.result' state (..iteration' wrapper archive extender expander reader source pre_payload))
@@ -293,7 +293,7 @@
@self (///translation.learn [///program.name {.#None}] true (set.has @program (set.empty unit.hash)))
|program| (global archive [program_module program_definition])
- @module (///phase.lifted (archive.id program_module archive))]
+ @module (///phase.of_try (archive.id program_module archive))]
(///translation.save! @self {.#None} (program [@module @self] |program|))))
(def .public (compiler program global wrapper extender expander prelude write_declaration program_module program_definition
@@ -327,7 +327,7 @@
[_ (if (text#= program_module module)
(when program_definition
{.#Some program_definition}
- (///declaration.lifted_translation
+ (///declaration.of_translation
(define_program! archive program global program_module program_definition))
{.#None}
@@ -358,11 +358,11 @@
(again (<| (///phase.result' state)
(do [! ///phase.monad]
[analysis_module (<| (is (Operation .Module))
- ///declaration.lifted_analysis
+ ///declaration.of_analysis
meta.current_module)
- _ (///declaration.lifted_translation
+ _ (///declaration.of_translation
(///translation.set_buffer temporary_buffer))
- _ (///declaration.lifted_translation
+ _ (///declaration.of_translation
(///translation.set_registry temporary_registry))
_ (|> requirements
(the ///declaration.#referrals)
diff --git a/stdlib/source/library/lux/meta/compiler/default/platform.lux b/stdlib/source/library/lux/meta/compiler/default/platform.lux
index 0e56f0d61..0f95c121a 100644
--- a/stdlib/source/library/lux/meta/compiler/default/platform.lux
+++ b/stdlib/source/library/lux/meta/compiler/default/platform.lux
@@ -178,10 +178,10 @@
(///declaration.Operation <type_vars>
[Archive (archive.Entry .Module)])))
(do phase.monad
- [[registry payload] (///declaration.lifted_translation
+ [[registry payload] (///declaration.of_translation
(..compile_runtime! platform))
.let [entry [..runtime_module payload registry]]
- archive (phase.lifted (if (archive.reserved? archive descriptor.runtime)
+ archive (phase.of_try (if (archive.reserved? archive descriptor.runtime)
(archive.has descriptor.runtime entry archive)
(do try.monad
[[_ archive] (archive.reserve descriptor.runtime archive)]
@@ -193,7 +193,7 @@
(-> .Lux (//init.Extensions <type_vars>)
(///declaration.Operation <type_vars> Any)))
(do [! phase.monad]
- [_ (///declaration.lifted_analysis
+ [_ (///declaration.of_analysis
(///analysis.set_state analysis_state))]
(//init.with_defaults .prelude all_extensions)))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/evaluation.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/evaluation.lux
index 0a6cd7660..8ef79556a 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/evaluation.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/evaluation.lux
@@ -57,7 +57,7 @@
(analysis archive exprC))
module meta.current_module_name
lux meta.compiler_state]
- (<| phase.lifted
+ (<| phase.of_try
(do try.monad
[exprS (|> exprA
(synthesis lux archive)
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/declaration.lux b/stdlib/source/library/lux/meta/compiler/language/lux/declaration.lux
index 43c7d23a4..b0e7db3c2 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/declaration.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/declaration.lux
@@ -90,14 +90,14 @@
(phase.sub [(the [<component> ..#state])
(has [<component> ..#state])]))]
- [lifted_analysis ..#analysis analysis.Operation]
- [lifted_synthesis ..#synthesis synthesis.Operation]
- [lifted_translation ..#translation (translation.Operation anchor expression declaration)]
+ [of_analysis ..#analysis analysis.Operation]
+ [of_synthesis ..#synthesis synthesis.Operation]
+ [of_translation ..#translation (translation.Operation anchor expression declaration)]
)
(def .public (set_current_module module)
(All (_ anchor expression declaration)
(-> Module (Operation anchor expression declaration Any)))
(do phase.monad
- [_ (..lifted_analysis (analysis.set_current_module module))]
- (..lifted_translation (translation.enter_module module))))
+ [_ (..of_analysis (analysis.set_current_module module))]
+ (..of_translation (translation.enter_module module))))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux
index 0c6da0e7b..7646655c1 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux
@@ -70,7 +70,7 @@
function_term
(do phase.monad
- [[type analysis] (/.lifted_analysis
+ [[type analysis] (/.of_analysis
(analysis/type.inferring
(analysis archive function_term)))]
(when analysis
@@ -109,10 +109,10 @@
(|>> {#Done})
(function (_ _)
{.#Some (do !
- [macro (/.lifted_analysis (meta.macro macro|extension))]
+ [macro (/.of_analysis (meta.macro macro|extension))]
(when macro
{.#Some macro}
- (/.lifted_analysis
+ (/.of_analysis
(do !
[expansion (analysis/macro.expansion expander macro|extension macro inputs)]
(in {#More expansion})))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux
index f6da727d8..86f8c8a90 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux
@@ -181,7 +181,7 @@
(def (ensure_fresh_class! class_loader name)
(-> java/lang/ClassLoader External (Operation Any))
(do phase.monad
- [class (phase.lifted (reflection!.load class_loader name))]
+ [class (phase.of_try (reflection!.load class_loader name))]
(phase.assertion ..deprecated_class [name]
(|> class
java/lang/Class::getDeclaredAnnotations
@@ -446,7 +446,7 @@
(|> objectJ
..signature
(<text>.result parser.array)
- phase.lifted)))
+ phase.of_try)))
(def (primitive_array_length_handler primitive_type)
(-> (Type Primitive) (-> Text Handler))
@@ -863,7 +863,7 @@
[exceptionT exceptionA] (typeA.inferring
(analyse archive exceptionC))
[exception_class _] (check_object exceptionT)
- ? (phase.lifted (reflection!.sub? class_loader "java.lang.Throwable" exception_class))
+ ? (phase.of_try (reflection!.sub? class_loader "java.lang.Throwable" exception_class))
_ (is (Operation Any)
(if ?
(in [])
@@ -880,7 +880,7 @@
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
_ (typeA.inference {.#Primitive "java.lang.Class" (list {.#Primitive class (list)})})
- _ (phase.lifted (reflection!.load class_loader class))
+ _ (phase.of_try (reflection!.load class_loader class))
@ meta.location]
(in [@ {/////analysis.#Extension [.prelude (%.format extension_name "|translation")]
(list (/////analysis.text @ class))}])))]))
@@ -896,7 +896,7 @@
[objectT objectA] (typeA.inferring
(analyse archive objectC))
[object_class _] (check_object objectT)
- ? (phase.lifted (reflection!.sub? class_loader object_class sub_class))
+ ? (phase.of_try (reflection!.sub? class_loader object_class sub_class))
@ meta.location]
(if ?
(in [@ {/////analysis.#Extension [.prelude (%.format extension_name "|translation")]
@@ -906,14 +906,14 @@
(def (class_candidate_parents class_loader from_name fromT to_name to_class)
(-> java/lang/ClassLoader External .Type External (java/lang/Class java/lang/Object) (Operation (List [[Text .Type] Bit])))
(do [! phase.monad]
- [from_class (phase.lifted (reflection!.load class_loader from_name))
- mapping (phase.lifted (reflection!.correspond from_class fromT))]
+ [from_class (phase.of_try (reflection!.load class_loader from_name))
+ mapping (phase.of_try (reflection!.correspond from_class fromT))]
(monad.each !
(function (_ superJT)
(do !
- [superJT (phase.lifted (reflection!.type superJT))
+ [superJT (phase.of_try (reflection!.type superJT))
.let [super_name (..reflection superJT)]
- super_class (phase.lifted (reflection!.load class_loader super_name))
+ super_class (phase.of_try (reflection!.load class_loader super_name))
superT (reflection_type mapping superJT)]
(in [[super_name superT] (java/lang/Class::isAssignableFrom super_class to_class)])))
(when (java/lang/Class::getGenericSuperclass from_class)
@@ -964,8 +964,8 @@
(not (dictionary.key? ..boxes from_name)))
_ (phase.assertion ..primitives_are_not_objects [to_name]
(not (dictionary.key? ..boxes to_name)))
- to_class (phase.lifted (reflection!.load class_loader to_name))
- from_class (phase.lifted (reflection!.load class_loader from_name))]
+ to_class (phase.of_try (reflection!.load class_loader to_name))
+ from_class (phase.of_try (reflection!.load class_loader from_name))]
(if (java/lang/Class::isAssignableFrom from_class to_class)
(loop (again [[current_name currentT] [from_name fromT]])
(if (text#= to_name current_name)
@@ -1014,7 +1014,7 @@
(function (_ extension_name analyse archive [class field])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
- [final? deprecated? fieldJT] (phase.lifted
+ [final? deprecated? fieldJT] (phase.of_try
(do try.monad
[class (reflection!.load class_loader class)]
(reflection!.static_field field class)))
@@ -1036,7 +1036,7 @@
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
_ (typeA.inference Any)
- [final? deprecated? fieldJT] (phase.lifted
+ [final? deprecated? fieldJT] (phase.of_try
(do try.monad
[class (reflection!.load class_loader class)]
(reflection!.static_field field class)))
@@ -1063,7 +1063,7 @@
[_ (..ensure_fresh_class! class_loader class)
[objectT objectA] (typeA.inferring
(analyse archive objectC))
- [deprecated? mapping fieldJT] (phase.lifted
+ [deprecated? mapping fieldJT] (phase.of_try
(do try.monad
[class (reflection!.load class_loader class)
[final? deprecated? fieldJT] (reflection!.virtual_field field class)
@@ -1090,7 +1090,7 @@
[objectT objectA] (typeA.inferring
(analyse archive objectC))
_ (typeA.inference objectT)
- [final? deprecated? mapping fieldJT] (phase.lifted
+ [final? deprecated? mapping fieldJT] (phase.of_try
(do try.monad
[class (reflection!.load class_loader class)
[final? deprecated? fieldJT] (reflection!.virtual_field field class)
@@ -1153,7 +1153,7 @@
[parameters (|> (java/lang/reflect/Method::getGenericParameterTypes method)
(array.list {.#None})
(monad.each try.monad reflection!.type)
- phase.lifted)
+ phase.of_try)
.let [modifiers (java/lang/reflect/Method::getModifiers method)
correct_class? (java/lang/Class::isAssignableFrom class (java/lang/reflect/Method::getDeclaringClass method))
correct_method? (text#= method_name (java/lang/reflect/Method::getName method))
@@ -1187,7 +1187,7 @@
[parameters (|> (java/lang/reflect/Constructor::getGenericParameterTypes constructor)
(array.list {.#None})
(monad.each try.monad reflection!.type)
- phase.lifted)]
+ phase.of_try)]
(in (and (java/lang/Object::equals class (java/lang/reflect/Constructor::getDeclaringClass constructor))
(n.= (list.size inputsJT) (list.size parameters))
(list.every? (function (_ [expectedJC actualJC])
@@ -1255,19 +1255,19 @@
(do [! phase.monad]
[inputsT (|> (java/lang/reflect/Method::getGenericParameterTypes method)
(array.list {.#None})
- (monad.each ! (|>> reflection!.type phase.lifted))
+ (monad.each ! (|>> reflection!.type phase.of_try))
(phase#each (monad.each ! (..reflection_type mapping)))
phase#conjoint)
outputT (|> method
..return_type
- phase.lifted
+ phase.of_try
(phase#each (..reflection_return mapping))
phase#conjoint)
.let [concrete_exceptions (..concrete_method_exceptions method)]
concrete_exceptions (monad.each ! (..reflection_type mapping) concrete_exceptions)
generic_exceptions (|> (java/lang/reflect/Method::getGenericExceptionTypes method)
(array.list {.#None})
- (monad.each ! (|>> reflection!.type phase.lifted))
+ (monad.each ! (|>> reflection!.type phase.of_try))
(phase#each (monad.each ! (..reflection_type mapping)))
phase#conjoint)
.let [methodT (<| (type.univ_q (dictionary.size mapping))
@@ -1298,14 +1298,14 @@
(do [! phase.monad]
[inputsT (|> (java/lang/reflect/Constructor::getGenericParameterTypes constructor)
(array.list {.#None})
- (monad.each ! (|>> reflection!.type phase.lifted))
+ (monad.each ! (|>> reflection!.type phase.of_try))
(phase#each (monad.each ! (reflection_type mapping)))
phase#conjoint)
.let [concrete_exceptions (..concrete_constructor_exceptions constructor)]
concrete_exceptions (monad.each ! (..reflection_type mapping) concrete_exceptions)
generic_exceptions (|> (java/lang/reflect/Constructor::getGenericExceptionTypes constructor)
(array.list {.#None})
- (monad.each ! (|>> reflection!.type phase.lifted))
+ (monad.each ! (|>> reflection!.type phase.of_try))
(phase#each (monad.each ! (reflection_type mapping)))
phase#conjoint)
.let [objectT {.#Primitive (java/lang/Class::getName owner) owner_tvarsT}
@@ -1391,7 +1391,7 @@
(def (method_candidate allow_inheritance? class_loader actual_class_tvars class_name actual_method_tvars method_name method_style inputsJT)
(-> Bit java/lang/ClassLoader (List (Type Var)) External (List (Type Var)) Text Method_Style (List (Type Value)) (Operation Method_Signature))
(do [! phase.monad]
- [class (phase.lifted (reflection!.load class_loader class_name))
+ [class (phase.of_try (reflection!.load class_loader class_name))
.let [expected_class_tvars (class_type_variables class)]
candidates (|> (if allow_inheritance?
(all_declared_methods class)
@@ -1426,7 +1426,7 @@
(def (constructor_candidate class_loader actual_class_tvars class_name actual_method_tvars inputsJT)
(-> java/lang/ClassLoader (List (Type Var)) External (List (Type Var)) (List (Type Value)) (Operation Method_Signature))
(do [! phase.monad]
- [class (phase.lifted (reflection!.load class_loader class_name))
+ [class (phase.of_try (reflection!.load class_loader class_name))
.let [expected_class_tvars (class_type_variables class)]
candidates (|> class
java/lang/Class::getConstructors
@@ -1559,7 +1559,7 @@
(do phase.monad
[_ (..ensure_fresh_class! class_loader class_name)
.let [argsT (list#each product.left argsTC)]
- class (phase.lifted (reflection!.load class_loader class_name))
+ class (phase.of_try (reflection!.load class_loader class_name))
_ (phase.assertion non_interface class_name
(java/lang/reflect/Modifier::isInterface (java/lang/Class::getModifiers class)))
[methodT deprecated? exceptionsT] (..method_candidate true class_loader class_tvars class_name method_tvars method {#Interface} argsT)
@@ -2272,14 +2272,14 @@
[parent_parameters (|> parent_parameters
(monad.each maybe.monad parser.var?)
try.of_maybe
- phase.lifted)]
+ phase.of_try)]
(|> super_parameters
(monad.each ! (..reflection_type mapping))
(at ! each (|>> (list.zipped_2 parent_parameters)))))
- (phase.lifted (exception.except ..mismatched_super_parameters [parent_name expected_count actual_count]))))
+ (phase.of_try (exception.except ..mismatched_super_parameters [parent_name expected_count actual_count]))))
{.#None}
- (phase.lifted (exception.except ..unknown_super [parent_name supers])))))
+ (phase.of_try (exception.except ..unknown_super [parent_name supers])))))
(def .public (with_override_mapping supers parent_type mapping)
(-> (List (Type Class)) (Type Class) Mapping (Operation Mapping))
@@ -2371,7 +2371,7 @@
(-> java/lang/ClassLoader (Type Class) (Operation Aliasing))
(do phase.monad
[.let [[name actual_parameters] (parser.read_class class)]
- jvm_class (phase.lifted (reflection!.load class_loader name))
+ jvm_class (phase.of_try (reflection!.load class_loader name))
.let [expected_parameters (|> (java/lang/Class::getTypeParameters jvm_class)
(array.list {.#None})
(list#each (|>> java/lang/reflect/TypeVariable::getName)))]
@@ -2397,8 +2397,8 @@
(def .public (require_complete_method_concretion class_loader supers methods)
(-> java/lang/ClassLoader (List (Type Class)) (List (Overriden_Method Code)) (Operation Any))
(do [! phase.monad]
- [required_abstract_methods (phase.lifted (all_abstract_methods class_loader supers))
- available_methods (phase.lifted (all_methods class_loader supers))
+ [required_abstract_methods (phase.of_try (all_abstract_methods class_loader supers))
+ available_methods (phase.of_try (all_methods class_loader supers))
overriden_methods (monad.each ! (function (_ [parent_type method_name
strict_fp? annotations type_vars
self_name arguments return exceptions
@@ -2673,7 +2673,7 @@
id meta.seed]
(in (..anonymous_class_name where id)))
.let [selfT {.#Primitive self_name (list)}]
- mock (<| phase.lifted
+ mock (<| phase.of_try
(..mock [self_name parameters]
super_class
super_interfaces
@@ -2681,7 +2681,7 @@
(list)
(list#each (|>> {#Overriden_Method}) methods)))
... Necessary for reflection to work properly during analysis.
- _ (phase.lifted (at host execute mock))
+ _ (phase.of_try (at host execute mock))
mapping (typeA.check (..class_mapping parameters))
super_classT (typeA.check (luxT.check (luxT.class mapping) (..signature super_class)))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux
index 63c16cafa..bd02f425d 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux
@@ -462,7 +462,7 @@
bodyS (when (list.size arguments)
0 (host.without_fake_parameter bodyS)
_ bodyS)])
- declaration.lifted_translation
+ declaration.of_translation
(do [! phase.monad]
[constructor_argumentsG (monad.each ! (|>> product.right (translate archive))
constructor_argumentsS)
@@ -536,7 +536,7 @@
bodyS (when (list.size arguments)
0 (host.without_fake_parameter bodyS)
_ bodyS)])
- declaration.lifted_translation
+ declaration.of_translation
(do [! phase.monad]
[bodyG (translate archive bodyS)
.let [argumentsT (list#each product.right arguments)]]
@@ -561,7 +561,7 @@
bodyS (when (list.size arguments)
0 (host.without_fake_parameter bodyS)
_ bodyS)])
- declaration.lifted_translation
+ declaration.of_translation
(do [! phase.monad]
[bodyG (translate archive bodyS)
.let [argumentsT (list#each product.right arguments)]]
@@ -586,7 +586,7 @@
(<| (let [[method_name privacy strict_floating_point? annotations method_tvars
arguments returnJ exceptionsJ
bodyS] method])
- declaration.lifted_translation
+ declaration.of_translation
(do [! phase.monad]
[bodyG (translate archive bodyS)
.let [argumentsT (list#each product.right arguments)]]
@@ -646,7 +646,7 @@
(function (_ methodC)
(do phase.monad
[methodA (is (Operation Analysis)
- (declaration.lifted_analysis
+ (declaration.of_analysis
(when methodC
{#Constructor method}
(jvm.analyse_constructor_method analyse archive selfT mapping method)
@@ -663,14 +663,14 @@
{#Abstract_Method method}
(jvm.analyse_abstract_method analyse archive method))))
methodS (is (Operation Synthesis)
- (declaration.lifted_synthesis
+ (declaration.of_synthesis
(synthesize archive methodA)))
- dependencies (declaration.lifted_translation
+ dependencies (declaration.of_translation
(cache.dependencies archive methodS))
methodS' (|> methodS
list
(<synthesis>.result ..method_synthesis)
- phase.lifted)
+ phase.of_try)
methodG (method_translation translate archive super methodS')]
(in [dependencies methodG]))))
@@ -836,14 +836,14 @@
(Parser <type>)
(do [! <>.monad]
[raw <code>.text]
- (<>.lifted (<text>.result <parser> raw))))]
+ (<>.of_try (<text>.result <parser> raw))))]
[class_declaration [External (List (Type Var))] parser.declaration']
)
(def (save_class! name bytecode dependencies)
(-> Text Binary (Set unit.ID) (Operation Any))
- (declaration.lifted_translation
+ (declaration.of_translation
(do [! phase.monad]
[.let [artifact [name bytecode]]
artifact_id (translation.learn_custom name dependencies)
@@ -877,7 +877,7 @@
type_declaration (signature.inheritance (list#each type.signature parameters)
(type.signature super)
(list#each type.signature interfaces))]
- mock (<| phase.lifted
+ mock (<| phase.of_try
(..mock class_declaration
super
interfaces
@@ -885,9 +885,9 @@
fields
methods))
... Necessary for reflection to work properly during analysis.
- _ (declaration.lifted_translation
+ _ (declaration.of_translation
(translation.execute! mock))
- parameters (declaration.lifted_analysis
+ parameters (declaration.of_analysis
(typeA.check (jvm.parameter_types parameters)))
.let [mapping (list#mix (function (_ [parameterJ parameterT] mapping)
(dictionary.has (parser.name parameterJ) parameterT mapping))
@@ -903,7 +903,7 @@
methods)
.let [all_dependencies (cache.all (list#each product.left methods))]
bytecode (<| (at ! each (\\format.result class.format))
- phase.lifted
+ phase.of_try
(class.class version.v6_0
(all modifier#composite
class.public
@@ -939,10 +939,10 @@
(<code>.tuple (<>.some ..annotation))
(<>.some jvm.method_declaration))
(function (_ phase archive [[name parameters] supers annotations method_declarations])
- (declaration.lifted_translation
+ (declaration.of_translation
(do [! phase.monad]
[bytecode (<| (at ! each (\\format.result class.format))
- phase.lifted
+ phase.of_try
(class.class version.v6_0
(all modifier#composite
class.public
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux
index f9df8a9c7..c024f832a 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux
@@ -88,7 +88,7 @@
Type
Synthesis
(Operation anchor expression declaration [Type expression Any])))
- (/////declaration.lifted_translation
+ (/////declaration.of_translation
(do phase.monad
[module /////translation.module
id /////translation.next
@@ -106,12 +106,12 @@
analysis (the [/////declaration.#analysis /////declaration.#phase] state)
synthesis ((the [/////declaration.#synthesis /////declaration.#phase] state) analysis_state)
translation ((the [/////declaration.#translation /////declaration.#phase] state) analysis_state)]
- [_ codeA] (<| /////declaration.lifted_analysis
+ [_ codeA] (<| /////declaration.of_analysis
scope.with
typeA.fresh
(typeA.expecting type)
(analysis archive codeC))
- codeS (/////declaration.lifted_synthesis
+ codeS (/////declaration.of_synthesis
(synthesis archive codeA))]
(evaluate!' archive translation type codeS)))
@@ -124,7 +124,7 @@
Type
Synthesis
(Operation anchor expression declaration [Type expression Any])))
- (/////declaration.lifted_translation
+ (/////declaration.of_translation
(do phase.monad
[dependencies (cache/artifact.dependencies archive codeS)
[interim_artifacts codeG] (/////translation.with_interim_artifacts archive
@@ -137,7 +137,7 @@
_
{.#None})]
- @module (phase.lifted (archive.id module archive))
+ @module (phase.of_try (archive.id module archive))
@self (/////translation.learn [name @abstraction] false (list#mix set.has dependencies interim_artifacts))
[target_name value declaration] (/////translation.define! [@module @self] {.#None} [(maybe#each product.right @abstraction) codeG])
_ (/////translation.save! @self {.#None} declaration)]
@@ -153,7 +153,7 @@
analysis (the [/////declaration.#analysis /////declaration.#phase] state)
synthesis ((the [/////declaration.#synthesis /////declaration.#phase] state) analysis_state)
translation ((the [/////declaration.#translation /////declaration.#phase] state) analysis_state)]
- [_ code//type codeA] (/////declaration.lifted_analysis
+ [_ code//type codeA] (/////declaration.of_analysis
(scope.with
(typeA.fresh
(when expected
@@ -169,7 +169,7 @@
[codeA (<| (typeA.expecting expected)
(analysis archive codeC))]
(in [expected codeA]))))))
- codeS (/////declaration.lifted_synthesis
+ codeS (/////declaration.of_synthesis
(synthesis archive codeA))]
(definition' archive translation name code//type codeS)))
@@ -184,13 +184,13 @@
Synthesis
(Operation anchor expression declaration [expression Any])))
(do phase.monad
- [current_module (/////declaration.lifted_analysis meta.current_module_name)]
- (/////declaration.lifted_translation
+ [current_module (/////declaration.of_analysis meta.current_module_name)]
+ (/////declaration.of_translation
(do phase.monad
[dependencies (cache/artifact.dependencies archive codeS)
[interim_artifacts codeG] (/////translation.with_interim_artifacts archive
(translation archive codeS))
- @module (phase.lifted (archive.id current_module archive))
+ @module (phase.of_try (archive.id current_module archive))
@self (<learn> extension (list#mix set.has dependencies interim_artifacts))
[target_name value declaration] (/////translation.define! [@module @self] {.#None} [{.#None} codeG])
_ (/////translation.save! @self {.#None} declaration)]
@@ -206,12 +206,12 @@
analysis (the [/////declaration.#analysis /////declaration.#phase] state)
synthesis ((the [/////declaration.#synthesis /////declaration.#phase] state) analysis_state)
translation ((the [/////declaration.#translation /////declaration.#phase] state) analysis_state)]
- [_ codeA] (<| /////declaration.lifted_analysis
+ [_ codeA] (<| /////declaration.of_analysis
scope.with
typeA.fresh
(typeA.expecting codeT)
(analysis archive codeC))
- codeS (/////declaration.lifted_synthesis
+ codeS (/////declaration.of_synthesis
(synthesis archive codeA))]
(<partial> archive translation extension codeT codeS)))]
@@ -232,7 +232,7 @@
(the [/////declaration.#synthesis /////declaration.#phase] state)]
[(the [/////declaration.#translation /////declaration.#state] state)
(the [/////declaration.#translation /////declaration.#phase] state)])]
- _ (/////declaration.lifted_analysis
+ _ (/////declaration.of_analysis
(do !
[_ (moduleA.override_definition [.prelude "is#"] [true {.#Default [.Analysis (analysisE.is#_extension eval "is#")]}])
_ (moduleA.override_definition [.prelude "as#"] [true {.#Default [.Analysis (analysisE.as#_extension eval "as#")]}])]
@@ -242,7 +242,7 @@
(def (announce_definition! short type)
(All (_ anchor expression declaration)
(-> Text Type (Operation anchor expression declaration Any)))
- (/////declaration.lifted_translation
+ (/////declaration.of_translation
(/////translation.log! (format short " : " (%.type type)))))
(def lux::def
@@ -256,7 +256,7 @@
[_ ..refresh
state phase.state
.let [analysis (the [/////declaration.#analysis /////declaration.#phase] state)]
- [code//type codeA] (<| /////declaration.lifted_analysis
+ [code//type codeA] (<| /////declaration.of_analysis
typeA.fresh
typeA.inferring
(analysis archive valueC))
@@ -267,18 +267,18 @@
_
(undefined))]
- _ (/////declaration.lifted_analysis
+ _ (/////declaration.of_analysis
(moduleA.define short_name [(as Bit exported?) {.#Alias original}]))]
(in /////declaration.no_requirements))
_
(do phase.monad
[_ ..refresh
- current_module (/////declaration.lifted_analysis meta.current_module_name)
+ current_module (/////declaration.of_analysis meta.current_module_name)
.let [full_name [current_module short_name]]
[type valueT value] (..definition archive full_name {.#None} valueC)
[_ _ exported?] (evaluate! archive Bit exported?C)
- _ (/////declaration.lifted_analysis
+ _ (/////declaration.of_analysis
(moduleA.define short_name [(as Bit exported?) {.#Definition [type value]}]))
_ (..announce_definition! short_name type)]
(in /////declaration.no_requirements))))]))
@@ -295,7 +295,7 @@
[..imports
(function (_ phase archive imports)
(do [! phase.monad]
- [_ (/////declaration.lifted_analysis
+ [_ (/////declaration.of_analysis
(monad.each ! (function (_ [module alias])
(do !
[_ (moduleA.import module)]
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/jvm/host.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/jvm/host.lux
index c2eafe2a2..57d0c3bbc 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/jvm/host.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/jvm/host.lux
@@ -1333,7 +1333,7 @@
(list#each (normalized_method global_mapping))
(monad.each ! (method_definition translate archive artifact_id)))
bytecode (<| (at ! each (\\format.result class.format))
- //////.lifted
+ //////.of_try
(class.class version.v6_0 (all modifier#composite class.public class.final)
(name.internal anonymous_class_name)
{.#None}
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis.lux
index a840feeb8..825a2e8d6 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis.lux
@@ -106,4 +106,4 @@
(-> Extender Lux Phase)
(do phase.monad
[synthesis (..optimization extender lux archive analysis)]
- (phase.lifted (/variable.optimization synthesis))))
+ (phase.of_try (/variable.optimization synthesis))))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/when.lux
index 98248e985..2a9141d88 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/when.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/when.lux
@@ -297,7 +297,7 @@
path
(///#in (when input
(/.branch/get @ [sub_path sub_input])
- (/.branch/get @ [(list#composite path sub_path) sub_input])
+ (/.branch/get @ [(list#composite sub_path path) sub_input])
_
(/.branch/get @ [path input])))))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/when.lux
index 2e959853a..44ea85f03 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/when.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/when.lux
@@ -105,7 +105,7 @@
(//runtime.tuple//left (_.i32 (.int (the member.#lefts side)))))]
(method source)))
valueO
- (list.reversed pathP)))))
+ pathP))))
(def @savepoint (_.var "lux_pm_cursor_savepoint"))
(def @cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
index f009e3fe3..33135b11a 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
@@ -121,7 +121,7 @@
.let [function_class (//runtime.class_name function_context)]
[fields methods instance] (..with translate archive @begin function_class environment arity bodyG)
module translation.module
- class (phase.lifted (class.class version.v6_0
+ class (phase.of_try (class.class version.v6_0
..modifier
(name.internal function_class)
{.#None}
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux
index 7629e3031..04f4efff7 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux
@@ -310,7 +310,7 @@
so_far!
next!)))
record!
- (list.reversed path)))))
+ path))))
(def .public (when phase archive [valueS path])
(Translator [Synthesis Path])
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/when.lux
index 318fde486..d9ada6190 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/when.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/when.lux
@@ -91,7 +91,7 @@
(//runtime.tuple//left (_.int (.int (the member.#lefts side)))))]
(method source)))
valueO
- (list.reversed pathP)))))
+ pathP))))
(def .public (if expression archive [testS thenS elseS])
(Translator [Synthesis Synthesis Synthesis])
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/when.lux
index 3bab8fc81..098cd0d48 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/when.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/when.lux
@@ -95,7 +95,7 @@
[.#Right //runtime.tuple//right]))]
(method source)))
valueG
- (list.reversed pathP)))))
+ pathP))))
(def @savepoint (_.var "lux_pm_savepoint"))
(def @cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/when.lux
index 9dadc3fab..b1fbb6fec 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/when.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/when.lux
@@ -119,7 +119,7 @@
(method (_.int (.int (the member.#lefts side)))
source)))
valueO
- (list.reversed pathP)))))
+ pathP))))
(def @savepoint (_.var "lux_pm_savepoint"))
(def @cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/when.lux
index 09638b0f5..1f0b1b16a 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/when.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/when.lux
@@ -77,7 +77,7 @@
[.#Right //runtime.tuple::right]))]
(method source)))
valueO
- (list.reversed pathP)))))
+ pathP))))
(def $savepoint (_.var "lux_pm_cursor_savepoint"))
(def $cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/when.lux
index 9e6575e64..ab9c20baa 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/when.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/when.lux
@@ -117,7 +117,7 @@
(//runtime.tuple//left (_.int (.int (the member.#lefts side)))))]
(method source)))
valueO
- (list.reversed pathP)))))
+ pathP))))
(def @savepoint (_.local "lux_pm_savepoint"))
(def @cursor (_.local "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/when.lux
index 9e6baef9a..ad7e4ca51 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/when.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/when.lux
@@ -75,7 +75,7 @@
[.#Right //runtime.tuple//right]))]
(method source)))
valueO
- (list.reversed pathP)))))
+ pathP))))
(def @savepoint (_.var "lux_pm_cursor_savepoint"))
(def @cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux
index 3068bb35a..8778ecd01 100644
--- a/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux
+++ b/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux
@@ -74,7 +74,7 @@
.let [expected (key.signature key)]
_ (if (signature#= expected actual)
(in [])
- (<>.lifted (exception.except ..invalid_signature [expected actual])))
+ (<>.of_try (exception.except ..invalid_signature [expected actual])))
it it]
(in (abstraction [actual it]))))
)
diff --git a/stdlib/source/library/lux/meta/compiler/phase.lux b/stdlib/source/library/lux/meta/compiler/phase.lux
index d67fb5633..ee0f650f0 100644
--- a/stdlib/source/library/lux/meta/compiler/phase.lux
+++ b/stdlib/source/library/lux/meta/compiler/phase.lux
@@ -102,8 +102,10 @@
(All (_ e) (-> (Exception e) e Operation))
(..failure (exception.error exception parameters)))
-(def .public (lifted error)
- (All (_ s a) (-> (Try a) (Operation s a)))
+(def .public (of_try error)
+ (All (_ state of)
+ (-> (Try of)
+ (Operation state of)))
(function (_ state)
(try#each (|>> [state]) error)))
diff --git a/stdlib/source/library/lux/meta/extension.lux b/stdlib/source/library/lux/meta/extension.lux
index 9d43881f1..1f1569c5b 100644
--- a/stdlib/source/library/lux/meta/extension.lux
+++ b/stdlib/source/library/lux/meta/extension.lux
@@ -1,58 +1,57 @@
-(.`` (.`` (.require
- [library
- [lux (.except)
- [abstract
- ["[0]" monad]]
- [control
- ["<>" parser (.use "[1]#[0]" monad)]]
- [data
- ["[0]" product]
- [collection
- ["[0]" list (.use "[1]#[0]" functor)]]]
- [meta
- ["@" target (.only)
- (.,, (.for "JVM"
- [jvm
- ["_" bytecode (.only Bytecode)]]
+(.`` (.require
+ [library
+ [lux (.except)
+ [abstract
+ ["[0]" monad]]
+ [control
+ ["<>" parser (.use "[1]#[0]" monad)]]
+ [data
+ ["[0]" product]
+ [collection
+ ["[0]" list (.use "[1]#[0]" functor)]]]
+ [meta
+ ["@" target (.only)
+ (.,, (.for "JVM"
+ [jvm
+ ["_" bytecode (.only Bytecode)]]
- ... else
- [/]))]
- ["[0]" code (.only)
- ["<c>" \\parser (.only Parser)]]
- [macro (.only with_symbols)
- [syntax (.only syntax)]
- ["[0]" template]]
- [compiler
- ["[0]" phase]
- [language
- [lux
- ["[0]" analysis (.only)
- ["<a>" \\parser]]
- ["[0]" synthesis (.only)
- ["<s>" \\parser]]
- ["[0]" translation]
- ["[0]" declaration]
- [phase
- [translation
- (.,, (.for "JVM"
- ["[0]" jvm
- ["[1]" runtime]]
+ ... else
+ [/]))]
+ ["[0]" code (.only)
+ ["<c>" \\parser (.only Parser)]]
+ [macro (.only with_symbols)
+ [syntax (.only syntax)]
+ ["[0]" template]]
+ [compiler
+ ["[0]" phase]
+ [language
+ [lux
+ ["[0]" analysis (.only)
+ ["<a>" \\parser]]
+ ["[0]" synthesis (.only)
+ ["<s>" \\parser]]
+ ["[0]" translation]
+ ["[0]" declaration]
+ [phase
+ [translation
+ (.,, (.for "{old}"
+ ["[0]" jvm
+ ["[1]" runtime]]
- "JavaScript"
- ["[0]" js
- ["[1]" runtime]]
+ "JVM"
+ ["[0]" jvm
+ ["[1]" runtime]]
- "Lua"
- ["[0]" lua
- ["[1]" runtime]]
-
- "Python"
- ["[0]" python
- ["[1]" runtime]]
-
- "Ruby"
- ["[0]" ruby
- ["[1]" runtime]]))]]]]]]]])))
+ ... else
+ [/]))
+ ["[0]" js
+ ["[1]" runtime]]
+ ["[0]" lua
+ ["[1]" runtime]]
+ ["[0]" python
+ ["[1]" runtime]]
+ ["[0]" ruby
+ ["[1]" runtime]]]]]]]]]]))
(with_template [<any> <end> <and> <result> <name> <extension_type> <handler_type>]
[(def .public <name>
diff --git a/stdlib/source/library/lux/meta/macro/syntax/definition.lux b/stdlib/source/library/lux/meta/macro/syntax/definition.lux
index 6c58ff992..5fdd016f9 100644
--- a/stdlib/source/library/lux/meta/macro/syntax/definition.lux
+++ b/stdlib/source/library/lux/meta/macro/syntax/definition.lux
@@ -70,7 +70,7 @@
me_raw (|> raw
expansion.total
(meta.result compiler)
- <>.lifted)]
+ <>.of_try)]
(<| (<code>.locally me_raw)
<code>.form
(<>.after (<code>.this_symbol ..extension))
@@ -95,5 +95,5 @@
(in [])
{.#Right _}
- (<>.lifted (exception.except ..lacks_type [definition])))]
+ (<>.of_try (exception.except ..lacks_type [definition])))]
(in definition)))
diff --git a/stdlib/source/library/lux/meta/type.lux b/stdlib/source/library/lux/meta/type.lux
index a024a45bc..da2463a52 100644
--- a/stdlib/source/library/lux/meta/type.lux
+++ b/stdlib/source/library/lux/meta/type.lux
@@ -474,7 +474,7 @@
(-> Lux (Parser Typed))
(do <>.monad
[it <code>.any
- type_check (<>.lifted (meta.result lux (expansion.complete it)))]
+ type_check (<>.of_try (meta.result lux (expansion.complete it)))]
(<| (<code>.locally type_check)
<code>.form
(<>.after (<code>.this (` .is#)))
diff --git a/stdlib/source/library/lux/meta/type/row.lux b/stdlib/source/library/lux/meta/type/row.lux
index 3d3ac324d..b33924a27 100644
--- a/stdlib/source/library/lux/meta/type/row.lux
+++ b/stdlib/source/library/lux/meta/type/row.lux
@@ -151,7 +151,7 @@
(` (, record_slot)))))))))
(list.zipped_2 slots slots'))
)))))
- (meta.lifted (exception.except ..cannot_repeat_slot_names [slot_names]))))))
+ (meta.of_try (exception.except ..cannot_repeat_slot_names [slot_names]))))))
(def .public the
(syntax (_ [slot ?code.symbol
@@ -210,7 +210,7 @@
..#extra (, extra)]))
{.#None}
- (meta.lifted (exception.except ..missing_level [level]))))
+ (meta.of_try (exception.except ..missing_level [level]))))
(` [])
(|> (dictionary.size levels)
list.indices
diff --git a/stdlib/source/library/lux/world/net/uri/query.lux b/stdlib/source/library/lux/world/net/uri/query.lux
index 24b03512b..78ca893fe 100644
--- a/stdlib/source/library/lux/world/net/uri/query.lux
+++ b/stdlib/source/library/lux/world/net/uri/query.lux
@@ -74,11 +74,11 @@
(do [! ?.monad]
[key (?text.some (?text.none_of ..invalid))
key (?text.local key ..component)
- key (?.lifted (uri.decoded key))]
+ key (?.of_try (uri.decoded key))]
(?.either (do !
[_ (?text.this ..assignment)
value ..component
- value (?.lifted (uri.decoded value))]
+ value (?.of_try (uri.decoded value))]
(form (dictionary.has key value query)))
(do !
[_ (all ?.or
diff --git a/stdlib/source/library/lux/world/time.lux b/stdlib/source/library/lux/world/time.lux
index b4147a5cb..a1e2cea24 100644
--- a/stdlib/source/library/lux/world/time.lux
+++ b/stdlib/source/library/lux/world/time.lux
@@ -72,7 +72,7 @@
[value <sub_parser>]
(if (n.< <maximum> value)
(in value)
- (<>.lifted (exception.except <exception> [value])))))]
+ (<>.of_try (exception.except <exception> [value])))))]
[..hours hour_parser invalid_hour ..section_parser]
[..minutes minute_parser invalid_minute ..section_parser]
diff --git a/stdlib/source/library/lux/world/time/date.lux b/stdlib/source/library/lux/world/time/date.lux
index 123cfb667..cf6906bee 100644
--- a/stdlib/source/library/lux/world/time/date.lux
+++ b/stdlib/source/library/lux/world/time/date.lux
@@ -166,7 +166,7 @@
[value ..section_parser]
(if (or (n.< <minimum> value)
(n.> <maximum> value))
- (<>.lifted (exception.except <exception> [value]))
+ (<>.of_try (exception.except <exception> [value]))
(in value))))]
[1 12 month_parser invalid_month]
@@ -181,7 +181,7 @@
_ (<text>.this ..separator)
.let [month (maybe.trusted (dictionary.value utc_month ..month_by_number))]
utc_day ..section_parser]
- (<>.lifted (..date utc_year month utc_day))))
+ (<>.of_try (..date utc_year month utc_day))))
(def (format value)
(-> Date Text)
diff --git a/stdlib/source/library/lux/world/time/year.lux b/stdlib/source/library/lux/world/time/year.lux
index 3098270f8..3dd0c9960 100644
--- a/stdlib/source/library/lux/world/time/year.lux
+++ b/stdlib/source/library/lux/world/time/year.lux
@@ -118,7 +118,7 @@
[sign (<>.or (<text>.this "-") (in []))
digits (<text>.many <text>.decimal)
raw_year (<>.codec i.decimal (in (text#composite "+" digits)))]
- (<>.lifted (..year (when sign
+ (<>.of_try (..year (when sign
{.#Left _} (i.* -1 raw_year)
{.#Right _} raw_year)))))