aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/type.lux
diff options
context:
space:
mode:
authorEduardo Julian2016-12-18 15:35:28 -0400
committerEduardo Julian2016-12-18 15:35:28 -0400
commita6b97572ae0b3442f3996bdaf2742cd855ef0983 (patch)
treef12e0ebeaa38c4fd9cfe4b69c4fcd74d34f1c9e3 /stdlib/source/lux/type.lux
parent47e7627e05f2f961794e312e28bf8a437a1e0c78 (diff)
- Better formatting for types and lists.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/type.lux14
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/lux/type.lux b/stdlib/source/lux/type.lux
index 91b44bfd8..c81d5e23d 100644
--- a/stdlib/source/lux/type.lux
+++ b/stdlib/source/lux/type.lux
@@ -216,10 +216,10 @@
(#;HostT name params)
(case params
#;Nil
- ($_ Text/append "(^ " name ")")
+ ($_ Text/append "(host " name ")")
_
- ($_ Text/append "(^ " name " " (|> params (List/map to-text) list;reverse (list;interpose " ") (List/fold Text/append "")) ")"))
+ ($_ Text/append "(host " name " " (|> params (List/map to-text) list;reverse (list;interpose " ") (List/fold Text/append "")) ")"))
#;VoidT
"Void"
@@ -262,11 +262,11 @@
(let [[type-fun type-args] (flatten-application type)]
($_ Text/append "(" (to-text type-fun) " " (|> type-args (List/map to-text) list;reverse (list;interpose " ") (List/fold Text/append "")) ")"))
- (#;UnivQ env body)
- ($_ Text/append "(All " (to-text body) ")")
-
- (#;ExQ env body)
- ($_ Text/append "(Ex " (to-text body) ")")
+ (^template [<tag> <desc>]
+ (<tag> env body)
+ ($_ Text/append "(" <desc> " {" (|> env (List/map to-text) (text;join-with " ")) "} " (to-text body) ")"))
+ ([#;UnivQ "All"]
+ [#;ExQ "Ex"])
(#;NamedT [module name] type)
($_ Text/append module ";" name)