diff options
10 files changed, 85 insertions, 23 deletions
diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux index 8d2494db7..664e04581 100644 --- a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux +++ b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux @@ -108,7 +108,7 @@ (test "Can convert natural number to integer." (check-success+ "lux nat to-int" (list subjectC) Int)) (test "Can convert natural number to text." - (check-success+ "lux nat to-text" (list subjectC) Text)) + (check-success+ "lux nat char" (list subjectC) Text)) )))) (context: "Int procedures" @@ -264,8 +264,8 @@ (&scope.with-local [var-name arrayT] (&.with-type elemT (@.analyse-procedure analyse evalL.eval "lux array get" - (list idxC - (code.symbol ["" var-name])))))) + (list (code.symbol ["" var-name]) + idxC))))) (macro.run (init-compiler [])) (case> (#e.Success _) true @@ -277,9 +277,9 @@ (&scope.with-local [var-name arrayT] (&.with-type arrayT (@.analyse-procedure analyse evalL.eval "lux array put" - (list idxC - elemC - (code.symbol ["" var-name])))))) + (list (code.symbol ["" var-name]) + idxC + elemC))))) (macro.run (init-compiler [])) (case> (#e.Success _) true @@ -291,8 +291,8 @@ (&scope.with-local [var-name arrayT] (&.with-type arrayT (@.analyse-procedure analyse evalL.eval "lux array remove" - (list idxC - (code.symbol ["" var-name])))))) + (list (code.symbol ["" var-name]) + idxC))))) (macro.run (init-compiler [])) (case> (#e.Success _) true @@ -376,9 +376,9 @@ (&scope.with-local [var-name atomT] (&.with-type Bool (@.analyse-procedure analyse evalL.eval "lux atom compare-and-swap" - (list elemC + (list (code.symbol ["" var-name]) elemC - (code.symbol ["" var-name])))))) + elemC))))) (macro.run (init-compiler [])) (case> (#e.Success _) true @@ -410,13 +410,13 @@ (<| (times +100) (do @ [logC (|> (r.text +5) (:: @ map code.text)) - exitC (|> r.nat (:: @ map code.nat))] + exitC (|> r.int (:: @ map code.int))] ($_ seq (test "Can log messages to standard output." (check-success+ "lux io log" (list logC) Unit)) - (test "Can log messages to standard output." + (test "Can throw a run-time error." (check-success+ "lux io error" (list logC) Bottom)) - (test "Can log messages to standard output." + (test "Can exit the program." (check-success+ "lux io exit" (list exitC) Bottom)) (test "Can query the current time (as milliseconds since epoch)." (check-success+ "lux io current-time" (list) Int)) diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux index 72d1e8bc9..41b2dfaa0 100644 --- a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux @@ -38,6 +38,7 @@ (&.with-scope (&.with-type output-type (@.analyse-procedure analyse evalL.eval procedure params)))) + (&.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success _) <success> diff --git a/new-luxc/test/test/luxc/lang/analysis/type.lux b/new-luxc/test/test/luxc/lang/analysis/type.lux index 6f8a1343a..993cacbdf 100644 --- a/new-luxc/test/test/luxc/lang/analysis/type.lux +++ b/new-luxc/test/test/luxc/lang/analysis/type.lux @@ -57,6 +57,7 @@ (&.with-scope (@common.with-unknown-type (@.analyse-check analyse eval.eval typeC exprC)))) + (&.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success [_ [analysisT analysisA]]) (and (type/= codeT analysisT) @@ -82,6 +83,7 @@ (&.with-scope (@common.with-unknown-type (@.analyse-coerce analyse eval.eval typeC exprC)))) + (&.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success [_ [analysisT analysisA]]) (type/= codeT analysisT) diff --git a/new-luxc/test/test/luxc/lang/translation/case.lux b/new-luxc/test/test/luxc/lang/translation/case.lux index 3bc4664e8..5b3972835 100644 --- a/new-luxc/test/test/luxc/lang/translation/case.lux +++ b/new-luxc/test/test/luxc/lang/translation/case.lux @@ -10,7 +10,8 @@ [macro] (macro [code]) test) - (luxc (lang ["ls" synthesis] + (luxc [lang] + (lang ["ls" synthesis] (translation ["@" case] [".T" expression] ["@." eval] @@ -80,6 +81,7 @@ ("lux case seq" ("lux case bind" +0) ("lux case exec" false)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (:! Bool valueT) @@ -94,6 +96,7 @@ (` ("lux case seq" ("lux case bind" +0) ("lux case exec" (0)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (n/= to-bind (:! Nat valueT)) diff --git a/new-luxc/test/test/luxc/lang/translation/function.lux b/new-luxc/test/test/luxc/lang/translation/function.lux index d61c85f58..7a87e71a1 100644 --- a/new-luxc/test/test/luxc/lang/translation/function.lux +++ b/new-luxc/test/test/luxc/lang/translation/function.lux @@ -13,7 +13,8 @@ (macro [code]) [host] test) - (luxc (lang ["ls" synthesis] + (luxc [lang] + (lang ["ls" synthesis] (translation [".T" expression] ["@." eval] ["@." runtime] @@ -51,6 +52,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` ("lux call" (~ functionS) (~+ argsS))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (n/= arg-value (:! Nat valueT)) @@ -68,6 +70,7 @@ ("lux call" (~ functionS) (~+ preS)) (~+ postS))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (n/= arg-value (:! Nat valueT)) @@ -90,6 +93,7 @@ runtime-bytecode @runtime.translate sampleI (expressionT.translate (` ("lux call" (~ functionS) (~+ argsS))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (n/= arg-value (:! Nat valueT)) diff --git a/new-luxc/test/test/luxc/lang/translation/primitive.lux b/new-luxc/test/test/luxc/lang/translation/primitive.lux index 0d02c5ae7..d6e316036 100644 --- a/new-luxc/test/test/luxc/lang/translation/primitive.lux +++ b/new-luxc/test/test/luxc/lang/translation/primitive.lux @@ -11,7 +11,8 @@ [macro] (macro [code]) test) - (luxc (lang [".L" host] + (luxc [lang] + (lang [".L" host] ["ls" synthesis] (translation [".T" expression] ["@." runtime] @@ -34,11 +35,12 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (<synthesis> <sample>))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<test> <sample> (:! <type> valueT)) - _ + (#e.Error error) false)))] ["bool" Bool code.bool %bool% B/=] @@ -52,6 +54,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (' []))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (is hostL.unit (:! Text valueT)) diff --git a/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux b/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux index bdfae3a78..96cf8b01e 100644 --- a/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux +++ b/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux @@ -16,7 +16,8 @@ (macro [code]) [host] test) - (luxc (lang ["ls" synthesis] + (luxc [lang] + (lang ["ls" synthesis] (translation [".T" expression] ["@." eval] ["@." runtime] @@ -34,6 +35,7 @@ [sampleI (expressionT.translate (` (<name> (~ (code.nat subject)) (~ (code.nat param)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (n/= (<reference> param subject) (:! Nat valueT)) @@ -52,6 +54,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("lux bit count" (~ (code.nat subject)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (n/= (bit.count subject) (:! Nat valueT)) @@ -66,6 +69,7 @@ (~ (code.int (nat-to-int subject))) (~ (code.nat param)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (i/= (bit.signed-shift-right param (nat-to-int subject)) @@ -86,6 +90,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` (<name>)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (n/= <reference> (:! Nat valueT)) @@ -101,6 +106,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` (<name> (~ (code.nat subject)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<comp> (<prepare> subject) (:! <type> valueT)) @@ -108,8 +114,8 @@ _ false)))] - ["lux nat to-int" Int nat-to-int i/=] - ["lux nat to-char" Text text.from-code text/=] + ["lux nat to-int" Int nat-to-int i/=] + ["lux nat char" Text text.from-code text/=] )) (~~ (do-template [<name> <reference> <outputT> <comp>] [(test <name> @@ -117,6 +123,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` (<name> (~ (code.nat subject)) (~ (code.nat param)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<comp> (<reference> param subject) (:! <outputT> valueT)) @@ -144,6 +151,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` (<name>)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (i/= <reference> (:! Int valueT)) @@ -159,6 +167,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` (<name> (~ (code.int subject)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<comp> (<prepare> subject) (:! <type> valueT)) @@ -175,6 +184,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` (<name> (~ (code.int subject)) (~ (code.int param)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<comp> (<reference> param subject) (:! <outputT> valueT)) @@ -207,6 +217,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` (<name> (~ (code.frac subject)) (~ (code.frac param)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<comp> (<reference> param subject) (:! <outputT> valueT)) @@ -236,6 +247,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` (<name>)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<test> (:! Frac valueT)) @@ -256,6 +268,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` (<name> (~ (code.frac subject)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<comp> (<prepare> subject) (:! <type> valueT)) @@ -274,6 +287,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` ("lux frac decode" ("lux frac encode" (~ (code.frac subject))))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (^multi (#e.Success valueT) [(:! (Maybe Frac) valueT) (#.Some value)]) @@ -302,6 +316,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` (<name>)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (d/= <reference> (:! Deg valueT)) @@ -318,6 +333,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` (<name> (~ (code.deg subject)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<comp> (<prepare> subject) (:! <type> valueT)) @@ -333,6 +349,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` (<name> (~ (code.deg subject)) (~ (code.deg param)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<comp> (<reference> param subject) (:! <outputT> valueT)) @@ -354,6 +371,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` (<name> (~ (code.deg subject)) (~ (code.nat special)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<comp> (<reference> special subject) (:! <outputT> valueT)) diff --git a/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux b/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux index 5c188da45..4af912b2a 100644 --- a/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux @@ -16,7 +16,8 @@ (macro [code]) [host] test) - (luxc (lang [".L" host] + (luxc [lang] + (lang [".L" host] ["ls" synthesis] (translation [".T" expression] ["@." eval] @@ -34,6 +35,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (|> (~ (<tag> <sample>)) <step1> <step2> (`)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<test> <sample> (:! <cast> valueT)) @@ -65,6 +67,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> (`)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<test> <sample> (:! <cast> valueT)) @@ -91,6 +94,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> <step4> (`)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<test> <sample> (:! <cast> valueT)) @@ -131,6 +135,7 @@ (<pre> (~ (<tag> subject))) (<pre> (~ (<tag> param)))))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<test> (<reference> param subject) @@ -169,6 +174,7 @@ (<convert> (~ (code.nat subject))) (<convert> (~ (code.nat param)))))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (n/= (<reference> param subject) @@ -202,6 +208,7 @@ (<convert> (~ (<pre> subject))) ("jvm convert long-to-int" (~ (code.nat shift)))))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (<test> (<reference> shift (<pre-subject> subject)) @@ -233,6 +240,7 @@ (<pre> (~ (<tag> subject))) (<pre> (~ (<tag> param))))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (bool/= (<reference> param subject) @@ -290,6 +298,7 @@ <post> (`)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputZ) (<test> <value> (:! <type> outputZ)) @@ -339,6 +348,7 @@ <post> (`)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (<test> <value> (:! <type> outputT)) @@ -366,6 +376,7 @@ ("jvm array read" "java.lang.Double" (~ (code.nat idx))) (`)))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (f/= valueD (:! Frac outputT)) @@ -376,6 +387,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code.nat size))))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (n/= size (:! Nat outputT)) @@ -426,6 +438,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object null?" ("jvm object null"))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (:! Bool outputT) @@ -436,6 +449,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object null?" (~ (code.int sample)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (not (:! Bool outputT)) @@ -446,6 +460,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object synchronized" (~ (code.int monitor)) (~ (code.int sample)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (i/= sample (:! Int outputT)) @@ -460,6 +475,7 @@ "java.lang.Throwable" (~ exception-message$)))))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (case (:! (e.Error Top) outputT) @@ -475,6 +491,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object class" (~ (code.text class)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (|> outputT (:! Class) (Class::getName []) (text/= class)) @@ -485,6 +502,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object instance?" (~ (code.text instance-class)) (~ instance))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (:! Bool outputT) @@ -515,6 +533,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (i/= GregorianCalendar::AD (:! Int outputT)) @@ -526,6 +545,7 @@ [sampleI (expressionT.translate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor" ("jvm member static get" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (is hostL.unit (:! Text outputT)) @@ -536,6 +556,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (text/= sample-string (:! Text outputT)) @@ -548,6 +569,7 @@ ("jvm member virtual put" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ (code.text other-sample-string)) (~ value-memberS)))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (text/= other-sample-string (:! Text outputT)) @@ -573,6 +595,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (i/= sample (:! Int outputT)) @@ -584,6 +607,7 @@ [sampleI (expressionT.translate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean" (~ (code.int sample)) (~ object-longS))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (:! Bool outputT) @@ -595,6 +619,7 @@ [sampleI (expressionT.translate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean" (~ array-listS) (~ object-longS))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (:! Bool outputT) @@ -605,6 +630,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate array-listS)] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success outputT) (host.instance? ArrayList (:! Object outputT)) diff --git a/new-luxc/test/test/luxc/lang/translation/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux index 488000e14..bcdef1a8b 100644 --- a/new-luxc/test/test/luxc/lang/translation/reference.lux +++ b/new-luxc/test/test/luxc/lang/translation/reference.lux @@ -9,7 +9,8 @@ [macro] (macro [code]) test) - (luxc (lang ["_." module] + (luxc [lang] + (lang ["_." module] (host ["$" jvm] (jvm ["$i" inst])) ["ls" synthesis] @@ -50,6 +51,7 @@ (statementT.translate-def def-name Int valueI empty-metaI (' {}))) sampleI (expressionT.translate (code.symbol [module-name def-name]))] (evalT.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (i/= def-value (:! Int valueT)) diff --git a/new-luxc/test/test/luxc/lang/translation/structure.lux b/new-luxc/test/test/luxc/lang/translation/structure.lux index d61ec185f..70e3b5951 100644 --- a/new-luxc/test/test/luxc/lang/translation/structure.lux +++ b/new-luxc/test/test/luxc/lang/translation/structure.lux @@ -15,7 +15,8 @@ (macro [code]) [host] test) - (luxc (lang [".L" host] + (luxc [lang] + (lang [".L" host] ["ls" synthesis] (translation [".T" expression] ["@." eval] @@ -69,6 +70,7 @@ (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (code.tuple members))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (let [valueT (:! (Array Top) valueT)] @@ -90,6 +92,7 @@ [runtime-bytecode @runtime.translate sampleI (expressionT.translate (` ((~ (code.nat tag)) (~ (code.bool last?)) (~ member))))] (@eval.eval sampleI)) + (lang.with-current-module "") (macro.run (init-compiler [])) (case> (#e.Success valueT) (let [valueT (:! (Array Top) valueT)] |