aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorEduardo Julian2015-05-27 00:57:57 -0400
committerEduardo Julian2015-05-27 00:57:57 -0400
commit5e45ec0419293fdde30cc9e3f0326e44ddd7442a (patch)
tree265911dabf774b6e8a6d8cf485c35f81328b578b /source
parent639c9385219e143fd7a6161c57fda34293b81055 (diff)
- _jvm_program now relies on the (IO (,)) type.
- The command-line params argument in jvm_program is now transformed from a String array into (List Text).
Diffstat (limited to 'source')
-rw-r--r--source/lux.lux13
-rw-r--r--source/program.lux5
2 files changed, 8 insertions, 10 deletions
diff --git a/source/lux.lux b/source/lux.lux
index ac28bf372..bce5c421a 100644
--- a/source/lux.lux
+++ b/source/lux.lux
@@ -1970,12 +1970,14 @@
))
(def #export (print x)
- (-> Text (,))
- (_jvm_invokevirtual java.io.PrintStream print [java.lang.Object]
- (_jvm_getstatic java.lang.System out) [x]))
+ (-> Text (IO (,)))
+ (lambda [_]
+ (exec (_jvm_invokevirtual java.io.PrintStream print [java.lang.Object]
+ (_jvm_getstatic java.lang.System out) [x])
+ [])))
(def #export (println x)
- (-> Text (,))
+ (-> Text (IO (,)))
(print (text:++ x "\n")))
(def #export (some f xs)
@@ -2065,8 +2067,7 @@
(let [[sname stype] slot
[module name] (split-slot sname)]
[($tag [module name]) ($symbol ["" name])])))
- slots))
- _ (println (text:++ "Using pattern: " (syntax:show pattern)))]
+ slots))]
(#Right [state (: (List Syntax)
(list (` (_lux_case (~ struct) (~ pattern) (~ body)))))]))
diff --git a/source/program.lux b/source/program.lux
index cefec07d4..364c57d89 100644
--- a/source/program.lux
+++ b/source/program.lux
@@ -12,7 +12,4 @@
(filter p xs'))))
(_jvm_program _
- (exec (println "Hello, world!")
- (|> (int:+ 2 2) ->text ($ text:++ "2 + 2 = ") println)
- (println (->text (using Int:Ord
- (< 5 10))))))
+ (println "Hello, world!"))