From 190b512a822fefbb9c66271feb189cc6ccebaf85 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 15 Nov 2017 23:22:30 -0400 Subject: - Re-named "lux/meta" to to "lux/macro". --- new-luxc/source/luxc/lang/analysis/inference.lux | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'new-luxc/source/luxc/lang/analysis/inference.lux') diff --git a/new-luxc/source/luxc/lang/analysis/inference.lux b/new-luxc/source/luxc/lang/analysis/inference.lux index 910d5093a..c6f0323f7 100644 --- a/new-luxc/source/luxc/lang/analysis/inference.lux +++ b/new-luxc/source/luxc/lang/analysis/inference.lux @@ -6,7 +6,7 @@ [text] text/format (coll [list "list/" Functor])) - [meta "meta/" Monad] + [macro "macro/" Monad] (lang [type] (type ["tc" check]))) (luxc ["&" lang] @@ -71,7 +71,7 @@ (-> &;Analyser Type (List Code) (Meta [Type (List Analysis)])) (case args #;Nil - (do meta;Monad + (do macro;Monad [_ (&;infer inferT)] (wrap [inferT (list)])) @@ -81,12 +81,12 @@ (general analyse unnamedT args) (#;UnivQ _) - (do meta;Monad + (do macro;Monad [[var-id varT] (&;with-type-env tc;var)] (general analyse (maybe;assume (type;apply (list varT) inferT)) args)) (#;ExQ _) - (do meta;Monad + (do macro;Monad [[ex-id exT] (&;with-type-env tc;existential)] (general analyse (maybe;assume (type;apply (list exT) inferT)) args)) @@ -107,7 +107,7 @@ ## avoided in Lux code, since the inference algorithm can piece ## things together more easily. (#;Function inputT outputT) - (do meta;Monad + (do macro;Monad [[outputT' args'A] (general analyse outputT args') argA (&;with-stacked-errors (function [_] (Cannot-Infer-Argument @@ -118,7 +118,7 @@ (wrap [outputT' (list& argA args'A)])) (#;Var infer-id) - (do meta;Monad + (do macro;Monad [?inferT' (&;with-type-env (tc;read infer-id))] (case ?inferT' (#;Some inferT') @@ -140,14 +140,14 @@ (^template [] ( env bodyT) - (do meta;Monad + (do macro;Monad [bodyT+ (record bodyT)] (wrap ( env bodyT+)))) ([#;UnivQ] [#;ExQ]) (#;Product _) - (meta/wrap (type;function (type;flatten-tuple type) type)) + (macro/wrap (type;function (type;flatten-tuple type) type)) _ (&;throw Not-A-Record-Type (%type type)))) @@ -159,13 +159,13 @@ currentT type] (case currentT (#;Named name unnamedT) - (do meta;Monad + (do macro;Monad [unnamedT+ (recur depth unnamedT)] (wrap unnamedT+)) (^template [] ( env bodyT) - (do meta;Monad + (do macro;Monad [bodyT+ (recur (n.inc depth) bodyT)] (wrap ( env bodyT+)))) ([#;UnivQ] @@ -180,11 +180,11 @@ (n.< boundary tag))) (case (list;nth tag cases) (#;Some caseT) - (meta/wrap (if (n.= +0 depth) - (type;function (list caseT) currentT) - (let [replace! (replace-bound (|> depth n.dec (n.* +2)) type)] - (type;function (list (replace! caseT)) - (replace! currentT))))) + (macro/wrap (if (n.= +0 depth) + (type;function (list caseT) currentT) + (let [replace! (replace-bound (|> depth n.dec (n.* +2)) type)] + (type;function (list (replace! caseT)) + (replace! currentT))))) #;None (&common;variant-out-of-bounds-error type expected-size tag)) @@ -196,11 +196,11 @@ (n.= boundary tag) (let [caseT (type;variant (list;drop boundary cases))] - (meta/wrap (if (n.= +0 depth) - (type;function (list caseT) currentT) - (let [replace! (replace-bound (|> depth n.dec (n.* +2)) type)] - (type;function (list (replace! caseT)) - (replace! currentT)))))) + (macro/wrap (if (n.= +0 depth) + (type;function (list caseT) currentT) + (let [replace! (replace-bound (|> depth n.dec (n.* +2)) type)] + (type;function (list (replace! caseT)) + (replace! currentT)))))) ## else (&common;variant-out-of-bounds-error type expected-size tag))) -- cgit v1.2.3