From abe24425ced15fd784ef6c62d6f186af72b491db Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 11 Jul 2021 01:51:04 -0400 Subject: Re-named ":coerce" to ":as" since it technically doesn't do coercions. --- lux-bootstrapper/src/lux/analyser.clj | 10 +++++----- lux-bootstrapper/src/lux/analyser/lux.clj | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lux-bootstrapper/src') diff --git a/lux-bootstrapper/src/lux/analyser.clj b/lux-bootstrapper/src/lux/analyser.clj index af272fa91..792006ed1 100644 --- a/lux-bootstrapper/src/lux/analyser.clj +++ b/lux-bootstrapper/src/lux/analyser.clj @@ -109,23 +109,23 @@ (|case command (&/$Text ?procedure) (case ?procedure - "lux check" + "lux type check" (|let [(&/$Cons ?type (&/$Cons ?value (&/$Nil))) parameters] (&/with-analysis-meta location exo-type - (&&lux/analyse-ann analyse eval! exo-type ?type ?value))) + (&&lux/analyse-type-check analyse eval! exo-type ?type ?value))) - "lux check type" + "lux type check type" (|let [(&/$Cons ?value (&/$Nil)) parameters] (analyse-ast optimize eval! compile-module compilers &type/Type ?value)) - "lux coerce" + "lux type as" (|let [(&/$Cons ?type (&/$Cons ?value (&/$Nil))) parameters] (&/with-analysis-meta location exo-type - (&&lux/analyse-coerce analyse eval! exo-type ?type ?value))) + (&&lux/analyse-type-as analyse eval! exo-type ?type ?value))) "lux def" (|let [(&/$Cons [_ (&/$Identifier "" ?name)] diff --git a/lux-bootstrapper/src/lux/analyser/lux.clj b/lux-bootstrapper/src/lux/analyser/lux.clj index 63bc675de..b3c2edbd9 100644 --- a/lux-bootstrapper/src/lux/analyser/lux.clj +++ b/lux-bootstrapper/src/lux/analyser/lux.clj @@ -703,7 +703,7 @@ (&&/|meta new-type _location _analysis))) -(defn analyse-ann [analyse eval! exo-type ?type ?value] +(defn analyse-type-check [analyse eval! exo-type ?type ?value] (|do [=type (&&/analyse-1 analyse &type/Type ?type) ==type (eval! =type) _ (&type/check exo-type ==type) @@ -713,7 +713,7 @@ (&&/$ann =value =type) ))))) -(defn analyse-coerce [analyse eval! exo-type ?type ?value] +(defn analyse-type-as [analyse eval! exo-type ?type ?value] (|do [=type (&&/analyse-1 analyse &type/Type ?type) ==type (eval! =type) _ (&type/check exo-type ==type) -- cgit v1.2.3