aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorEduardo Julian2015-08-12 00:15:51 -0400
committerEduardo Julian2015-08-12 00:15:51 -0400
commite60e9ef86b8653726ac8d99310640122c9242098 (patch)
treeb8bbf500e6dc296f8ba004a45f8eb7d9b4b16aa8 /source
parent95e7125c36dfa04a29ac363f1fc7e4c59b505415 (diff)
- Changing tags so they're actually indices (part 4).
- Bug fixes and adjustments.
Diffstat (limited to '')
-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))