diff options
author | Eduardo Julian | 2017-06-30 18:43:07 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-06-30 18:43:07 -0400 |
commit | a79927892174c3564c83a0e741e5cc0aaaeeb37c (patch) | |
tree | 780936163414dd6105cf00bb5debb8ee9a7a518a /new-luxc/source/luxc/generator/procedure.jvm.lux | |
parent | 36cf0c61991bda395e224fa2d435fa6b6f5090e5 (diff) |
- WIP: Added generation for common procedures.
Diffstat (limited to 'new-luxc/source/luxc/generator/procedure.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/generator/procedure.jvm.lux | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/generator/procedure.jvm.lux b/new-luxc/source/luxc/generator/procedure.jvm.lux new file mode 100644 index 000000000..258d90689 --- /dev/null +++ b/new-luxc/source/luxc/generator/procedure.jvm.lux @@ -0,0 +1,19 @@ + +(;module: + lux + (lux (control monad) + (data text/format + maybe + (coll ["d" dict]))) + (luxc ["&" base] + (lang ["ls" synthesis]) + (generator (procedure ["&&;" common]) + (host ["$" jvm])))) + +(def: #export (generate-procedure generate name args) + (-> (-> ls;Synthesis (Lux $;Inst)) Text (List ls;Synthesis) + (Lux $;Inst)) + (default (&;fail (format "Unknown procedure: " (%t name))) + (do Monad<Maybe> + [proc (d;get name &&common;procedures)] + (wrap (proc generate args))))) |