From 17e7566be51df5e428a6b10e6469201a8a9468da Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 7 Aug 2021 02:20:09 -0400 Subject: Made the be/de macros for (co)monadic expression extensible. --- stdlib/source/specification/compositor/common.lux | 2 +- stdlib/source/specification/compositor/generation/case.lux | 4 ++-- stdlib/source/specification/compositor/generation/common.lux | 2 +- stdlib/source/specification/compositor/generation/function.lux | 2 +- stdlib/source/specification/compositor/generation/structure.lux | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'stdlib/source/specification/compositor') diff --git a/stdlib/source/specification/compositor/common.lux b/stdlib/source/specification/compositor/common.lux index 0b7c7979a..fdd930ec8 100644 --- a/stdlib/source/specification/compositor/common.lux +++ b/stdlib/source/specification/compositor/common.lux @@ -73,7 +73,7 @@ [?state (platform.initialize target expander analysis_bundle platform generation_bundle directive_bundle program extender)] (in (do try.monad [[directive_bundle directive_state] ?state - #let [generation_state (get@ [#directive.generation + .let [generation_state (get@ [#directive.generation #directive.state] directive_state)]] (in [[directive_bundle directive_state] diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux index 117aab697..0ef6fc025 100644 --- a/stdlib/source/specification/compositor/generation/case.lux +++ b/stdlib/source/specification/compositor/generation/case.lux @@ -68,7 +68,7 @@ [size ..size idx (|> r.nat (\ ! map (n.% size))) [subS subP] case - #let [unitS (synthesis.text synthesis.unit) + .let [unitS (synthesis.text synthesis.unit) caseS (synthesis.tuple (list.concat (list (list.repeat idx unitS) (list subS) @@ -83,7 +83,7 @@ [size ..size idx (|> r.nat (\ ! map (n.% size))) [subS subP] case - #let [right? (tail? size idx) + .let [right? (tail? size idx) caseS (synthesis.variant {#analysis.lefts idx #analysis.right? right? diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index c13cd9eae..e17692b30 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -181,7 +181,7 @@ sample_alpha (|> (r.ascii/alpha sample_size) (r.only (|>> (text\= sample_upper) not))) char_idx (|> r.nat (\ ! map (n.% sample_size))) - #let [sample_lowerS (synthesis.text sample_lower) + .let [sample_lowerS (synthesis.text sample_lower) sample_upperS (synthesis.text sample_upper) sample_alphaS (synthesis.text sample_alpha) concatenatedS (#synthesis.Extension "lux text concat" (list sample_lowerS sample_upperS)) diff --git a/stdlib/source/specification/compositor/generation/function.lux b/stdlib/source/specification/compositor/generation/function.lux index 5be34bfa5..3589cdf28 100644 --- a/stdlib/source/specification/compositor/generation/function.lux +++ b/stdlib/source/specification/compositor/generation/function.lux @@ -53,7 +53,7 @@ [[arity local functionS] ..function partial_arity (|> r.nat (\ ! map (|>> (n.% arity) (n.max 1)))) inputs (r.list arity r.safe_frac) - #let [expectation (maybe.assume (list.item (dec local) inputs)) + .let [expectation (maybe.assume (list.item (dec local) inputs)) inputsS (list\map (|>> synthesis.f64) inputs)]] ($_ _.and (_.test "Can read arguments." diff --git a/stdlib/source/specification/compositor/generation/structure.lux b/stdlib/source/specification/compositor/generation/structure.lux index 4cc4f0676..46c25c8a3 100644 --- a/stdlib/source/specification/compositor/generation/structure.lux +++ b/stdlib/source/specification/compositor/generation/structure.lux @@ -33,7 +33,7 @@ (do {! r.monad} [num_tags (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) tag_in (|> r.nat (\ ! map (n.% num_tags))) - #let [last?_in (|> num_tags dec (n.= tag_in))] + .let [last?_in (|> num_tags dec (n.= tag_in))] value_in r.i64] (_.test (%.name (name_of synthesis.variant)) (|> (synthesis.variant {#analysis.lefts (if last?_in @@ -76,7 +76,7 @@ (and (n.= size (array.size tuple_out)) (list.every? (function (_ [left right]) (i.= left (:as Int right))) - (list.zipped/2 tuple_in (array.to_list tuple_out))))) + (list.zipped/2 tuple_in (array.list tuple_out))))) (#try.Failure _) false))))) -- cgit v1.2.3