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/case.lux | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'new-luxc/source/luxc/lang/analysis/case.lux') diff --git a/new-luxc/source/luxc/lang/analysis/case.lux b/new-luxc/source/luxc/lang/analysis/case.lux index 69a975b52..5d4c592aa 100644 --- a/new-luxc/source/luxc/lang/analysis/case.lux +++ b/new-luxc/source/luxc/lang/analysis/case.lux @@ -11,8 +11,8 @@ [text] text/format (coll [list "list/" Fold Monoid Functor])) - [meta] - (meta [code]) + [macro] + (macro [code]) (lang [type] (type ["tc" check]))) (luxc ["&" lang] @@ -46,7 +46,7 @@ (-> Type (Meta Type)) (case caseT (#;Var id) - (do meta;Monad + (do macro;Monad [?caseT' (&;with-type-env (tc;read id))] (case ?caseT' @@ -60,7 +60,7 @@ (simplify-case-type unnamedT) (^or (#;UnivQ _) (#;ExQ _)) - (do meta;Monad + (do macro;Monad [[ex-id exT] (&;with-type-env tc;existential)] (simplify-case-type (maybe;assume (type;apply (list exT) caseT)))) @@ -68,7 +68,7 @@ (#;Apply inputT funcT) (case funcT (#;Var funcT-id) - (do meta;Monad + (do macro;Monad [funcT' (&;with-type-env (do tc;Monad [?funct' (tc;read funcT-id)] @@ -83,13 +83,13 @@ _ (case (type;apply (list inputT) funcT) (#;Some outputT) - (:: meta;Monad wrap outputT) + (:: macro;Monad wrap outputT) #;None (&;throw Cannot-Simplify-Type-For-Pattern-Matching (%type caseT)))) _ - (:: meta;Monad wrap caseT))) + (:: macro;Monad wrap caseT))) ## This function handles several concerns at once, but it must be that ## way because those concerns are interleaved when doing @@ -112,7 +112,7 @@ (case pattern [cursor (#;Symbol ["" name])] (&;with-cursor cursor - (do meta;Monad + (do macro;Monad [outputA (&scope;with-local [name inputT] next) idx &scope;next-local] @@ -125,7 +125,7 @@ (^template [ ] [cursor ( test)] (&;with-cursor cursor - (do meta;Monad + (do macro;Monad [_ (&;with-type-env (tc;check inputT )) outputA next] @@ -139,7 +139,7 @@ (^ [cursor (#;Tuple (list))]) (&;with-cursor cursor - (do meta;Monad + (do macro;Monad [_ (&;with-type-env (tc;check inputT Unit)) outputA next] @@ -150,7 +150,7 @@ [cursor (#;Tuple sub-patterns)] (&;with-cursor cursor - (do meta;Monad + (do macro;Monad [inputT' (simplify-case-type inputT)] (case inputT' (#;Product _) @@ -191,7 +191,7 @@ ))) [cursor (#;Record record)] - (do meta;Monad + (do macro;Monad [record (structureA;normalize record) [members recordT] (structureA;order record) _ (&;with-type-env @@ -204,7 +204,7 @@ (^ [cursor (#;Form (list& [_ (#;Nat idx)] values))]) (&;with-cursor cursor - (do meta;Monad + (do macro;Monad [inputT' (simplify-case-type inputT)] (case inputT' (#;Sum _) @@ -216,14 +216,14 @@ (n.< num-cases idx)) (if (and (n.> num-cases size-sum) (n.= (n.dec num-cases) idx)) - (do meta;Monad + (do macro;Monad [[testP nextA] (analyse-pattern #;None (type;variant (list;drop (n.dec num-cases) flat-sum)) (` [(~@ values)]) next)] (wrap [(` ("lux case variant" (~ (code;nat idx)) (~ (code;nat num-cases)) (~ testP))) nextA])) - (do meta;Monad + (do macro;Monad [[testP nextA] (analyse-pattern #;None case-type (` [(~@ values)]) next)] (wrap [(` ("lux case variant" (~ (code;nat idx)) (~ (code;nat num-cases)) (~ testP))) nextA]))) @@ -238,9 +238,9 @@ (^ [cursor (#;Form (list& [_ (#;Tag tag)] values))]) (&;with-cursor cursor - (do meta;Monad - [tag (meta;normalize tag) - [idx group variantT] (meta;resolve-tag tag) + (do macro;Monad + [tag (macro;normalize tag) + [idx group variantT] (macro;resolve-tag tag) _ (&;with-type-env (tc;check inputT variantT))] (analyse-pattern (#;Some (list;size group)) inputT (` ((~ (code;nat idx)) (~@ values))) next))) @@ -256,7 +256,7 @@ (&;throw Cannot-Have-Empty-Branches "") (#;Cons [patternH bodyH] branchesT) - (do meta;Monad + (do macro;Monad [[inputT inputA] (commonA;with-unknown-type (analyse inputC)) outputH (analyse-pattern #;None inputT patternH (analyse bodyH)) -- cgit v1.2.3