aboutsummaryrefslogtreecommitdiff
path: root/source/program.lux
diff options
context:
space:
mode:
authorLuxLang2015-07-29 20:41:46 -0400
committerLuxLang2015-07-29 20:41:46 -0400
commit3b0b7de8d898662ba154aa8cbd578d26fb91e62e (patch)
treeb89d963155f48664913e72457fdd0e200bd14831 /source/program.lux
parent2aca948eddd42300a936fd449b8ab77333d95146 (diff)
parent3bf6cc274a81821243a68b3bd81e88e6a8c2a07a (diff)
Merge pull request #4 from LuxLang/v0.2
V0.2
Diffstat (limited to '')
-rw-r--r--source/program.lux60
1 files changed, 45 insertions, 15 deletions
diff --git a/source/program.lux b/source/program.lux
index 22bbad2d5..086506725 100644
--- a/source/program.lux
+++ b/source/program.lux
@@ -1,18 +1,48 @@
-(;alias-lux)
+## Copyright (c) Eduardo Julian. All rights reserved.
+## The use and distribution terms for this software are covered by the
+## Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+## which can be found in the file epl-v10.html at the root of this distribution.
+## By using this software in any fashion, you are agreeing to be bound by
+## the terms of this license.
+## You must not remove this notice, or any other, from this software.
-(def (filter p xs)
- (All [a] (-> (-> a Bool) (List a) (List a)))
- (case xs
- #;Nil
- (list)
+(;import lux
+ (lux (codata (stream #as S))
+ (control monoid
+ functor
+ monad
+ lazy
+ comonad)
+ (data bool
+ bounded
+ char
+ ## cont
+ dict
+ (either #as e)
+ eq
+ error
+ id
+ io
+ list
+ maybe
+ number
+ ord
+ (reader #as r)
+ show
+ state
+ (text #as t #open ("text:" Text/Monoid))
+ writer)
+ (host jvm)
+ (meta lux
+ macro
+ syntax)
+ (math #as m)
+ ))
- (#;Cons [x xs'])
- (if (p x)
- (list& x (filter p xs'))
- (filter p xs'))))
+(program args
+ (case args
+ (\ (list name))
+ (println ($ text:++ "Hello, " name "!"))
-(jvm-program _
- (exec (println "Hello, world!")
- (println ($ text:++ "2 + 2 = " (->text (int:+ 2 2))))
- (println (->text (using Int:Ord
- (< 5 10))))))
+ _
+ (println "Hello, world!")))