diff options
Diffstat (limited to 'stdlib/source/lux/platform/compiler/phase/analysis/inference.lux')
-rw-r--r-- | stdlib/source/lux/platform/compiler/phase/analysis/inference.lux | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/lux/platform/compiler/phase/analysis/inference.lux b/stdlib/source/lux/platform/compiler/phase/analysis/inference.lux index 010bdc437..7ce10cb32 100644 --- a/stdlib/source/lux/platform/compiler/phase/analysis/inference.lux +++ b/stdlib/source/lux/platform/compiler/phase/analysis/inference.lux @@ -8,11 +8,11 @@ ["." text format] [collection - ["." list ("list/." Functor<List>)]]] + ["." list ("list/." functor)]]] ["." type ["." check]] ["." macro]] - ["." /// ("operation/." Monad<Operation>) + ["." /// ("operation/." monad) ["." extension]] [// (#+ Tag Analysis Operation Phase)] ["." //type]) @@ -84,7 +84,7 @@ (def: new-named-type (Operation Type) - (do ///.Monad<Operation> + (do ///.monad [cursor (extension.lift macro.cursor) [ex-id _] (//type.with-env check.existential)] (wrap (named-type cursor ex-id)))) @@ -100,7 +100,7 @@ (-> Phase Type (List Code) (Operation [Type (List Analysis)])) (case args #.Nil - (do ///.Monad<Operation> + (do ///.monad [_ (//type.infer inferT)] (wrap [inferT (list)])) @@ -110,12 +110,12 @@ (general analyse unnamedT args) (#.UnivQ _) - (do ///.Monad<Operation> + (do ///.monad [[var-id varT] (//type.with-env check.var)] (general analyse (maybe.assume (type.apply (list varT) inferT)) args)) (#.ExQ _) - (do ///.Monad<Operation> + (do ///.monad [[var-id varT] (//type.with-env check.var) output (general analyse (maybe.assume (type.apply (list varT) inferT)) @@ -146,7 +146,7 @@ ## avoided in Lux code, since the inference algorithm can piece ## things together more easily. (#.Function inputT outputT) - (do ///.Monad<Operation> + (do ///.monad [[outputT' args'A] (general analyse outputT args') argA (<| (///.with-stack cannot-infer-argument [inputT argC]) (//type.with-type inputT) @@ -154,7 +154,7 @@ (wrap [outputT' (list& argA args'A)])) (#.Var infer-id) - (do ///.Monad<Operation> + (do ///.monad [?inferT' (//type.with-env (check.read infer-id))] (case ?inferT' (#.Some inferT') @@ -176,7 +176,7 @@ (^template [<tag>] (<tag> env bodyT) - (do ///.Monad<Operation> + (do ///.monad [bodyT+ (record bodyT)] (wrap (<tag> env bodyT+)))) ([#.UnivQ] @@ -203,13 +203,13 @@ currentT inferT] (case currentT (#.Named name unnamedT) - (do ///.Monad<Operation> + (do ///.monad [unnamedT+ (recur depth unnamedT)] (wrap unnamedT+)) (^template [<tag>] (<tag> env bodyT) - (do ///.Monad<Operation> + (do ///.monad [bodyT+ (recur (inc depth) bodyT)] (wrap (<tag> env bodyT+)))) ([#.UnivQ] |