diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/analyser/function.lux | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/new-luxc/source/luxc/analyser/function.lux b/new-luxc/source/luxc/analyser/function.lux index f9fde0eab..424a3188f 100644 --- a/new-luxc/source/luxc/analyser/function.lux +++ b/new-luxc/source/luxc/analyser/function.lux @@ -5,9 +5,9 @@ [text] text/format (coll [list "list/" Fold<List> Monoid<List> Monad<List>])) - [macro #+ Monad<Lux>] - [type] - (type ["tc" check])) + [meta #+ Monad<Meta>] + (meta [type] + (type ["tc" check]))) (luxc ["&" base] (lang ["la" analysis #+ Analysis]) ["&;" scope] @@ -16,9 +16,9 @@ ## [Analysers] (def: #export (analyse-function analyse func-name arg-name body) - (-> &;Analyser Text Text Code (Lux Analysis)) - (do Monad<Lux> - [functionT macro;expected-type] + (-> &;Analyser Text Text Code (Meta Analysis)) + (do Monad<Meta> + [functionT meta;expected-type] (loop [expected functionT] (&;with-stacked-errors (function [_] (format "Functions require function types: " (type;to-text expected))) @@ -90,12 +90,12 @@ ))))) (def: #export (analyse-apply analyse funcT funcA args) - (-> &;Analyser Type Analysis (List Code) (Lux Analysis)) + (-> &;Analyser Type Analysis (List Code) (Meta Analysis)) (&;with-stacked-errors (function [_] (format "Cannot apply function " (%type funcT) " to args: " (|> args (list/map %code) (text;join-with " ")))) - (do Monad<Lux> - [expected macro;expected-type + (do Monad<Meta> + [expected meta;expected-type [applyT argsA] (&inference;apply-function analyse funcT args) _ (&;with-type-env (tc;check expected applyT))] |