aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool
diff options
context:
space:
mode:
authorEduardo Julian2019-05-02 22:31:07 -0400
committerEduardo Julian2019-05-02 22:31:07 -0400
commitc28e3c730241b9a0245aed0725eb0f85491f5c18 (patch)
treeba81976fd4a630f0aa67082f15aca7f252075e3f /stdlib/source/lux/tool
parent6e14d46da33a9aa5f5627475ac52b84101b234d6 (diff)
Introduced the "#Macro" type and got rid of the "#lux.macro?" annotation type and its "magical" compiler behavior.
Diffstat (limited to 'stdlib/source/lux/tool')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux14
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
index dd645886f..c315f8d9d 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
@@ -115,16 +115,15 @@
[lux::coerce Any]
)
-(def: lux::check::type
- Handler
+(def: (caster input output)
+ (-> Type Type Handler)
(function (_ extension-name analyse args)
(case args
(^ (list valueC))
(do ////.monad
- [_ (typeA.infer Type)
- valueA (typeA.with-type Type
- (analyse valueC))]
- (wrap valueA))
+ [_ (typeA.infer output)]
+ (typeA.with-type input
+ (analyse valueC)))
_
(/////analysis.throw ///.incorrect-arity [extension-name 1 (list.size args)]))))
@@ -136,7 +135,8 @@
(///bundle.install "try" lux::try)
(///bundle.install "check" (lux::check eval))
(///bundle.install "coerce" (lux::coerce eval))
- (///bundle.install "check type" lux::check::type)
+ (///bundle.install "macro" (..caster .Macro' .Macro))
+ (///bundle.install "check type" (..caster .Type .Type))
(///bundle.install "in-module" lux::in-module)))
(def: bundle::io