aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/lux.lux27
1 files changed, 4 insertions, 23 deletions
diff --git a/source/lux.lux b/source/lux.lux
index 04f9df811..22d49315b 100644
--- a/source/lux.lux
+++ b/source/lux.lux
@@ -2140,14 +2140,7 @@
_
($ text:++ "(| "
(|> cases
- (map (: (-> (, Text Type) Text)
- (lambda [kv]
- (case kv
- [k (#TupleT #;Nil)]
- ($ text:++ "#" k)
-
- [k v]
- ($ text:++ "(#" k " " (type:show v) ")")))))
+ (map type:show)
(interpose " ")
(foldL text:++ ""))
")"))
@@ -2160,11 +2153,7 @@
_
($ text:++ "(& "
(|> fields
- (map (: (-> (, Text Type) Text)
- (: (-> (, Text Type) Text)
- (lambda [kv]
- (let [[k v] kv]
- ($ text:++ "(#" k " " (type:show v) ")"))))))
+ (map type:show)
(interpose " ")
(foldL text:++ ""))
")"))
@@ -2192,18 +2181,10 @@
(-> (List (, Text Type)) Type Type)
(case type
(#VariantT ?cases)
- (#VariantT (map (: (-> (, Text Type) (, Text Type))
- (lambda [kv]
- (let [[k v] kv]
- [k (beta-reduce env v)])))
- ?cases))
+ (#VariantT (map (beta-reduce env) ?cases))
(#RecordT ?fields)
- (#RecordT (map (: (-> (, Text Type) (, Text Type))
- (lambda [kv]
- (let [[k v] kv]
- [k (beta-reduce env v)])))
- ?fields))
+ (#RecordT (map (beta-reduce env) ?fields))
(#TupleT ?members)
(#TupleT (map (beta-reduce env) ?members))