From a7b921974b5318c4344d28092519566424675f02 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 11 Jan 2020 20:52:48 -0400 Subject: Re-located compiler's version. --- stdlib/source/lux/tool/compiler/default.lux | 6 ------ stdlib/source/lux/tool/compiler/default/init.lux | 15 ++++++++------- stdlib/source/lux/tool/compiler/language/lux/version.lux | 6 ++++++ stdlib/source/lux/tool/compiler/meta/archive.lux | 3 --- .../source/lux/tool/compiler/meta/archive/signature.lux | 2 +- stdlib/source/lux/tool/compiler/version.lux | 4 ++++ 6 files changed, 19 insertions(+), 17 deletions(-) delete mode 100644 stdlib/source/lux/tool/compiler/default.lux create mode 100644 stdlib/source/lux/tool/compiler/language/lux/version.lux create mode 100644 stdlib/source/lux/tool/compiler/version.lux (limited to 'stdlib') diff --git a/stdlib/source/lux/tool/compiler/default.lux b/stdlib/source/lux/tool/compiler/default.lux deleted file mode 100644 index 726562cc8..000000000 --- a/stdlib/source/lux/tool/compiler/default.lux +++ /dev/null @@ -1,6 +0,0 @@ -(.module: - [lux #*]) - -(type: #export Version Text) - -(def: #export version Version "0.6.0") diff --git a/stdlib/source/lux/tool/compiler/default/init.lux b/stdlib/source/lux/tool/compiler/default/init.lux index 14d04a226..baf1501aa 100644 --- a/stdlib/source/lux/tool/compiler/default/init.lux +++ b/stdlib/source/lux/tool/compiler/default/init.lux @@ -15,11 +15,12 @@ ["." macro] [world ["." file]]] - ["." // + ["." // #_ ["/#" // (#+ Instancer) [language [lux - ["." syntax (#+ Aliases)] + ["#." version] + ["#." syntax (#+ Aliases)] ["#." analysis [macro (#+ Expander)] ["#/." evaluation]] @@ -48,7 +49,7 @@ (def: #export (info target) (-> Text Info) {#.target target - #.version //.version + #.version ///version.version #.mode #.Build}) (def: #export (state target expander host-analysis host generate generation-bundle host-directive-bundle program extender) @@ -84,7 +85,7 @@ (-> Module Aliases Source (///analysis.Operation Reader)) (function (_ [bundle state]) (#try.Success [[bundle state] - (syntax.parse current-module aliases ("lux text size" source-code))]))) + (///syntax.parse current-module aliases ("lux text size" source-code))]))) (def: (read source reader) (-> Source Reader (///analysis.Operation [Source Code])) @@ -179,7 +180,7 @@ (#try.Success [state (#.Some source&requirements&buffer)]) (#try.Failure error) - (if (ex.match? syntax.end-of-file error) + (if (ex.match? ///syntax.end-of-file error) (#try.Success [state #.None]) (ex.with-stack ///.cannot-compile module (#try.Failure error))))))) @@ -208,7 +209,7 @@ (..begin dependencies hash input)) #let [module (get@ #///.module input)]] (loop [iteration (<| (///phase.run' state) - (..iterate expander module source buffer syntax.no-aliases))] + (..iterate expander module source buffer ///syntax.no-aliases))] (do @ [[state ?source&requirements&buffer] iteration] (case ?source&requirements&buffer @@ -252,5 +253,5 @@ (def: #export key (Key .Module) (key.key {#signature.name (name-of ..compiler) - #signature.version //.version} + #signature.version ///version.version} (module.new 0))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/version.lux b/stdlib/source/lux/tool/compiler/language/lux/version.lux new file mode 100644 index 000000000..013cdc72e --- /dev/null +++ b/stdlib/source/lux/tool/compiler/language/lux/version.lux @@ -0,0 +1,6 @@ +(.module: + [lux #*] + [//// + [version (#+ Version)]]) + +(def: #export version Version "0.6.0") diff --git a/stdlib/source/lux/tool/compiler/meta/archive.lux b/stdlib/source/lux/tool/compiler/meta/archive.lux index 06323df9c..a7e1ffe16 100644 --- a/stdlib/source/lux/tool/compiler/meta/archive.lux +++ b/stdlib/source/lux/tool/compiler/meta/archive.lux @@ -15,15 +15,12 @@ abstract] [world [file (#+ File)]]] - [/// - [default (#+ Version)]] [/ ["." signature (#+ Signature)] ["." key (#+ Key)] ["." descriptor (#+ Module Descriptor)] ["." document (#+ Document)]]) -## Archive (exception: #export (unknown-document {module Module}) (ex.report ["Module" module])) diff --git a/stdlib/source/lux/tool/compiler/meta/archive/signature.lux b/stdlib/source/lux/tool/compiler/meta/archive/signature.lux index c9e1818fd..551c54579 100644 --- a/stdlib/source/lux/tool/compiler/meta/archive/signature.lux +++ b/stdlib/source/lux/tool/compiler/meta/archive/signature.lux @@ -7,7 +7,7 @@ ["." text ["%" format (#+ format)]]]] [//// - [default (#+ Version)]]) + [version (#+ Version)]]) (type: #export Signature {#name Name diff --git a/stdlib/source/lux/tool/compiler/version.lux b/stdlib/source/lux/tool/compiler/version.lux new file mode 100644 index 000000000..d2c14c50b --- /dev/null +++ b/stdlib/source/lux/tool/compiler/version.lux @@ -0,0 +1,4 @@ +(.module: + [lux #*]) + +(type: #export Version Text) -- cgit v1.2.3