diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/analyser.lux | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/new-luxc/source/luxc/analyser.lux b/new-luxc/source/luxc/analyser.lux index 97312b805..b10f29369 100644 --- a/new-luxc/source/luxc/analyser.lux +++ b/new-luxc/source/luxc/analyser.lux @@ -67,28 +67,28 @@ (#;Symbol reference) (&&reference;analyse-reference reference) - (^ (#;Form (list [_ (#;Symbol ["" "_lux_function"])] + (^ (#;Form (list [_ (#;Text "lux function")] [_ (#;Symbol ["" func-name])] [_ (#;Symbol ["" arg-name])] body))) (&&function;analyse-function analyse func-name arg-name body) - (^template [<proc> <analyser>] - (^ (#;Form (list [_ (#;Symbol ["" <proc>])] type value))) + (^template [<special> <analyser>] + (^ (#;Form (list [_ (#;Text <special>)] type value))) (<analyser> analyse eval type value)) - (["_lux_check" &&type;analyse-check] - ["_lux_coerce" &&type;analyse-coerce]) + (["lux check" &&type;analyse-check] + ["lux coerce" &&type;analyse-coerce]) - (^ (#;Form (list& [_ (#;Text proc-name)] proc-args))) - (&&procedure;analyse-procedure analyse proc-name proc-args) - - (^ (#;Form (list& [_ (#;Symbol ["" "_lux_case"])] + (^ (#;Form (list& [_ (#;Text "lux case")] input branches))) (do meta;Monad<Meta> [paired (to-branches branches)] (&&case;analyse-case analyse input paired)) + (^ (#;Form (list& [_ (#;Text proc-name)] proc-args))) + (&&procedure;analyse-procedure analyse proc-name proc-args) + (^template [<tag> <analyser>] (^ (#;Form (list& [_ (<tag> tag)] values))) @@ -101,6 +101,9 @@ ([#;Nat &&structure;analyse-sum] [#;Tag &&structure;analyse-tagged-sum]) + (#;Tag tag) + (&&structure;analyse-tagged-sum analyse tag (' [])) + (^ (#;Form (list& func args))) (do meta;Monad<Meta> [[funcT =func] (&&common;with-unknown-type |