From 5e45ec0419293fdde30cc9e3f0326e44ddd7442a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 27 May 2015 00:57:57 -0400 Subject: - _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). --- source/lux.lux | 13 +++++++------ source/program.lux | 5 +---- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'source') 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!")) -- cgit v1.2.3