From 3289b9dcf9d5d1c1e5c380e3185065c8fd32535f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 16 Aug 2021 01:12:01 -0400 Subject: Made extension-definition macros specify their bindings the same way as syntax:. --- lux-jvm/source/luxc/lang/directive/jvm.lux | 38 +++++++++++----------- lux-jvm/source/luxc/lang/host/jvm/def.lux | 8 ++--- lux-jvm/source/luxc/lang/host/jvm/inst.lux | 6 ++-- .../luxc/lang/translation/jvm/extension/host.lux | 2 +- lux-jvm/source/program.lux | 4 +-- 5 files changed, 29 insertions(+), 29 deletions(-) (limited to 'lux-jvm/source') diff --git a/lux-jvm/source/luxc/lang/directive/jvm.lux b/lux-jvm/source/luxc/lang/directive/jvm.lux index 7f1df4db3..99ac39c78 100644 --- a/lux-jvm/source/luxc/lang/directive/jvm.lux +++ b/lux-jvm/source/luxc/lang/directive/jvm.lux @@ -572,8 +572,8 @@ _ (|> handlerV (..true_handler extender) (extension.install extender (:as Text name)) - directive.lift_generation) - _ (directive.lift_generation + directive.lifted_generation) + _ (directive.lifted_generation (generation.log! (format "Generation " (%.text (:as Text name)))))] (in directive.no_requirements)) @@ -601,7 +601,7 @@ (Parser ) (do {! <>.monad} [raw .text] - (<>.lift (.result raw))))] + (<>.lifted (.result raw))))] [class_declaration Declaration parser.declaration'] [class (Type Class) parser.class] @@ -1012,7 +1012,7 @@ self arguments constructor_argumentsC bodyC] method] analyse directive.analysis] - (directive.lift_analysis + (directive.lifted_analysis (do ! [mapping (//A.with_fresh_type_vars class_tvars luxT.fresh) mapping (//A.with_fresh_type_vars method_tvars mapping) @@ -1047,7 +1047,7 @@ method_tvars self arguments returnJ exceptionsJ bodyC] method] analyse directive.analysis] - (directive.lift_analysis + (directive.lifted_analysis (do ! [mapping (//A.with_fresh_type_vars class_tvars luxT.fresh) .let [parent_type (/type.class super_name super_tvars)] @@ -1077,7 +1077,7 @@ self arguments returnJ exceptionsJ bodyC] method] analyse directive.analysis] - (directive.lift_analysis + (directive.lifted_analysis (do ! [mapping (//A.with_fresh_type_vars class_tvars luxT.fresh) mapping (//A.with_fresh_type_vars method_tvars mapping) @@ -1105,7 +1105,7 @@ arguments returnJ exceptionsJ bodyC] method] analyse directive.analysis] - (directive.lift_analysis + (directive.lifted_analysis (do ! [mapping (//A.with_fresh_type_vars method_tvars luxT.fresh) arguments' (monad.map ! @@ -1160,7 +1160,7 @@ self arguments constructor_argumentsA bodyA] method] synthesise directive.synthesis] - (directive.lift_synthesis + (directive.lifted_synthesis (do ! [constructor_argumentsS (monad.map ! (function (_ [typeJ termA]) (\ ! map (|>> [typeJ]) @@ -1183,7 +1183,7 @@ method_tvars self arguments returnJ exceptionsJ bodyA] method] synthesise directive.synthesis] - (directive.lift_synthesis + (directive.lifted_synthesis (do ! [bodyS (synthesise archive (#analysis.Function (list) (//A.hide_method_body (list.size arguments) bodyA)))] (in [[super_name super_tvars] method_name strict_floating_point? annotations @@ -1202,7 +1202,7 @@ self arguments returnJ exceptionsJ bodyA] method] synthesise directive.synthesis] - (directive.lift_synthesis + (directive.lifted_synthesis (do ! [bodyS (synthesise archive (#analysis.Function (list) (//A.hide_method_body (list.size arguments) bodyA)))] (in [name privacy final? strict_floating_point? annotations method_tvars @@ -1221,7 +1221,7 @@ arguments returnJ exceptionsJ bodyA] method] synthesise directive.synthesis] - (directive.lift_synthesis + (directive.lifted_synthesis (do ! [bodyS (synthesise archive (#analysis.Function (list) (//A.hide_method_body (list.size arguments) bodyA)))] (in [name privacy strict_floating_point? annotations method_tvars @@ -1263,7 +1263,7 @@ self arguments constructor_argumentsS bodyS] method] generate directive.generation] - (directive.lift_generation + (directive.lifted_generation (do ! [constructor_argumentsG (monad.map ! (|>> product.right (generate archive)) constructor_argumentsS) @@ -1297,7 +1297,7 @@ method_tvars self arguments returnJ exceptionsJ bodyS] method] generate directive.generation] - (directive.lift_generation + (directive.lifted_generation (do ! [bodyG (generate archive (//G.hidden_method_body (list.size arguments) bodyS)) .let [argumentsT (list\map product.right arguments)]] @@ -1318,7 +1318,7 @@ self arguments returnJ exceptionsJ bodyS] method] generate directive.generation] - (directive.lift_generation + (directive.lifted_generation (do ! [bodyG (generate archive (//G.hidden_method_body (list.size arguments) bodyS)) .let [argumentsT (list\map product.right arguments)]] @@ -1343,7 +1343,7 @@ arguments returnJ exceptionsJ bodyS] method] generate directive.generation] - (directive.lift_generation + (directive.lifted_generation (do ! [bodyG (generate archive (//G.hidden_method_body (list.size arguments) bodyS)) .let [argumentsT (list\map product.right arguments)]] @@ -1421,14 +1421,14 @@ fields methodsC)] ... Necessary for reflection to work properly during analysis. - _ (directive.lift_generation + _ (directive.lifted_generation (generation.execute! header)) .let [supers (: (List (Type Class)) (list& super_class super_interfaces))] _ (|> methodsC (list.all ..convert_overriden_method) (//A.require_complete_method_concretion class_loader supers) - directive.lift_analysis) + directive.lifted_analysis) methodsA (monad.map ! (method_analysis archive declaration supers) methodsC) methodsS (monad.map ! (method_synthesis archive) methodsA) methodsG (monad.map ! (method_generation archive super_class) methodsS) @@ -1439,7 +1439,7 @@ super_interfaces (def.fuse (list\compose (list\map ..field_header fields) methodsG)))]]] - (directive.lift_generation + (directive.lifted_generation (do ! [artifact_id (generation.learn_custom class_name) _ (generation.execute! directive) @@ -1466,7 +1466,7 @@ (def.abstract_method #jvm.Public jvm.noneM name (/type.method [type_variables arguments return exceptions])))) def.fuse))]]] - (directive.lift_generation + (directive.lifted_generation (do ! [artifact_id (generation.learn_custom class_name) _ (generation.execute! directive) diff --git a/lux-jvm/source/luxc/lang/host/jvm/def.lux b/lux-jvm/source/luxc/lang/host/jvm/def.lux index 064224c6e..f8233222d 100644 --- a/lux-jvm/source/luxc/lang/host/jvm/def.lux +++ b/lux-jvm/source/luxc/lang/host/jvm/def.lux @@ -138,7 +138,7 @@ (param_signature super) (|> interfaces (list@map param_signature) - (text.join_with "")))) + (text.interposed "")))) (def: (constraints_signature constraints super interfaces) (-> (List Constraint) (Type Class) (List (Type Class)) @@ -148,13 +148,13 @@ (format "<" (|> constraints (list@map formal_param) - (text.join_with "")) + (text.interposed "")) ">"))] (format formal_params (..signature super) (|> interfaces (list@map ..signature) - (text.join_with ""))))) + (text.interposed ""))))) (def: class_computes Int @@ -300,4 +300,4 @@ singleton (#.Item head tail) - (function.compose (fuse tail) head))) + (function.composite (fuse tail) head))) diff --git a/lux-jvm/source/luxc/lang/host/jvm/inst.lux b/lux-jvm/source/luxc/lang/host/jvm/inst.lux index 90732578e..0c724ca87 100644 --- a/lux-jvm/source/luxc/lang/host/jvm/inst.lux +++ b/lux-jvm/source/luxc/lang/host/jvm/inst.lux @@ -375,7 +375,7 @@ labels_array (ffi.array org/objectweb/asm/Label array_size) _ (loop [idx 0] (if (n.< array_size idx) - (let [[key label] (maybe.assume (list.item idx keys+labels))] + (let [[key label] (maybe.trusted (list.item idx keys+labels))] (exec (ffi.array_write idx (ffi.long_to_int key) keys_array) (ffi.array_write idx label labels_array) @@ -392,7 +392,7 @@ _ (loop [idx 0] (if (n.< num_labels idx) (exec (ffi.array_write idx - (maybe.assume (list.item idx labels)) + (maybe.trusted (list.item idx labels)) labels_array) (recur (inc idx))) []))] @@ -466,4 +466,4 @@ singleton (#.Item head tail) - (function.compose (fuse tail) head))) + (function.composite (fuse tail) head))) diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux index 492911d40..20962c13d 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux @@ -1115,7 +1115,7 @@ [(synthesis.variable/foreign foreign_id) (|> global_mapping (dictionary.value capture) - maybe.assume)])) + maybe.trusted)])) (dictionary.of_list synthesis.hash))] [ownerT name strict_fp? annotations vars diff --git a/lux-jvm/source/program.lux b/lux-jvm/source/program.lux index 72a245f9d..767101102 100644 --- a/lux-jvm/source/program.lux +++ b/lux-jvm/source/program.lux @@ -213,7 +213,7 @@ [instanceG (function.function' (#.Some [0 (.nat -1)]) expression.translate archive [(list) 4 ..how_to_wrap_a_phase]) phase_wrapper (generation.evaluate! [0 (.nat -2)] instanceG)] (in (function (_ phase) - (<| try.assumed + (<| try.trusted (: (Try java/lang/Object)) (do try.monad [apply_method (|> phase_wrapper @@ -255,7 +255,7 @@ (:as Operation) (function (@self state)) (:as Try) - try.assumed + try.trusted (:as Try) (do try.monad [method (|> handler -- cgit v1.2.3