diff options
author | Eduardo Julian | 2015-09-01 11:18:26 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-09-01 11:18:26 -0400 |
commit | 2cfaf65019015ffe34fba5d5a723b94350cd4e84 (patch) | |
tree | 43c8582e355b3fbef5cfd011dbe24a65b17588f3 /source/program.lux | |
parent | 7f0aa70c6115f9321e13f0452d724b9b40c3f981 (diff) |
- Added a macro to write recursive types.
- Corrected some code that still involved the old names for the list macros.
- Corrected some code in the pattern-matcher analyser to it fails properly when encountering invalid pattern-syntax.
Diffstat (limited to 'source/program.lux')
-rw-r--r-- | source/program.lux | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/source/program.lux b/source/program.lux index 716e3e6c6..1b6c6f398 100644 --- a/source/program.lux +++ b/source/program.lux @@ -4,32 +4,30 @@ ## You can obtain one at http://mozilla.org/MPL/2.0/. (;import lux - (lux (control monoid + (lux (control (monoid #as m) functor monad comonad bounded - dict eq hash - ord - show - number - stack) + (ord #as O) + (show #as S) + number) (data bool char (either #as e) - error id io - list + (list #refer #all #open ("list:" List/Functor)) maybe - (number int + (number (int #refer #all #open ("" Int/Show)) real) - (text #refer (#only <>)) + (text #refer (#only <>) #open ("text:" Text/Monoid)) writer - tuple) - (codata (stream #as S) + tuple + ) + (codata (stream #as s) lazy function (reader #as r) @@ -39,13 +37,14 @@ lux macro syntax) - (math #as m) + math )) (program args (case args - (\ (list name)) + (\ (@list name)) (println (<> "Hello, #{name}!")) _ - (println "Hello, world!"))) + (println "Hello, world!") + )) |