From 86238e5f3753cd6e751f1fa73367530a54c49577 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 11 Jul 2018 20:11:37 -0400 Subject: - Re-naming some functions in "lux/language/type/check". --- stdlib/source/lux/language/type/check.lux | 10 +++++----- stdlib/source/lux/type/implicit.lux | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'stdlib/source') diff --git a/stdlib/source/lux/language/type/check.lux b/stdlib/source/lux/language/type/check.lux index a85480074..60864008f 100644 --- a/stdlib/source/lux/language/type/check.lux +++ b/stdlib/source/lux/language/type/check.lux @@ -203,7 +203,7 @@ #.None (ex.throw unknown-type-var id)))) -(def: #export (write type id) +(def: #export (bind type id) (-> Type Var (Check Any)) (function (_ context) (case (|> context (get@ #.var-bindings) (var::get id)) @@ -354,7 +354,7 @@ (Check a))) ($_ either (do Monad - [_ (write type id)] + [_ (..bind type id)] then) (do Monad [ring (ring id) @@ -368,8 +368,8 @@ (def: (link-2 left right) (-> Var Var (Check Any)) (do Monad - [_ (write (#.Var right) left)] - (write (#.Var left) right))) + [_ (..bind (#.Var right) left)] + (..bind (#.Var left) right))) (def: (link-3 interpose to from) (-> Var Var Var (Check Any)) @@ -641,7 +641,7 @@ (#e.Success _) true)) -(def: #export get-context +(def: #export context (Check Type-Context) (function (_ context) (#e.Success [context context]))) diff --git a/stdlib/source/lux/type/implicit.lux b/stdlib/source/lux/type/implicit.lux index e1d3a21f7..8e1c92f84 100644 --- a/stdlib/source/lux/type/implicit.lux +++ b/stdlib/source/lux/type/implicit.lux @@ -210,7 +210,7 @@ [[tvars alt-type] (concrete-type alt-type) #let [[deps alt-type] (type.flatten-function alt-type)] _ (tc.check dep alt-type) - context' tc.get-context + context' tc.context =deps (monad.map @ (provision compiler context') deps)] (wrap =deps))) (#.Left error) @@ -261,7 +261,7 @@ _ (tc.check alt-type sig-type) member-type (find-member-type member-idx alt-type) _ (check-apply member-type input-types output-type) - context' tc.get-context + context' tc.context =deps (monad.map @ (provision compiler context') deps)] (wrap =deps))) (#.Left error) -- cgit v1.2.3