From 3b909404c184e055ed207b0c0da493ad1506fd3b Mon Sep 17 00:00:00 2001 From: yamacir-kit Date: Sun, 8 Oct 2023 02:29:58 +0900 Subject: [PATCH] Unify procedure-related structures into a single template `procedure` Signed-off-by: yamacir-kit --- README.md | 6 +- VERSION | 2 +- include/meevax/kernel/configurator.hpp | 12 +- include/meevax/kernel/library.hpp | 6 + include/meevax/kernel/pair.hpp | 6 + include/meevax/kernel/procedure.hpp | 134 ++----- .../meevax/kernel/syntactic_environment.hpp | 6 + src/kernel/boot.cpp | 338 +++++++++--------- src/kernel/procedure.cpp | 8 +- 9 files changed, 237 insertions(+), 281 deletions(-) diff --git a/README.md b/README.md index 88ac7264b..9fa31ef64 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Procedures for each standard are provided by the following R7RS-style libraries: cmake -B build -DCMAKE_BUILD_TYPE=Release cd build make package -sudo apt install build/meevax_0.5.29_amd64.deb +sudo apt install build/meevax_0.5.30_amd64.deb ``` or @@ -131,9 +131,9 @@ sudo rm -rf /usr/local/share/meevax | Target Name | Description |-------------|------------- -| `all` | Build shared-library `libmeevax.0.5.29.so` and executable `meevax` +| `all` | Build shared-library `libmeevax.0.5.30.so` and executable `meevax` | `test` | Test executable `meevax` -| `package` | Generate debian package `meevax_0.5.29_amd64.deb` +| `package` | Generate debian package `meevax_0.5.30_amd64.deb` | `install` | Copy files into `/usr/local` directly ## Usage diff --git a/VERSION b/VERSION index 7c96be4ee..9dad0d549 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.29 +0.5.30 diff --git a/include/meevax/kernel/configurator.hpp b/include/meevax/kernel/configurator.hpp index 148166a3d..6cf2a7b09 100644 --- a/include/meevax/kernel/configurator.hpp +++ b/include/meevax/kernel/configurator.hpp @@ -66,7 +66,7 @@ inline namespace kernel { option("(i|interactive)", [this](auto) { - let const f = make("", [this](let const&) + let const f = make("", [this](let const&) { interactive = true; return unspecified; @@ -82,7 +82,7 @@ inline namespace kernel option("(h|help)", [](auto) { - let static const f = make("", [](let const&) + let static const f = make("", [](let const&) { std::cout << help() << std::endl; throw EXIT_SUCCESS; @@ -93,7 +93,7 @@ inline namespace kernel option("(l|load)", [this](auto read) { - let const f = make("", [this](let const& xs) + let const f = make("", [this](let const& xs) { static_cast(*this).load(xs[0].as()); return unspecified; @@ -104,7 +104,7 @@ inline namespace kernel option("(v|version)", [](auto) { - let static const f = make("", [](let const&) + let static const f = make("", [](let const&) { std::cout << version() << std::endl; throw EXIT_SUCCESS; @@ -115,7 +115,7 @@ inline namespace kernel option("(w|write)", [](auto read) { - let static const f = make("", [](let const& xs) + let static const f = make("", [](let const& xs) { std::cout << xs[0] << std::endl; }); @@ -184,7 +184,7 @@ inline namespace kernel } else { - let const f = make("", [iter](let const&) + let const f = make("", [iter](let const&) { Environment().load(*iter); return unspecified; diff --git a/include/meevax/kernel/library.hpp b/include/meevax/kernel/library.hpp index 7041c4a11..4656460b0 100644 --- a/include/meevax/kernel/library.hpp +++ b/include/meevax/kernel/library.hpp @@ -47,6 +47,12 @@ inline namespace kernel export_specs = cons(input_string_port(name).read(), export_specs); } + template