diff options
Diffstat (limited to 'stdlib/source/lux/type/check.lux')
-rw-r--r-- | stdlib/source/lux/type/check.lux | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/lux/type/check.lux b/stdlib/source/lux/type/check.lux index 9eb72cbcb..b4d90e004 100644 --- a/stdlib/source/lux/type/check.lux +++ b/stdlib/source/lux/type/check.lux @@ -111,7 +111,7 @@ (Check [Id Type]) (lambda [context] (let [id (get@ #ex-id context)] - (#;Right [(update@ #ex-id inc+ context) + (#;Right [(update@ #ex-id n.inc context) [id (#;ExT id)]])))) (def: (bound? id) @@ -180,7 +180,7 @@ (-> Id Type (Check Type)) (case type (#;VarT id) - (if (=+ t-id id) + (if (n.= t-id id) (do Monad<Check> [? (bound? id)] (if ? @@ -194,7 +194,7 @@ ==type (clean t-id =type)] (case ==type (#;VarT =id) - (if (=+ t-id =id) + (if (n.= t-id =id) (do Monad<Check> [_ (unset-var id)] (wrap type)) @@ -242,7 +242,7 @@ (lambda [context] (let [id (get@ #var-id context)] (#;Right [(|> context - (update@ #var-id inc+) + (update@ #var-id n.inc) (update@ #bindings (dict;put id #;None))) [id (#;VarT id)]])))) @@ -275,7 +275,7 @@ bindings get-bindings bindings' (mapM @ (lambda [(^@ binding [b-id b-type])] - (if (=+ id b-id) + (if (n.= id b-id) (wrap binding) (case b-type #;None @@ -284,7 +284,7 @@ (#;Some b-type') (case b-type' (#;VarT t-id) - (if (=+ id t-id) + (if (n.= id t-id) (wrap [b-id #;None]) (wrap binding)) @@ -363,7 +363,7 @@ success (case [expected actual] [(#;VarT e-id) (#;VarT a-id)] - (if (=+ e-id a-id) + (if (n.= e-id a-id) success (do Monad<Check> [ebound (attempt (deref e-id)) @@ -394,7 +394,7 @@ (check expected bound))) [(#;AppT (#;ExT eid) eA) (#;AppT (#;ExT aid) aA)] - (if (=+ eid aid) + (if (n.= eid aid) (check eA aA) (fail-check expected actual)) @@ -495,7 +495,7 @@ (check eO aO)) [(#;ExT e!id) (#;ExT a!id)] - (if (=+ e!id a!id) + (if (n.= e!id a!id) success (fail-check expected actual)) |