From e60e9ef86b8653726ac8d99310640122c9242098 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 12 Aug 2015 00:15:51 -0400 Subject: - Changing tags so they're actually indices (part 4). - Bug fixes and adjustments. --- source/lux.lux | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'source/lux.lux') 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)) -- cgit v1.2.3