aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/type/model.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-07-25 21:21:39 -0400
committerEduardo Julian2017-07-25 21:21:39 -0400
commitb07a8ad579039cc878e233670768aade07e2e678 (patch)
tree21b7c0f9357968e596c62958d0f605a26f2b494f /stdlib/source/lux/type/model.lux
parent461d0c6ca79ed31684f6d91b775dddede46a2cd1 (diff)
- Models now only rely on normal (inline) casting functions. Hopefully, in the future, they will be completely optimized away.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/type/model.lux24
1 files changed, 8 insertions, 16 deletions
diff --git a/stdlib/source/lux/type/model.lux b/stdlib/source/lux/type/model.lux
index 475458520..0914cfdf1 100644
--- a/stdlib/source/lux/type/model.lux
+++ b/stdlib/source/lux/type/model.lux
@@ -73,14 +73,10 @@
(function [tokens]
(case tokens
(^ (list value))
- (wrap (list (if (list;empty? type-vars)
- (` (|> (~ value)
- (: (~ (code;local-symbol (representation-name name))))
- (:! (~ (code;local-symbol name)))))
- (` ((: (All [(~@ type-varsC)]
- (-> (~ representation-declaration) (~ model-declaration)))
- (|>. :!!))
- (~ value))))))
+ (wrap (list (` ((: (All [(~@ type-varsC)]
+ (-> (~ representation-declaration) (~ model-declaration)))
+ (|>. :!!))
+ (~ value)))))
_
(macro;fail (format "Wrong syntax for " down-cast))))])))
@@ -89,14 +85,10 @@
(function [tokens]
(case tokens
(^ (list value))
- (wrap (list (if (list;empty? type-vars)
- (` (|> (~ value)
- (: (~ (code;local-symbol name)))
- (:! (~ (code;local-symbol (representation-name name))))))
- (` ((: (All [(~@ type-varsC)]
- (-> (~ model-declaration) (~ representation-declaration)))
- (|>. :!!))
- (~ value))))))
+ (wrap (list (` ((: (All [(~@ type-varsC)]
+ (-> (~ model-declaration) (~ representation-declaration)))
+ (|>. :!!))
+ (~ value)))))
_
(macro;fail (format "Wrong syntax for " up-cast))))]))))]]