diff options
author | Eduardo Julian | 2015-09-11 19:46:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-09-11 19:46:30 -0400 |
commit | 5a26c40dc215dfb22a77cad28455deff28ca9976 (patch) | |
tree | 2b2af63d2d6b5a68df72f65f4f570f8f0531d347 /source/lux/host/jvm.lux | |
parent | 113143d5d2e86185a8fca5214cfa57b4456bfbbb (diff) |
- Implemented the with-open macro.
- Cleaned-up a bit the tag-generation macro "deftags".
Diffstat (limited to '')
-rw-r--r-- | source/lux/host/jvm.lux | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/lux/host/jvm.lux b/source/lux/host/jvm.lux index 6f121a633..c1e122bb6 100644 --- a/source/lux/host/jvm.lux +++ b/source/lux/host/jvm.lux @@ -95,7 +95,7 @@ (emit (@list (` (;_jvm_program (~ (symbol$ args)) (~ body)))))) -(defsyntax #export (->maybe expr) +(defsyntax #export (??? expr) (do Lux/Monad [g!val (gensym "")] (emit (@list (` (let [(~ g!val) (~ expr)] @@ -103,7 +103,7 @@ #;None (#;Some (~ g!val))))))))) -(defsyntax #export (try$ expr) +(defsyntax #export (try expr) (emit (@list (` (;_jvm_try (#;Right (~ expr)) (~ (' (_jvm_catch "java.lang.Exception" e (#;Left (_jvm_invokevirtual "java.lang.Throwable" "getMessage" [] e [])))))))))) |