aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
authorEduardo Julian2019-10-16 02:19:52 -0400
committerEduardo Julian2019-10-16 02:19:52 -0400
commit3028cc4f45d2d7d66456467de506341800df14d8 (patch)
tree184a517a4b0634fd50d834b4b16753fd11c691a2 /stdlib/source/test
parent688870c71829e1bee89c9f827cc2032507cc507b (diff)
Now allowing types for methods.
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux/extension.lux32
1 files changed, 19 insertions, 13 deletions
diff --git a/stdlib/source/test/lux/extension.lux b/stdlib/source/test/lux/extension.lux
index 645558d5f..7b2d9ffd5 100644
--- a/stdlib/source/test/lux/extension.lux
+++ b/stdlib/source/test/lux/extension.lux
@@ -1,5 +1,6 @@
(.module:
[lux #*
+ ["@" target]
[abstract
[monad (#+ do)]]
[control
@@ -23,24 +24,29 @@
(def: my-extension "example YOLO")
-(analysis: (..my-extension self phase {parameters (<>.some <c>.any)})
- (do @
- [_ (type.infer .Text)]
- (wrap (#analysis.Extension self (list)))))
+(`` (for {(~~ (static @.old))
+ (as-is)}
+ (as-is (analysis: (..my-extension self phase {parameters (<>.some <c>.any)})
+ (do @
+ [_ (type.infer .Text)]
+ (wrap (#analysis.Extension self (list)))))
-(synthesis: (..my-extension self phase {parameters (<>.some <a>.any)})
- (wrap (synthesis.text self)))
+ (synthesis: (..my-extension self phase {parameters (<>.some <a>.any)})
+ (wrap (synthesis.text self)))
-(directive: (..my-extension self phase {parameters (<>.some <c>.any)})
- (do @
- [#let [_ (log! (format "directive: " (%.text self)))]]
- (wrap directive.no-requirements)))
+ (directive: (..my-extension self phase {parameters (<>.some <c>.any)})
+ (do @
+ [#let [_ (log! (format "directive: " (%.text self)))]]
+ (wrap directive.no-requirements)))
-("example YOLO")
+ ("example YOLO")
+ )))
(def: #export test
Test
(<| (_.context (%.name (name-of /._)))
(_.test "Can define and use analysis & synthesis extensions."
- (text@= ("example YOLO")
- "example YOLO"))))
+ (`` (for {(~~ (static @.old))
+ false}
+ (text@= ("example YOLO")
+ "example YOLO"))))))