From 1bbc4251230cee13d46df7b706859e834778aee0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 10 Jul 2022 18:00:23 -0400 Subject: Removed the need for ,! unquoting. --- stdlib/source/test/lux.lux | 186 ++++++++++----------- .../language/lux/phase/analysis/reference.lux | 18 +- .../language/lux/phase/extension/analysis/lux.lux | 2 - 3 files changed, 102 insertions(+), 104 deletions(-) (limited to 'stdlib/source/test') diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 74983c2a1..3d7251c98 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -386,109 +386,109 @@ (,, (for @.old (,, (these)) (_.coverage [/.Source] (..found_crosshair?)))) - (_.coverage [/.require] - (`` (with_expansions [ ("lux in-module" "library/lux" library/lux.refer) - (static.random code.text (random.lower_case 1)) - (static.random code.local (random.lower_case 1)) - (static.random code.text (random.lower_case 2)) - ' (template.symbol []) - (static.random code.text (random.lower_case 3)) - ' (template.symbol []) - (static.random code.text (random.lower_case 4)) - ' (template.symbol []) - (template.text [ "/" ]) - (template.text [// ']) - ' (template.symbol []) - <\\> (template.text [\\ ']) - <\\>' (template.symbol [<\\>]) - (template.text [ "/" ]) - (template.text [ "/" ]) - (template.text [ "/" "/" ]) - (template.text [ "#[0]"])] - (and (,, (with_template [ ] - [(with_expansions [' (macro.final )] - (let [scenario (is (-> Any Bit) - (function (_ _) - ... TODO: Remove this hack once Jython is no longer being used as the Python interpreter. - (`` (for @.python (case (' [']) - (^.` [ - ("lux def" (, [_ {.#Symbol ["" _]}]) [] #0) - (,, (template.spliced ))]) - true - - _ - false) - (case (' [']) - (^.` [ (,, (template.spliced ))]) - true - - _ - false)))))] - (scenario [])))] - - [(.require [']) - ("lux def module" []) - []] + ... (_.coverage [/.require] + ... (`` (with_expansions [ ("lux in-module" "library/lux" library/lux.refer) + ... (static.random code.text (random.lower_case 1)) + ... (static.random code.local (random.lower_case 1)) + ... (static.random code.text (random.lower_case 2)) + ... ' (template.symbol []) + ... (static.random code.text (random.lower_case 3)) + ... ' (template.symbol []) + ... (static.random code.text (random.lower_case 4)) + ... ' (template.symbol []) + ... (template.text [ "/" ]) + ... (template.text [// ']) + ... ' (template.symbol []) + ... <\\> (template.text [\\ ']) + ... <\\>' (template.symbol [<\\>]) + ... (template.text [ "/" ]) + ... (template.text [ "/" ]) + ... (template.text [ "/" "/" ]) + ... (template.text [ "#[0]"])] + ... (and (,, (with_template [ ] + ... [(with_expansions [' (macro.final )] + ... (let [scenario (is (-> Any Bit) + ... (function (_ _) + ... ... TODO: Remove this hack once Jython is no longer being used as the Python interpreter. + ... (`` (for @.python (case (' [']) + ... (^.` [ + ... ("lux def" (, [_ {.#Symbol ["" _]}]) [] #0) + ... (,, (template.spliced ))]) + ... true + + ... _ + ... false) + ... (case (' [']) + ... (^.` [ (,, (template.spliced ))]) + ... true + + ... _ + ... false)))))] + ... (scenario [])))] + + ... [(.require [']) + ... ("lux def module" []) + ... []] - [(.require [ ' (.except)]) - ("lux def module" [[ ]]) - [( (.except))]] + ... [(.require [ ' (.except)]) + ... ("lux def module" [[ ]]) + ... [( (.except))]] - [(.require [ ' (.only )]) - ("lux def module" [[ ]]) - [( (.only ))]] + ... [(.require [ ' (.only )]) + ... ("lux def module" [[ ]]) + ... [( (.only ))]] - [(.require [ ' (.except )]) - ("lux def module" [[ ]]) - [( (.except ))]] + ... [(.require [ ' (.except )]) + ... ("lux def module" [[ ]]) + ... [( (.except ))]] - [(.require [ ']) - ("lux def module" []) - []] + ... [(.require [ ']) + ... ("lux def module" []) + ... []] - [(.require [' - [ ']]) - ("lux def module" [[ ]]) - [( )]] + ... [(.require [' + ... [ ']]) + ... ("lux def module" [[ ]]) + ... [( )]] - [(.require ["[0]" ' - ["[0]" ']]) - ("lux def module" [[ ] - [ ]]) - [( ) - ( )]] + ... [(.require ["[0]" ' + ... ["[0]" ']]) + ... ("lux def module" [[ ] + ... [ ]]) + ... [( ) + ... ( )]] - [(.require ["[0]" ' - ["[1]" ']]) - ("lux def module" [[ ]]) - [( )]] - - [(.require ["[0]" ' - ["[1]" ' - ["[2]" ']]]) - ("lux def module" [[ ]]) - [( )]] + ... [(.require ["[0]" ' + ... ["[1]" ']]) + ... ("lux def module" [[ ]]) + ... [( )]] + + ... [(.require ["[0]" ' + ... ["[1]" ' + ... ["[2]" ']]]) + ... ("lux def module" [[ ]]) + ... [( )]] - [(.require [' - ["[0]" ' - ["[0]" ']]]) - ("lux def module" [[ ] - [ ]]) - [( ) - ( )]] + ... [(.require [' + ... ["[0]" ' + ... ["[0]" ']]]) + ... ("lux def module" [[ ] + ... [ ]]) + ... [( ) + ... ( )]] - [(.require ["[0]" ' - [' - ["[0]" <\\>']]]) - ("lux def module" [[ ] - [ <\\>]]) - [( ) - ( )]] + ... [(.require ["[0]" ' + ... [' + ... ["[0]" <\\>']]]) + ... ("lux def module" [[ ] + ... [ <\\>]]) + ... [( ) + ... ( )]] - [(.require ["[0]" ' (.use "[1]#[0]" )]) - ("lux def module" [[ ]]) - [( ( ))]] - )))))) + ... [(.require ["[0]" ' (.use "[1]#[0]" )]) + ... ("lux def module" [[ ]]) + ... [( ( ))]] + ... )))))) )))))) (/.type for_type/variant diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux index e88482764..7a209e6cf 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux @@ -46,7 +46,7 @@ (all _.and (_.coverage [/.reference] (let [can_find_local_variable! - (|> (/.reference ["" expected_name]) + (|> (/.reference "" ["" expected_name]) (//scope.with_local [expected_name expected_type]) //type.inferring //scope.with @@ -63,7 +63,7 @@ (try.else false)) can_find_foreign_variable! - (|> (/.reference ["" expected_name]) + (|> (/.reference "" ["" expected_name]) //type.inferring //scope.with (//scope.with_local [expected_name expected_type]) @@ -84,7 +84,7 @@ can_find_local_definition! (|> (do //phase.monad [_ (//module.define expected_name {.#Definition [#0 expected_type []]})] - (/.reference ["" expected_name])) + (/.reference "" ["" expected_name])) //type.inferring (//module.with 0 expected_module) (//phase.result state) @@ -104,7 +104,7 @@ [_ (//module.with 0 import (//module.define expected_name {.#Definition [#1 expected_type []]})) _ (//module.import import)] - (/.reference [import expected_name])) + (/.reference "" [import expected_name])) //type.inferring (//module.with 0 expected_module) (//phase.result state) @@ -125,7 +125,7 @@ (//module.define expected_name {.#Definition [#1 expected_type []]})) _ (//module.import import) _ (//module.define expected_name {.#Alias [import expected_name]})] - (/.reference [expected_module expected_name])) + (/.reference "" [expected_module expected_name])) //type.inferring (//module.with 0 expected_module) (//phase.result state) @@ -146,7 +146,7 @@ (if record? {.#Right [expected_label (list)]} {.#Left [expected_label (list)]})]})] - (/.reference [expected_module expected_name])) + (/.reference "" [expected_module expected_name])) //type.inferring (//module.with 0 expected_module) (//phase.result state) @@ -174,7 +174,7 @@ (|> (do //phase.monad [_ (//module.with 0 import (//module.define expected_name it)) - _ (/.reference [import expected_name])] + _ (/.reference "" [import expected_name])] (in false)) (//type.expecting expected_type) (//module.with 0 expected_module) @@ -193,7 +193,7 @@ (|> (do //phase.monad [_ (//module.with 0 import (//module.define expected_name it)) - _ (/.reference [import expected_name])] + _ (/.reference "" [import expected_name])] (in false)) (//type.expecting expected_type) (//module.with 0 expected_module) @@ -212,7 +212,7 @@ (|> (do //phase.monad [_ (//module.with 0 import (//module.define expected_label it)) - _ (/.reference [import expected_label])] + _ (/.reference "" [import expected_label])] (in false)) (//type.expecting expected_type) (//module.with 0 expected_module) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux index 4876aa0be..ac89471ba 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux @@ -188,8 +188,6 @@ (check_success+ "lux io log" (list logC) Any)) (_.property "Can throw a run-time error." (check_success+ "lux io error" (list logC) Nothing)) - (_.property "Can query the current time (as milliseconds since epoch)." - (check_success+ "lux io current-time" (list) Int)) ))) (def .public test -- cgit v1.2.3