diff options
Diffstat (limited to '')
19 files changed, 298 insertions, 87 deletions
diff --git a/new-luxc/test/test/luxc/analyser/case.lux b/new-luxc/test/test/luxc/analyser/case.lux index 280c52245..98777b5d6 100644 --- a/new-luxc/test/test/luxc/analyser/case.lux +++ b/new-luxc/test/test/luxc/analyser/case.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data [bool "B/" Eq<Bool>] ["R" result] @@ -61,7 +61,7 @@ ([#;Nat r;nat code;nat] [#;Int r;int code;int] [#;Deg r;deg code;deg] - [#;Real r;real code;real] + [#;Frac r;frac code;frac] [#;Text (r;text +5) code;text]) (^ [_ (#;Tuple (list))]) @@ -72,7 +72,7 @@ [_ (#;Tuple members)] (do r;Monad<Random> - [member-wise-patterns (mapM @ (total-branches-for variantTC) members)] + [member-wise-patterns (monad;map @ (total-branches-for variantTC) members)] (wrap (|> member-wise-patterns total-weaving (L/map code;tuple)))) @@ -81,20 +81,20 @@ (do r;Monad<Random> [#let [ks (L/map product;left kvs) vs (L/map product;right kvs)] - member-wise-patterns (mapM @ (total-branches-for variantTC) vs)] + member-wise-patterns (monad;map @ (total-branches-for variantTC) vs)] (wrap (|> member-wise-patterns total-weaving (L/map (|>. (list;zip2 ks) code;record))))) (^ [_ (#;Form (list [_ (#;Tag _)] _))]) (do r;Monad<Random> - [bundles (mapM @ - (function [[_tag _code]] - (do @ - [v-branches (total-branches-for variantTC _code)] - (wrap (L/map (function [pattern] (` ((~ _tag) (~ pattern)))) - v-branches)))) - variantTC)] + [bundles (monad;map @ + (function [[_tag _code]] + (do @ + [v-branches (total-branches-for variantTC _code)] + (wrap (L/map (function [pattern] (` ((~ _tag) (~ pattern)))) + v-branches)))) + variantTC)] (wrap (L/join bundles))) _ diff --git a/new-luxc/test/test/luxc/analyser/common.lux b/new-luxc/test/test/luxc/analyser/common.lux index 683ede10f..6d701e823 100644 --- a/new-luxc/test/test/luxc/analyser/common.lux +++ b/new-luxc/test/test/luxc/analyser/common.lux @@ -24,7 +24,7 @@ [Nat code;nat r;nat] [Int code;int r;int] [Deg code;deg r;deg] - [Real code;real r;real] + [Frac code;frac r;frac] [Text code;text (r;text +5)] )] ($_ r;either diff --git a/new-luxc/test/test/luxc/analyser/function.lux b/new-luxc/test/test/luxc/analyser/function.lux index 909fb9293..827e9a245 100644 --- a/new-luxc/test/test/luxc/analyser/function.lux +++ b/new-luxc/test/test/luxc/analyser/function.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data ["R" result] [product] diff --git a/new-luxc/test/test/luxc/analyser/primitive.lux b/new-luxc/test/test/luxc/analyser/primitive.lux index f291e2c7f..9c3c1acfe 100644 --- a/new-luxc/test/test/luxc/analyser/primitive.lux +++ b/new-luxc/test/test/luxc/analyser/primitive.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data [bool "B/" Eq<Bool>] [text "T/" Eq<Text>] @@ -31,7 +31,7 @@ %nat% r;nat %int% r;int %deg% r;deg - %real% r;real + %frac% r;frac %text% (r;text +5)] (with-expansions [<tests> (do-template [<desc> <type> <tag> <value> <analyser>] @@ -52,7 +52,7 @@ ["nat" Nat #~;Nat %nat% @;analyse-nat] ["int" Int #~;Int %int% @;analyse-int] ["deg" Deg #~;Deg %deg% @;analyse-deg] - ["real" Real #~;Real %real% @;analyse-real] + ["frac" Frac #~;Frac %frac% @;analyse-frac] ["text" Text #~;Text %text% @;analyse-text] )] ($_ seq diff --git a/new-luxc/test/test/luxc/analyser/procedure/common.lux b/new-luxc/test/test/luxc/analyser/procedure/common.lux index dd099829c..457363106 100644 --- a/new-luxc/test/test/luxc/analyser/procedure/common.lux +++ b/new-luxc/test/test/luxc/analyser/procedure/common.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (concurrency [atom]) (data text/format @@ -127,8 +127,8 @@ (check-success+ "int max" (list) Int)) (test "Can convert integer to natural number." (check-success+ "int to-nat" (list subjectC) Nat)) - (test "Can convert integer to real number." - (check-success+ "int to-real" (list subjectC) Real)) + (test "Can convert integer to frac number." + (check-success+ "int to-frac" (list subjectC) Frac)) )) (context: "Deg procedures" @@ -154,53 +154,53 @@ (check-success+ "deg min" (list) Deg)) (test "Can obtain maximum degree." (check-success+ "deg max" (list) Deg)) - (test "Can convert degree to real number." - (check-success+ "deg to-real" (list subjectC) Real)) + (test "Can convert degree to frac number." + (check-success+ "deg to-frac" (list subjectC) Frac)) (test "Can scale degree." (check-success+ "deg scale" (list subjectC natC) Deg)) (test "Can calculate the reciprocal of a natural number." (check-success+ "deg reciprocal" (list natC) Deg)) )) -(context: "Real procedures" - [subjectC (|> r;real (:: @ map code;real)) - paramC (|> r;real (:: @ map code;real)) +(context: "Frac procedures" + [subjectC (|> r;frac (:: @ map code;frac)) + paramC (|> r;frac (:: @ map code;frac)) encodedC (|> (r;text +5) (:: @ map code;text))] ($_ seq - (test "Can add real numbers." - (check-success+ "real +" (list subjectC paramC) Real)) - (test "Can subtract real numbers." - (check-success+ "real -" (list subjectC paramC) Real)) - (test "Can multiply real numbers." - (check-success+ "real *" (list subjectC paramC) Real)) - (test "Can divide real numbers." - (check-success+ "real /" (list subjectC paramC) Real)) - (test "Can calculate remainder of real numbers." - (check-success+ "real %" (list subjectC paramC) Real)) - (test "Can test equality of real numbers." - (check-success+ "real =" (list subjectC paramC) Bool)) - (test "Can compare real numbers." - (check-success+ "real <" (list subjectC paramC) Bool)) - (test "Can obtain minimum real number." - (check-success+ "real min" (list) Real)) - (test "Can obtain maximum real number." - (check-success+ "real max" (list) Real)) - (test "Can obtain smallest real number." - (check-success+ "real smallest" (list) Real)) + (test "Can add frac numbers." + (check-success+ "frac +" (list subjectC paramC) Frac)) + (test "Can subtract frac numbers." + (check-success+ "frac -" (list subjectC paramC) Frac)) + (test "Can multiply frac numbers." + (check-success+ "frac *" (list subjectC paramC) Frac)) + (test "Can divide frac numbers." + (check-success+ "frac /" (list subjectC paramC) Frac)) + (test "Can calculate remainder of frac numbers." + (check-success+ "frac %" (list subjectC paramC) Frac)) + (test "Can test equality of frac numbers." + (check-success+ "frac =" (list subjectC paramC) Bool)) + (test "Can compare frac numbers." + (check-success+ "frac <" (list subjectC paramC) Bool)) + (test "Can obtain minimum frac number." + (check-success+ "frac min" (list) Frac)) + (test "Can obtain maximum frac number." + (check-success+ "frac max" (list) Frac)) + (test "Can obtain smallest frac number." + (check-success+ "frac smallest" (list) Frac)) (test "Can obtain not-a-number." - (check-success+ "real not-a-number" (list) Real)) + (check-success+ "frac not-a-number" (list) Frac)) (test "Can obtain positive infinity." - (check-success+ "real positive-infinity" (list) Real)) + (check-success+ "frac positive-infinity" (list) Frac)) (test "Can obtain negative infinity." - (check-success+ "real negative-infinity" (list) Real)) - (test "Can convert real number to integer." - (check-success+ "real to-int" (list subjectC) Int)) - (test "Can convert real number to degree." - (check-success+ "real to-deg" (list subjectC) Deg)) - (test "Can convert real number to text." - (check-success+ "real to-text" (list subjectC) Text)) - (test "Can convert text to real number." - (check-success+ "real from-text" (list encodedC) (type (Maybe Real)))) + (check-success+ "frac negative-infinity" (list) Frac)) + (test "Can convert frac number to integer." + (check-success+ "frac to-int" (list subjectC) Int)) + (test "Can convert frac number to degree." + (check-success+ "frac to-deg" (list subjectC) Deg)) + (test "Can convert frac number to text." + (check-success+ "frac encode" (list subjectC) Text)) + (test "Can convert text to frac number." + (check-success+ "frac encode" (list encodedC) (type (Maybe Frac)))) )) (context: "Text procedures" @@ -296,11 +296,11 @@ )) (context: "Math procedures" - [subjectC (|> r;real (:: @ map code;real)) - paramC (|> r;real (:: @ map code;real))] + [subjectC (|> r;frac (:: @ map code;frac)) + paramC (|> r;frac (:: @ map code;frac))] (with-expansions [<unary> (do-template [<proc> <desc>] [(test (format "Can calculate " <desc> ".") - (check-success+ <proc> (list subjectC) Real))] + (check-success+ <proc> (list subjectC) Frac))] ["math cos" "cosine"] ["math sin" "sine"] @@ -320,7 +320,7 @@ ["math round" "rounding"]) <binary> (do-template [<proc> <desc>] [(test (format "Can calculate " <desc> ".") - (check-success+ <proc> (list subjectC paramC) Real))] + (check-success+ <proc> (list subjectC paramC) Frac))] ["math atan2" "inverse/arc tangent (with 2 arguments)"] ["math pow" "power"])] diff --git a/new-luxc/test/test/luxc/analyser/reference.lux b/new-luxc/test/test/luxc/analyser/reference.lux index 9d22088b5..ef5479b64 100644 --- a/new-luxc/test/test/luxc/analyser/reference.lux +++ b/new-luxc/test/test/luxc/analyser/reference.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data ["R" result]) ["r" math/random "R/" Monad<Random>] diff --git a/new-luxc/test/test/luxc/analyser/structure.lux b/new-luxc/test/test/luxc/analyser/structure.lux index 914b1bf3b..d9595492e 100644 --- a/new-luxc/test/test/luxc/analyser/structure.lux +++ b/new-luxc/test/test/luxc/analyser/structure.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data [bool "B/" Eq<Bool>] ["R" result] diff --git a/new-luxc/test/test/luxc/generator/primitive.lux b/new-luxc/test/test/luxc/generator/primitive.lux index 134ff312d..15289b267 100644 --- a/new-luxc/test/test/luxc/generator/primitive.lux +++ b/new-luxc/test/test/luxc/generator/primitive.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data text/format ["R" result] @@ -24,7 +24,7 @@ %nat% r;nat %int% r;int %deg% r;deg - %real% r;real + %frac% r;frac %text% (r;text +5)] (with-expansions [<tests> (do-template [<desc> <type> <synthesis> <sample> <test>] @@ -41,7 +41,7 @@ ["nat" Nat #ls;Nat %nat% n.=] ["int" Int #ls;Int %int% i.=] ["deg" Deg #ls;Deg %deg% d.=] - ["real" Real #ls;Real %real% r.=] + ["frac" Frac #ls;Frac %frac% f.=] ["text" Text #ls;Text %text% T/=])] ($_ seq (test "Can generate unit." diff --git a/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux b/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux index 96cf8ae97..1b150561c 100644 --- a/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux +++ b/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux @@ -1,14 +1,14 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data text/format [bit] ["R" result] [bool "B/" Eq<Bool>] [text "T/" Eq<Text>] - [number "n/" Interval<Nat>] + [number "n/" Interval<Nat> "i/" Interval<Int> "r/" Interval<Frac> "d/" Interval<Deg>] (coll ["a" array] [list])) ["r" math/random "r/" Monad<Random>] @@ -125,3 +125,213 @@ <unary> <binary> ))) + +(context: "Int procedures" + [param (|> r;int (r;filter (|>. (i.= 0) not))) + subject r;int] + (with-expansions [<nullary> (do-template [<name> <reference>] + [(test <name> + (|> (@eval;eval (@;generate (#ls;Procedure <name> (list)))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (i.= <reference> (:! Int valueG)) + + _ + false)))] + + ["int min" i/bottom] + ["int max" i/top] + ) + <unary> (do-template [<name> <type> <prepare> <comp>] + [(test <name> + (|> (@eval;eval (@;generate (#ls;Procedure <name> (list (#ls;Int subject))))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (<comp> (<prepare> subject) (:! <type> valueG)) + + _ + false)))] + + ["int to-nat" Nat int-to-nat n.=] + ["int to-frac" Frac int-to-frac f.=] + ) + <binary> (do-template [<name> <reference> <outputT> <comp>] + [(test <name> + (|> (do Monad<Lux> + [runtime-bytecode @runtime;generate] + (@eval;eval (@;generate (#ls;Procedure <name> + (list (#ls;Int subject) + (#ls;Int param)))))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (<comp> (<reference> param subject) (:! <outputT> valueG)) + + _ + false)))] + + ["int +" i.+ Int i.=] + ["int -" i.- Int i.=] + ["int *" i.* Int i.=] + ["int /" i./ Int i.=] + ["int %" i.% Int i.=] + ["int =" i.= Bool B/=] + ["int <" i.< Bool B/=] + )] + ($_ seq + <nullary> + <unary> + <binary> + ))) + +(context: "Frac procedures" + [param (|> r;frac (r;filter (|>. (f.= 0.0) not))) + subject r;frac] + (with-expansions [<nullary> (do-template [<name> <test>] + [(test <name> + (|> (@eval;eval (@;generate (#ls;Procedure <name> (list)))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (<test> (:! Frac valueG)) + + _ + false)))] + + ["frac min" (f.= r/bottom)] + ["frac max" (f.= r/top)] + ["frac not-a-number" number;not-a-number?] + ["frac positive-infinity" (f.= number;positive-infinity)] + ["frac negative-infinity" (f.= number;negative-infinity)] + ["frac smallest" (f.= (_lux_proc [ "frac" "smallest-value"] []))] + ) + <unary> (do-template [<name> <type> <prepare> <comp>] + [(test <name> + (|> (do Monad<Lux> + [runtime-bytecode @runtime;generate] + (@eval;eval (@;generate (#ls;Procedure <name> (list (#ls;Frac subject)))))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (<comp> (<prepare> subject) (:! <type> valueG)) + + _ + false)))] + + ["frac to-int" Int frac-to-int i.=] + ["frac to-deg" Deg frac-to-deg d.=] + ) + <binary> (do-template [<name> <reference> <outputT> <comp>] + [(test <name> + (|> (do Monad<Lux> + [runtime-bytecode @runtime;generate] + (@eval;eval (@;generate (#ls;Procedure <name> + (list (#ls;Frac subject) + (#ls;Frac param)))))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (<comp> (<reference> param subject) (:! <outputT> valueG)) + + _ + false)))] + + ["frac +" f.+ Frac f.=] + ["frac -" f.- Frac f.=] + ["frac *" f.* Frac f.=] + ["frac /" f./ Frac f.=] + ["frac %" f.% Frac f.=] + ["frac =" f.= Bool B/=] + ["frac <" f.< Bool B/=] + )] + ($_ seq + <nullary> + <unary> + <binary> + (test "frac encode|decode" + (|> (do Monad<Lux> + [runtime-bytecode @runtime;generate] + (@eval;eval (@;generate (|> (#ls;Frac subject) + (list) (#ls;Procedure "frac encode") + (list) (#ls;Procedure "frac decode"))))) + (macro;run (init-compiler [])) + (case> (^multi (#R;Success valueG) + [(:! (Maybe Frac) valueG) (#;Some value)]) + (f.= subject value) + + _ + false))) + ))) + +(context: "Deg procedures" + [param (|> r;deg (r;filter (|>. (d.= .0) not))) + special r;nat + subject r;deg] + (with-expansions [<nullary> (do-template [<name> <reference>] + [(test <name> + (|> (@eval;eval (@;generate (#ls;Procedure <name> (list)))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (d.= <reference> (:! Deg valueG)) + + _ + false)))] + + ["deg min" d/bottom] + ["deg max" d/top] + ) + <unary> (do-template [<name> <type> <prepare> <comp>] + [(test <name> + (|> (do Monad<Lux> + [runtime-bytecode @runtime;generate] + (@eval;eval (@;generate (#ls;Procedure <name> (list (#ls;Deg subject)))))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (<comp> (<prepare> subject) (:! <type> valueG)) + + _ + false)))] + + ["deg to-frac" Frac deg-to-frac f.=] + ) + <binary> (do-template [<name> <reference> <outputT> <comp>] + [(test <name> + (|> (do Monad<Lux> + [runtime-bytecode @runtime;generate] + (@eval;eval (@;generate (#ls;Procedure <name> + (list (#ls;Deg subject) + (#ls;Deg param)))))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (<comp> (<reference> param subject) (:! <outputT> valueG)) + + _ + false)))] + + ["deg +" d.+ Deg d.=] + ["deg -" d.- Deg d.=] + ["deg *" d.* Deg d.=] + ["deg /" d./ Deg d.=] + ["deg %" d.% Deg d.=] + ["deg =" d.= Bool B/=] + ["deg <" d.< Bool B/=] + ) + <special> (do-template [<name> <reference> <outputT> <comp>] + [(test <name> + (|> (do Monad<Lux> + [runtime-bytecode @runtime;generate] + (@eval;eval (@;generate (#ls;Procedure <name> + (list (#ls;Deg subject) + (#ls;Nat special)))))) + (macro;run (init-compiler [])) + (case> (#R;Success valueG) + (<comp> (<reference> special subject) (:! <outputT> valueG)) + + _ + false)))] + + ["deg scale" d.scale Deg d.=] + ["deg reciprocal" d.reciprocal Deg d.=] + )] + ($_ seq + <nullary> + <unary> + <binary> + <special> + ))) diff --git a/new-luxc/test/test/luxc/generator/structure.lux b/new-luxc/test/test/luxc/generator/structure.lux index 51c6c80c7..1e4f14518 100644 --- a/new-luxc/test/test/luxc/generator/structure.lux +++ b/new-luxc/test/test/luxc/generator/structure.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data text/format ["R" result] @@ -31,7 +31,7 @@ (r;either (r/map (|>. #ls;Nat) r;nat) (r/map (|>. #ls;Int) r;int))) (r;either (r;either (r/map (|>. #ls;Deg) r;deg) - (r/map (|>. #ls;Real) r;real)) + (r/map (|>. #ls;Frac) r;frac)) (r/map (|>. #ls;Text) (r;text +5))))) (def: (corresponds? [prediction sample]) @@ -52,7 +52,7 @@ [#ls;Nat Nat n.=] [#ls;Int Int i.=] [#ls;Deg Deg d.=] - [#ls;Real Real r.=] + [#ls;Frac Frac f.=] [#ls;Text Text T/=]) _ diff --git a/new-luxc/test/test/luxc/parser.lux b/new-luxc/test/test/luxc/parser.lux index c90812cc8..7a0b2c278 100644 --- a/new-luxc/test/test/luxc/parser.lux +++ b/new-luxc/test/test/luxc/parser.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad) + (control [monad #+ do]) (data [text "T/" Eq<Text>] (text format ["l" lexer]) @@ -45,7 +45,7 @@ (|> r;nat (r/map (|>. #;Nat [default-cursor]))) (|> r;int (r/map (|>. #;Int [default-cursor]))) (|> r;deg (r/map (|>. #;Deg [default-cursor]))) - (|> r;real (r/map (|>. #;Real [default-cursor]))))) + (|> r;frac (r/map (|>. #;Frac [default-cursor]))))) textual^ (: (r;Random Code) ($_ r;either (do r;Monad<Random> @@ -107,6 +107,7 @@ (wrap (format "#( " comment " )#"))))))) (context: "Multi-line text & comments." + #seed +709318929887591337 [#let [char-gen (|> r;nat (r;filter (function [value] (not (or (text;space? value) (n.= (char "\"") value))))))] diff --git a/new-luxc/test/test/luxc/synthesizer/case.lux b/new-luxc/test/test/luxc/synthesizer/case.lux index 5e1cf2a32..ff60deedb 100644 --- a/new-luxc/test/test/luxc/synthesizer/case.lux +++ b/new-luxc/test/test/luxc/synthesizer/case.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe eq) (data [bool "B/" Eq<Bool>] @@ -30,7 +30,7 @@ [#ls;Nat n.=] [#ls;Int i.=] [#ls;Deg d.=] - [#ls;Real r.=] + [#ls;Frac f.=] [#ls;Text T/=]) _ @@ -51,7 +51,7 @@ [#ls;NatP n.=] [#ls;IntP i.=] [#ls;DegP d.=] - [#ls;RealP r.=] + [#ls;FracP f.=] [#ls;TextP T/=]) (^template [<outer> <inner>] @@ -97,7 +97,7 @@ [gen-nat #ls;NatP r;nat number;Hash<Nat> +5] [gen-int #ls;IntP r;int number;Hash<Int> +5] [gen-deg #ls;DegP r;deg number;Hash<Deg> +5] - [gen-real #ls;RealP r;real number;Hash<Real> +5] + [gen-frac #ls;FracP r;frac number;Hash<Frac> +5] [gen-text #ls;TextP (r;text +5) text;Hash<Text> +5] ) @@ -108,7 +108,7 @@ (r;either gen-nat gen-int)) (r;either (r;either gen-deg - gen-real) + gen-frac) gen-text))) (do-template [<name> <tag> <join>] @@ -158,7 +158,7 @@ [#ls;NatP #la;NatP] [#ls;IntP #la;IntP] [#ls;DegP #la;DegP] - [#ls;RealP #la;RealP] + [#ls;FracP #la;FracP] [#ls;TextP #la;TextP] [#ls;BindP #la;BindP]) diff --git a/new-luxc/test/test/luxc/synthesizer/case/special.lux b/new-luxc/test/test/luxc/synthesizer/case/special.lux index cf2ab9372..112546883 100644 --- a/new-luxc/test/test/luxc/synthesizer/case/special.lux +++ b/new-luxc/test/test/luxc/synthesizer/case/special.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data [product] [number] diff --git a/new-luxc/test/test/luxc/synthesizer/common.lux b/new-luxc/test/test/luxc/synthesizer/common.lux index 88eeaea7c..10b1a88b2 100644 --- a/new-luxc/test/test/luxc/synthesizer/common.lux +++ b/new-luxc/test/test/luxc/synthesizer/common.lux @@ -13,7 +13,7 @@ (r;either (r/map (|>. #la;Nat) r;nat) (r/map (|>. #la;Int) r;int))) (r;either (r;either (r/map (|>. #la;Deg) r;deg) - (r/map (|>. #la;Real) r;real)) + (r/map (|>. #la;Frac) r;frac)) (r/map (|>. #la;Text) (r;text +5))))) (def: #export (corresponds? analysis synthesis) @@ -27,7 +27,7 @@ [#la;Nat #ls;Nat n.=] [#la;Int #ls;Int i.=] [#la;Deg #ls;Deg d.=] - [#la;Real #ls;Real r.=] + [#la;Frac #ls;Frac f.=] [#la;Text #ls;Text T/=]) _ diff --git a/new-luxc/test/test/luxc/synthesizer/function.lux b/new-luxc/test/test/luxc/synthesizer/function.lux index c9d3befee..7257307dc 100644 --- a/new-luxc/test/test/luxc/synthesizer/function.lux +++ b/new-luxc/test/test/luxc/synthesizer/function.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data [product] [number] diff --git a/new-luxc/test/test/luxc/synthesizer/loop.lux b/new-luxc/test/test/luxc/synthesizer/loop.lux index 386f14cfa..45b86ede6 100644 --- a/new-luxc/test/test/luxc/synthesizer/loop.lux +++ b/new-luxc/test/test/luxc/synthesizer/loop.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad) + (control [monad #+ do]) (data [bool "B/" Eq<Bool>] [number] (coll [list "L/" Functor<List> Fold<List>] diff --git a/new-luxc/test/test/luxc/synthesizer/primitive.lux b/new-luxc/test/test/luxc/synthesizer/primitive.lux index e1e37e469..56d088abf 100644 --- a/new-luxc/test/test/luxc/synthesizer/primitive.lux +++ b/new-luxc/test/test/luxc/synthesizer/primitive.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data text/format) ["r" math/random "R/" Monad<Random>] @@ -16,7 +16,7 @@ %nat% r;nat %int% r;int %deg% r;deg - %real% r;real + %frac% r;frac %text% (r;text +5)] (with-expansions [<tests> (do-template [<desc> <analysis> <synthesis> <sample>] @@ -33,7 +33,7 @@ ["nat" #la;Nat #ls;Nat %nat%] ["int" #la;Int #ls;Int %int%] ["deg" #la;Deg #ls;Deg %deg%] - ["real" #la;Real #ls;Real %real%] + ["frac" #la;Frac #ls;Frac %frac%] ["text" #la;Text #ls;Text %text%])] ($_ seq <tests>))) diff --git a/new-luxc/test/test/luxc/synthesizer/procedure.lux b/new-luxc/test/test/luxc/synthesizer/procedure.lux index 91369a59b..b7560ec1c 100644 --- a/new-luxc/test/test/luxc/synthesizer/procedure.lux +++ b/new-luxc/test/test/luxc/synthesizer/procedure.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data [bool "B/" Eq<Bool>] [text "T/" Eq<Text>] diff --git a/new-luxc/test/test/luxc/synthesizer/structure.lux b/new-luxc/test/test/luxc/synthesizer/structure.lux index eba24213e..8cc61d02f 100644 --- a/new-luxc/test/test/luxc/synthesizer/structure.lux +++ b/new-luxc/test/test/luxc/synthesizer/structure.lux @@ -1,7 +1,7 @@ (;module: lux (lux [io] - (control monad + (control [monad #+ do] pipe) (data [bool "B/" Eq<Bool>] [product] |