diff options
author | Eduardo Julian | 2017-10-11 18:57:44 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-11 18:57:44 -0400 |
commit | 74a835634fc9ee5457f3cc7109af069dad9f2d2f (patch) | |
tree | dec444467ecde32ac165627f782f315ac41567e8 /new-luxc/source/luxc/analyser/procedure.lux | |
parent | ccabfc6a5e41650788199cb8fd5d87731f094bcd (diff) |
- Migrated new-luxc to latest version of stdlib.
- Some refactoring.
Diffstat (limited to 'new-luxc/source/luxc/analyser/procedure.lux')
-rw-r--r-- | new-luxc/source/luxc/analyser/procedure.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/new-luxc/source/luxc/analyser/procedure.lux b/new-luxc/source/luxc/analyser/procedure.lux index 064a28e9b..23fbae198 100644 --- a/new-luxc/source/luxc/analyser/procedure.lux +++ b/new-luxc/source/luxc/analyser/procedure.lux @@ -1,23 +1,23 @@ (;module: lux (lux (control [monad #+ do]) - (data [text] + (data [maybe] + [text] text/format - (coll ["d" dict]) - [maybe])) + (coll [dict]))) (luxc ["&" base] - (lang ["la" analysis #+ Analysis])) + (lang ["la" analysis])) (. ["./;" common] ["./;" host])) (def: procedures ./common;Bundle (|> ./common;procedures - (d;merge ./host;procedures))) + (dict;merge ./host;procedures))) (def: #export (analyse-procedure analyse proc-name proc-args) - (-> &;Analyser Text (List Code) (Lux Analysis)) - (default (&;fail (format "Unknown procedure: " (%t proc-name))) - (do maybe;Monad<Maybe> - [proc (d;get proc-name procedures)] - (wrap (proc analyse proc-args))))) + (-> &;Analyser Text (List Code) (Lux la;Analysis)) + (<| (maybe;default (&;fail (format "Unknown procedure: " (%t proc-name)))) + (do maybe;Monad<Maybe> + [proc (dict;get proc-name procedures)] + (wrap (proc analyse proc-args))))) |