From b14102eaa2a80f51f160ba293ec01928dbe683c3 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 22 Jul 2018 02:52:46 -0400 Subject: - Some fixes due to recent changes in stdlib. - Removed some (now) useless modules. --- .../luxc/lang/translation/php/procedure.jvm.lux | 30 ---------------------- .../luxc/lang/translation/php/reference.jvm.lux | 4 +-- .../luxc/lang/translation/php/statement.jvm.lux | 12 ++++----- 3 files changed, 8 insertions(+), 38 deletions(-) delete mode 100644 new-luxc/source/luxc/lang/translation/php/procedure.jvm.lux (limited to 'new-luxc/source/luxc/lang/translation/php') diff --git a/new-luxc/source/luxc/lang/translation/php/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/php/procedure.jvm.lux deleted file mode 100644 index ab73cddee..000000000 --- a/new-luxc/source/luxc/lang/translation/php/procedure.jvm.lux +++ /dev/null @@ -1,30 +0,0 @@ -(.module: - lux - (lux (control [monad #+ do] - ["ex" exception #+ exception:]) - (data [maybe] - [text] - text/format - (coll (dictionary ["dict" unordered #+ Dict])))) - (luxc ["&" lang] - (lang ["ls" synthesis] - (host ["_" php #+ Expression Statement]))) - [//] - (/ ["/." common] - ["/." host])) - -(exception: #export (Unknown-Procedure {message Text}) - message) - -(def: procedures - /common.Bundle - (|> /common.procedures - (dict.merge /host.procedures))) - -(def: #export (translate-procedure translate name args) - (-> (-> ls.Synthesis (Meta Expression)) Text (List ls.Synthesis) - (Meta Expression)) - (<| (maybe.default (&.throw Unknown-Procedure (%t name))) - (do maybe.Monad - [proc (dict.get name procedures)] - (wrap (proc translate args))))) diff --git a/new-luxc/source/luxc/lang/translation/php/reference.jvm.lux b/new-luxc/source/luxc/lang/translation/php/reference.jvm.lux index 4364d87ea..833fc5e5a 100644 --- a/new-luxc/source/luxc/lang/translation/php/reference.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/php/reference.jvm.lux @@ -24,7 +24,7 @@ (variable (:coerce Nat var)))) (def: #export global - (-> Ident Var) + (-> Name Var) (|>> //.definition-name _.var)) (do-template [ ] @@ -33,5 +33,5 @@ (|>> (:: macro.Monad wrap)))] [translate-variable Variable local] - [translate-definition Ident global] + [translate-definition Name global] ) diff --git a/new-luxc/source/luxc/lang/translation/php/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/php/statement.jvm.lux index d4b4a03a8..7c2482af6 100644 --- a/new-luxc/source/luxc/lang/translation/php/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/php/statement.jvm.lux @@ -14,20 +14,20 @@ (-> Text Type Expression Code (Meta Any)) (do macro.Monad [current-module macro.current-module-name - #let [def-ident [current-module name]]] - (case (macro.get-identifier-ann (ident-for #.alias) metaV) + #let [def-name [current-module name]]] + (case (macro.get-identifier-ann (name-of #.alias) metaV) (#.Some real-def) (do @ [[realT realA realV] (macro.find-def real-def) - _ (moduleL.define def-ident [realT metaV realV])] + _ (moduleL.define def-name [realT metaV realV])] (wrap [])) _ (do @ - [#let [def-name (referenceT.global def-ident)] + [#let [def-name (referenceT.global def-name)] _ (//.save (_.set! def-name expressionO)) expressionV (evalT.eval def-name) - _ (moduleL.define def-ident [expressionT metaV expressionV]) + _ (moduleL.define def-name [expressionT metaV expressionV]) _ (if (macro.type? metaV) (case (macro.declared-tags metaV) #.Nil @@ -36,7 +36,7 @@ tags (moduleL.declare-tags tags (macro.export? metaV) (:coerce Type expressionV))) (wrap [])) - #let [_ (log! (format "DEF " (%ident def-ident)))]] + #let [_ (log! (format "DEF " (%name def-name)))]] (wrap [])) ))) -- cgit v1.2.3