diff options
author | Eduardo Julian | 2018-01-08 21:29:02 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-01-08 21:29:02 -0400 |
commit | f523bc14d43286348aeb200bd0554812dc6ef28d (patch) | |
tree | 58876df8fc7b6ec9384c8ed4239a290567120542 /new-luxc/source/luxc/lang/extension/statement.lux | |
parent | b7d53027deeb185fa7b4312ba7079aa566762513 (diff) |
- Now using synthesis extensions during synthesis.
Diffstat (limited to 'new-luxc/source/luxc/lang/extension/statement.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/extension/statement.lux | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/new-luxc/source/luxc/lang/extension/statement.lux b/new-luxc/source/luxc/lang/extension/statement.lux index afabf867b..7eb2b36bf 100644 --- a/new-luxc/source/luxc/lang/extension/statement.lux +++ b/new-luxc/source/luxc/lang/extension/statement.lux @@ -9,7 +9,7 @@ [macro] (lang (type ["tc" check])) [io #+ IO]) - [//] + [// #+ Syntheses] (luxc [lang] (lang [".L" host] [".L" scope] @@ -36,13 +36,13 @@ (format "\n " (%n idx) " " (%code inputC)))) (text.join-with "")) "\n"))) -(def: (process-annotations annsC) - (-> Code (Meta [$.Inst Code])) +(def: (process-annotations syntheses annsC) + (-> Syntheses Code (Meta [$.Inst Code])) (do macro.Monad<Meta> [[_ annsA] (lang.with-scope (lang.with-type Code (expressionA.analyser evalL.eval annsC))) - annsI (expressionT.translate (expressionS.synthesize annsA)) + annsI (expressionT.translate (expressionS.synthesize syntheses annsA)) annsV (evalT.eval annsI)] (wrap [annsI (:! Code annsV)]))) @@ -64,7 +64,8 @@ (hostL.with-context def-name (lang.with-fresh-type-env (do macro.Monad<Meta> - [[annotationsI annotationsV] (process-annotations annotationsC)] + [syntheses //.all-syntheses + [annotationsI annotationsV] (process-annotations syntheses annotationsC)] (case (macro.get-symbol-ann (ident-for #.alias) annotationsV) (#.Some real-def) (do @ @@ -85,7 +86,7 @@ (expressionA.analyser evalL.eval valueC)))) valueT (lang.with-type-env (tc.clean valueT)) - valueI (expressionT.translate (expressionS.synthesize valueA)) + valueI (expressionT.translate (expressionS.synthesize syntheses valueA)) _ (lang.with-scope (statementT.translate-def def-name valueT valueI annotationsI annotationsV))] (wrap [])))))) @@ -103,7 +104,8 @@ (scopeL.with-local [args (type (List Text))]) (lang.with-type (type (IO Unit))) (expressionA.analyser evalL.eval programC)) - programI (expressionT.translate (expressionS.synthesize programA)) + syntheses //.all-syntheses + programI (expressionT.translate (expressionS.synthesize syntheses programA)) _ (statementT.translate-program programI)] (wrap [])) @@ -120,7 +122,8 @@ [[_ valueA] (lang.with-scope (lang.with-type <type> (expressionA.analyser evalL.eval valueC))) - valueI (expressionT.translate (expressionS.synthesize valueA)) + syntheses //.all-syntheses + valueI (expressionT.translate (expressionS.synthesize syntheses valueA)) valueV (evalT.eval valueI) _ (<installer> name (:! <type> valueV))] (wrap [])) |