From 1651d847ba70ee36171f3809a25bece325fd5715 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 2 Dec 2017 12:49:25 -0400 Subject: - Added context-sensitive macro-expansion by means of "lux in-module", and removed all the (now unnecessary) #hidden tags. - Fixed a bug when loading the imports from the cache. - Added special notation for context-sensitive macro-expansion. --- stdlib/test/test/lux/concurrency/promise.lux | 2 +- stdlib/test/test/lux/data/number/ratio.lux | 5 ++++- stdlib/test/tests.lux | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux/concurrency/promise.lux b/stdlib/test/test/lux/concurrency/promise.lux index 3be2f03b5..37ba6f2e1 100644 --- a/stdlib/test/test/lux/concurrency/promise.lux +++ b/stdlib/test/test/lux/concurrency/promise.lux @@ -56,7 +56,7 @@ (test "Cannot re-resolve a resolved promise." (and (not (io.run (&.resolve false (&/wrap true)))) - (io.run (&.resolve true (&.promise Bool))))) + (io.run (&.resolve true (: (&.Promise Bool) (&.promise #.None)))))) (wrap (do &.Monad [?none (&.time-out +100 (&.delay +200 true)) diff --git a/stdlib/test/test/lux/data/number/ratio.lux b/stdlib/test/test/lux/data/number/ratio.lux index 93081cd14..73e43e6c5 100644 --- a/stdlib/test/test/lux/data/number/ratio.lux +++ b/stdlib/test/test/lux/data/number/ratio.lux @@ -32,7 +32,10 @@ (&.ratio +0 denom2))) (test "All ratios are built normalized." - (|> sample &.normalize (&.r/= sample))) + (|> sample + &.normalize + ("lux in-module" "lux/data/number/ratio") + (&.r/= sample))) )))) (context: "Arithmetic" diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux index 2efff3c71..ad43cadfe 100644 --- a/stdlib/test/tests.lux +++ b/stdlib/test/tests.lux @@ -74,7 +74,8 @@ (world ["_." blob] ["_." file] (net ["_." tcp] - ["_." udp])))) + ["_." udp])) + )) (lux (control [contract] [concatenative]) (concurrency [space]) @@ -88,6 +89,7 @@ (coll (tree ["tree_." parser]))) (math [random]) [macro] + (macro (poly [json])) (type [unit]) [world/env] [world/console]) -- cgit v1.2.3 From c72e120e8c2c300411c0cb07ecb3b6bc32e0cb24 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 2 Dec 2017 14:32:23 -0400 Subject: - Added some ~! to some macros to stop them from imposing dependencies. - Added some code to "lux.type" so it can handle "lux in-module". --- stdlib/test/test/lux.lux | 1 - stdlib/test/tests.lux | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux.lux b/stdlib/test/test/lux.lux index 8bd3a1ee5..f5c5fd2f1 100644 --- a/stdlib/test/test/lux.lux +++ b/stdlib/test/test/lux.lux @@ -2,7 +2,6 @@ lux lux/test (lux (control ["M" monad #+ do Monad]) - [io] [math] ["r" math/random] (data [maybe] diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux index ad43cadfe..9a0fedbb8 100644 --- a/stdlib/test/tests.lux +++ b/stdlib/test/tests.lux @@ -1,9 +1,6 @@ (.module: lux - (lux (control monad) - [io] - (concurrency [promise]) - [cli #+ program:] + (lux [cli #+ program:] [test]) (test ["_." lux] (lux ["_." cli] -- cgit v1.2.3