From ae4c0a4746d59b552ebeba166a43ce756dd265af Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 6 Nov 2022 20:52:21 -0400 Subject: More efficient code-generation for text composition. --- stdlib/source/library/lux.lux | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'stdlib/source/library/lux.lux') diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index d8ef5fd2f..9250c2cc6 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -1260,8 +1260,8 @@ (def' .private quantification_level Text (.text_composite# double_quote - (.text_composite# "quantification_level" - double_quote))) + "quantification_level" + double_quote)) (def' .private quantified {#Function Code Code} @@ -4295,7 +4295,7 @@ (function (again left right) (when (..text#split_by pattern right) {#Some [pre post]} - (again (all .text_composite# left pre replacement) post) + (again (.text_composite# left pre replacement) post) {#None} (.text_composite# left right)))) @@ -4303,7 +4303,7 @@ (def (alias_stand_in index) (-> Nat Text) - (all .text_composite# "[" (nat#encoded index) "]")) + (.text_composite# "[" (nat#encoded index) "]")) (def (module_alias context aliased) (-> (List Text) Text Text) @@ -4368,7 +4368,7 @@ (when (relative_ups 0 module) 0 (meta#in (if nested? - (all .text_composite# relative_root ..module_separator module) + (.text_composite# relative_root ..module_separator module) module)) relatives @@ -4385,10 +4385,9 @@ 0 prefix _ (all text#composite prefix ..module_separator clean))] (meta#in output)) - (failure (all .text_composite# - "Cannot climb the module hierarchy..." \n - "Importing module: " module \n - " Relative Root: " relative_root \n)))))) + (failure (.text_composite# "Cannot climb the module hierarchy..." \n + "Importing module: " module \n + " Relative Root: " relative_root \n)))))) (def (imports_parser nested? relative_root context imports) (-> Bit Text (List Text) (List Code) (Meta (List Importation))) @@ -5463,10 +5462,10 @@ (do meta#monad [location location .let [[module line column] location - location (all .text_composite# (text#encoded module) "," (nat#encoded line) "," (nat#encoded column)) - message (all .text_composite# "Undefined behavior at " location)]] + location (.text_composite# (text#encoded module) "," (nat#encoded line) "," (nat#encoded column)) + message (.text_composite# "Undefined behavior at " location)]] (exec - (.log!# (all .text_composite# "WARNING: " message)) + (.log!# (.text_composite# "WARNING: " message)) (in (list (` (..panic! (, (text$ message)))))))) _ -- cgit v1.2.3