diff options
author | Eduardo Julian | 2018-07-03 18:40:16 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-03 18:40:16 -0400 |
commit | d3f5e1f4baa667bc2eb72edd542cf5d8cd3924ce (patch) | |
tree | 2aa771401cce0d08276abc072b9d31e00a651f29 /stdlib/source/lux/lang | |
parent | bfd2d6c203042dfddb0ce29db3696365fe213314 (diff) |
- Re-named ":!" to ":coerce".
Diffstat (limited to '')
5 files changed, 17 insertions, 17 deletions
diff --git a/stdlib/source/lux/lang/compiler/analysis/case.lux b/stdlib/source/lux/lang/compiler/analysis/case.lux index 9e67a24f9..84eb23af5 100644 --- a/stdlib/source/lux/lang/compiler/analysis/case.lux +++ b/stdlib/source/lux/lang/compiler/analysis/case.lux @@ -194,8 +194,8 @@ (Operation [(List Pattern) a]))) (function (_ [memberT memberC] then) (do @ - [[memberP [memberP+ thenA]] ((:! (All [a] (-> (Maybe Nat) Type Code (Operation a) (Operation [Pattern a]))) - analyse-pattern) + [[memberP [memberP+ thenA]] ((:coerce (All [a] (-> (Maybe Nat) Type Code (Operation a) (Operation [Pattern a]))) + analyse-pattern) #.None memberT memberC then)] (wrap [(list& memberP memberP+) thenA])))) (do @ diff --git a/stdlib/source/lux/lang/compiler/extension/analysis/common.lux b/stdlib/source/lux/lang/compiler/extension/analysis/common.lux index 6bd1a93bf..ca1c51df9 100644 --- a/stdlib/source/lux/lang/compiler/extension/analysis/common.lux +++ b/stdlib/source/lux/lang/compiler/extension/analysis/common.lux @@ -102,14 +102,14 @@ ## (^ (list typeC valueC)) ## (do compiler.Monad<Operation> ## [actualT (eval Type typeC) -## _ (typeA.infer (:! Type actualT))] +## _ (typeA.infer (:coerce Type actualT))] ## (typeA.with-type <type> ## (analyse valueC))) ## _ ## (lang.throw ///bundle.incorrect-arity [extension +2 (list.size args)]))))] -## [lux//check (:! Type actualT)] +## [lux//check (:coerce Type actualT)] ## [lux//coerce Any] ## ) diff --git a/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux b/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux index 56da166c5..1fb9d8d90 100644 --- a/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux +++ b/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux @@ -545,10 +545,10 @@ (def: (java-type-to-class type) (-> java/lang/reflect/Type (Meta Text)) (cond (host.instance? Class type) - (macro/wrap (Class::getName [] (:! Class type))) + (macro/wrap (Class::getName [] (:coerce Class type))) (host.instance? ParameterizedType type) - (java-type-to-class (ParameterizedType::getRawType [] (:! ParameterizedType type))) + (java-type-to-class (ParameterizedType::getRawType [] (:coerce ParameterizedType type))) ## else (lang.throw Cannot-Convert-To-Class (jvm-type-name type)))) @@ -561,7 +561,7 @@ (def: (java-type-to-lux-type mappings java-type) (-> Mappings java/lang/reflect/Type (Meta Type)) (cond (host.instance? TypeVariable java-type) - (let [var-name (TypeVariable::getName [] (:! TypeVariable java-type))] + (let [var-name (TypeVariable::getName [] (:coerce TypeVariable java-type))] (case (dict.get var-name mappings) (#.Some var-type) (macro/wrap var-type) @@ -570,7 +570,7 @@ (lang.throw Unknown-Type-Var var-name))) (host.instance? WildcardType java-type) - (let [java-type (:! WildcardType java-type)] + (let [java-type (:coerce WildcardType java-type)] (case [(array.read +0 (WildcardType::getUpperBounds [] java-type)) (array.read +0 (WildcardType::getLowerBounds [] java-type))] (^or [(#.Some bound) _] [_ (#.Some bound)]) @@ -580,7 +580,7 @@ (macro/wrap Any))) (host.instance? Class java-type) - (let [java-type (:! (Class Object) java-type) + (let [java-type (:coerce (Class Object) java-type) class-name (Class::getName [] java-type)] (macro/wrap (case (array.size (Class::getTypeParameters [] java-type)) +0 @@ -594,7 +594,7 @@ (type.univ-q arity))))) (host.instance? ParameterizedType java-type) - (let [java-type (:! ParameterizedType java-type) + (let [java-type (:coerce ParameterizedType java-type) raw (ParameterizedType::getRawType [] java-type)] (if (host.instance? Class raw) (do macro.Monad<Meta> @@ -602,13 +602,13 @@ (ParameterizedType::getActualTypeArguments []) array.to-list (monad.map @ (java-type-to-lux-type mappings)))] - (macro/wrap (#.Primitive (Class::getName [] (:! (Class Object) raw)) + (macro/wrap (#.Primitive (Class::getName [] (:coerce (Class Object) raw)) paramsT))) (lang.throw jvm-type-is-not-a-class raw))) (host.instance? GenericArrayType java-type) (do macro.Monad<Meta> - [innerT (|> (:! GenericArrayType java-type) + [innerT (|> (:coerce GenericArrayType java-type) (GenericArrayType::getGenericComponentType []) (java-type-to-lux-type mappings))] (wrap (#.Primitive "#Array" (list innerT)))) @@ -884,10 +884,10 @@ (def: (java-type-to-parameter type) (-> java/lang/reflect/Type (Meta Text)) (cond (host.instance? Class type) - (macro/wrap (Class::getName [] (:! Class type))) + (macro/wrap (Class::getName [] (:coerce Class type))) (host.instance? ParameterizedType type) - (java-type-to-parameter (ParameterizedType::getRawType [] (:! ParameterizedType type))) + (java-type-to-parameter (ParameterizedType::getRawType [] (:coerce ParameterizedType type))) (or (host.instance? TypeVariable type) (host.instance? WildcardType type)) @@ -895,7 +895,7 @@ (host.instance? GenericArrayType type) (do macro.Monad<Meta> - [componentP (java-type-to-parameter (GenericArrayType::getGenericComponentType [] (:! GenericArrayType type)))] + [componentP (java-type-to-parameter (GenericArrayType::getGenericComponentType [] (:coerce GenericArrayType type)))] (wrap (format componentP "[]"))) ## else diff --git a/stdlib/source/lux/lang/compiler/synthesis/case.lux b/stdlib/source/lux/lang/compiler/synthesis/case.lux index b7f224168..c12930963 100644 --- a/stdlib/source/lux/lang/compiler/synthesis/case.lux +++ b/stdlib/source/lux/lang/compiler/synthesis/case.lux @@ -99,7 +99,7 @@ rightP <default>)) ([#//.Bool bool/=] - [#//.I64 (:! (Eq I64) i/=)] + [#//.I64 (:coerce (Eq I64) i/=)] [#//.F64 frac/=] [#//.Text text/=]) diff --git a/stdlib/source/lux/lang/compiler/translation/scheme/case.jvm.lux b/stdlib/source/lux/lang/compiler/translation/scheme/case.jvm.lux index e5d12a005..40d2625fb 100644 --- a/stdlib/source/lux/lang/compiler/translation/scheme/case.jvm.lux +++ b/stdlib/source/lux/lang/compiler/translation/scheme/case.jvm.lux @@ -32,7 +32,7 @@ (.let [method (.if tail? //runtime.product//right //runtime.product//left)] - (method source (_.int (:! Int idx))))) + (method source (_.int (:coerce Int idx))))) valueO pathP)))) |