aboutsummaryrefslogtreecommitdiff
path: root/source/program.lux
diff options
context:
space:
mode:
authorEduardo Julian2015-08-03 01:29:48 -0400
committerEduardo Julian2015-08-03 01:29:48 -0400
commit90399879ee7cc61e6333f7e81141441d32fcdb2e (patch)
treec2e61e5fae37b1f9f2f4d5cea6196f2274da42ff /source/program.lux
parentbcf0cb737e348dc9e183b1608abbebc5a40ba847 (diff)
Implemented text-interpolation through a macro ("<>") in lux/data/text
Diffstat (limited to 'source/program.lux')
-rw-r--r--source/program.lux7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/program.lux b/source/program.lux
index ae3421078..b7cce5714 100644
--- a/source/program.lux
+++ b/source/program.lux
@@ -17,7 +17,8 @@
hash
ord
show
- number)
+ number
+ stack)
(data bool
char
(either #as e)
@@ -28,7 +29,7 @@
maybe
(number int
real)
- (text #as t #open ("text:" Text/Monoid))
+ (text #as t #refer (#only <>) #open ("text:" Text/Monoid))
writer
tuple)
(codata (stream #as S)
@@ -46,7 +47,7 @@
(program args
(case args
(\ (list name))
- (println ($ text:++ "Hello, " name "!"))
+ (println (<> "Hello, #{name}!"))
_
(println "Hello, world!")))