diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-07-02 04:00:06 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-07-02 04:00:06 +0100 |
| commit | 5adeb648f74c1771164c0686d6e0fc584cf36d9e (patch) | |
| tree | 060cd918d3dd9e931a1541a43c9edff1a404ff47 | |
| parent | 06fafff8e9e9c096cc39bde0306caa53ad3a2351 (diff) | |
| download | nihil-5adeb648f74c1771164c0686d6e0fc584cf36d9e.tar.gz nihil-5adeb648f74c1771164c0686d6e0fc584cf36d9e.tar.bz2 | |
move everything from util to core
| -rw-r--r-- | CMakeLists.txt | 1 | ||||
| -rw-r--r-- | nihil.cli/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | nihil.cli/command_tree.ccm | 3 | ||||
| -rw-r--r-- | nihil.cli/dispatch_command.test.cc | 2 | ||||
| -rw-r--r-- | nihil.cli/usage_error.ccm | 2 | ||||
| -rw-r--r-- | nihil.config/option.cc | 2 | ||||
| -rw-r--r-- | nihil.config/option.ccm | 2 | ||||
| -rw-r--r-- | nihil.config/read.ccm | 3 | ||||
| -rw-r--r-- | nihil.config/store.cc | 2 | ||||
| -rw-r--r-- | nihil.config/store.ccm | 2 | ||||
| -rw-r--r-- | nihil.config/string.ccm | 3 | ||||
| -rw-r--r-- | nihil.config/write.ccm | 3 | ||||
| -rw-r--r-- | nihil.core/CMakeLists.txt | 16 | ||||
| -rw-r--r-- | nihil.core/capture_stream.ccm (renamed from nihil.util/capture_stream.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/capture_stream.test.cc (renamed from nihil.util/capture_stream.test.cc) | 2 | ||||
| -rw-r--r-- | nihil.core/construct.ccm (renamed from nihil.util/construct.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/ctype.ccm (renamed from nihil.util/ctype.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/ctype.test.cc (renamed from nihil.util/ctype.test.cc) | 2 | ||||
| -rw-r--r-- | nihil.core/error.ccm (renamed from nihil.util/error.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/error.test.cc (renamed from nihil.util/error.test.cc) | 0 | ||||
| -rw-r--r-- | nihil.core/flagset.ccm (renamed from nihil.util/flagset.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/flagset.test.cc (renamed from nihil.util/flagset.test.cc) | 2 | ||||
| -rw-r--r-- | nihil.core/guard.ccm (renamed from nihil.util/guard.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/guard.test.cc (renamed from nihil.util/guard.test.cc) | 2 | ||||
| -rw-r--r-- | nihil.core/match.ccm (renamed from nihil.util/match.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/match.test.cc (renamed from nihil.util/match.test.cc) | 2 | ||||
| -rw-r--r-- | nihil.core/monad.ccm (renamed from nihil.util/monad.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/monad.test.cc (renamed from nihil.util/monad.test.cc) | 2 | ||||
| -rw-r--r-- | nihil.core/next_word.ccm (renamed from nihil.util/next_word.ccm) | 5 | ||||
| -rw-r--r-- | nihil.core/next_word.test.cc (renamed from nihil.util/next_word.test.cc) | 2 | ||||
| -rw-r--r-- | nihil.core/nihil.core.ccm | 15 | ||||
| -rw-r--r-- | nihil.core/parse_size.ccm (renamed from nihil.util/parse_size.ccm) | 4 | ||||
| -rw-r--r-- | nihil.core/parse_size.test.cc (renamed from nihil.util/parse_size.test.cc) | 1 | ||||
| -rw-r--r-- | nihil.core/save_errno.ccm (renamed from nihil.util/save_errno.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/skipws.ccm (renamed from nihil.util/skipws.ccm) | 3 | ||||
| -rw-r--r-- | nihil.core/skipws.test.cc (renamed from nihil.util/skipws.test.cc) | 4 | ||||
| -rw-r--r-- | nihil.core/sys_error.ccm (renamed from nihil.util/sys_error.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/tabulate.ccm (renamed from nihil.util/tabulate.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/tabulate.test.cc (renamed from nihil.util/tabulate.test.cc) | 4 | ||||
| -rw-r--r-- | nihil.core/uuid.ccm (renamed from nihil.util/uuid.ccm) | 2 | ||||
| -rw-r--r-- | nihil.core/uuid.test.cc (renamed from nihil.util/uuid.test.cc) | 2 | ||||
| -rw-r--r-- | nihil.posix/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | nihil.posix/ensure_dir.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/execlp.ccm | 3 | ||||
| -rw-r--r-- | nihil.posix/execv.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/execvp.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/fd.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/fd.test.cc | 2 | ||||
| -rw-r--r-- | nihil.posix/find_in_path.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/find_in_path.test.cc | 2 | ||||
| -rw-r--r-- | nihil.posix/getenv.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/getenv.test.cc | 2 | ||||
| -rw-r--r-- | nihil.posix/open.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/open.test.cc | 2 | ||||
| -rw-r--r-- | nihil.posix/open_in_path.ccm | 3 | ||||
| -rw-r--r-- | nihil.posix/open_in_path.test.cc | 2 | ||||
| -rw-r--r-- | nihil.posix/process.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/read_file.ccm | 3 | ||||
| -rw-r--r-- | nihil.posix/rename.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/spawn.ccm | 3 | ||||
| -rw-r--r-- | nihil.posix/stat.ccm | 3 | ||||
| -rw-r--r-- | nihil.posix/stat.test.cc | 2 | ||||
| -rw-r--r-- | nihil.posix/tempfile.ccm | 3 | ||||
| -rw-r--r-- | nihil.posix/unistd.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/unlink.ccm | 2 | ||||
| -rw-r--r-- | nihil.posix/write_file.ccm | 3 | ||||
| -rw-r--r-- | nihil.ucl/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | nihil.ucl/integer.ccm | 2 | ||||
| -rw-r--r-- | nihil.ucl/object_cast.ccm | 3 | ||||
| -rw-r--r-- | nihil.ucl/parser.ccm | 3 | ||||
| -rw-r--r-- | nihil.ucl/type.ccm | 2 | ||||
| -rw-r--r-- | nihil.util/CMakeLists.txt | 59 | ||||
| -rw-r--r-- | nihil.util/nihil.util.ccm | 18 |
73 files changed, 123 insertions, 148 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 84927d8..af2bb8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,6 @@ add_subdirectory(nihil.cli) add_subdirectory(nihil.core) add_subdirectory(nihil.generator) add_subdirectory(nihil.posix) -add_subdirectory(nihil.util) if(NIHIL_UCL) add_subdirectory(nihil.ucl) diff --git a/nihil.cli/CMakeLists.txt b/nihil.cli/CMakeLists.txt index 22fc1de..e87d3d4 100644 --- a/nihil.cli/CMakeLists.txt +++ b/nihil.cli/CMakeLists.txt @@ -1,12 +1,14 @@ # This source code is released into the public domain. add_library(nihil.cli STATIC) + target_link_libraries(nihil.cli PRIVATE nihil.std + nihil.core nihil.generator nihil.posix - nihil.util ) + target_sources(nihil.cli PUBLIC FILE_SET modules TYPE CXX_MODULES FILES nihil.cli.ccm @@ -29,8 +31,10 @@ if(NIHIL_TESTS) command_tree.test.cc dispatch_command.test.cc ) + target_link_libraries(nihil.cli.test PRIVATE nihil.std + nihil.core nihil.cli Catch2::Catch2WithMain ) diff --git a/nihil.cli/command_tree.ccm b/nihil.cli/command_tree.ccm index 8ed16c7..844b2cf 100644 --- a/nihil.cli/command_tree.ccm +++ b/nihil.cli/command_tree.ccm @@ -3,7 +3,8 @@ export module nihil.cli:command_tree; import nihil.std; import nihil.generator; -import nihil.util; +import nihil.core; + import :command; import :registry; diff --git a/nihil.cli/dispatch_command.test.cc b/nihil.cli/dispatch_command.test.cc index 8253bdc..a74fa36 100644 --- a/nihil.cli/dispatch_command.test.cc +++ b/nihil.cli/dispatch_command.test.cc @@ -6,7 +6,7 @@ import nihil.std; import nihil.cli; -import nihil.util; +import nihil.core; namespace { diff --git a/nihil.cli/usage_error.ccm b/nihil.cli/usage_error.ccm index 8502755..497af89 100644 --- a/nihil.cli/usage_error.ccm +++ b/nihil.cli/usage_error.ccm @@ -2,7 +2,7 @@ export module nihil.cli:usage_error; import nihil.std; -import nihil.util; +import nihil.core; namespace nihil { diff --git a/nihil.config/option.cc b/nihil.config/option.cc index 5f163ac..5a09ca8 100644 --- a/nihil.config/option.cc +++ b/nihil.config/option.cc @@ -2,8 +2,8 @@ module nihil.config; import nihil.std; +import nihil.core; import nihil.ucl; -import nihil.util; namespace nihil::config { diff --git a/nihil.config/option.ccm b/nihil.config/option.ccm index 8c64653..24a3339 100644 --- a/nihil.config/option.ccm +++ b/nihil.config/option.ccm @@ -2,7 +2,7 @@ export module nihil.config:option; import nihil.std; -import nihil.util; +import nihil.core; import nihil.ucl; namespace nihil::config { diff --git a/nihil.config/read.ccm b/nihil.config/read.ccm index 1c1b897..94e9157 100644 --- a/nihil.config/read.ccm +++ b/nihil.config/read.ccm @@ -2,9 +2,10 @@ export module nihil.config:read; import nihil.std; +import nihil.core; import nihil.posix; import nihil.ucl; -import nihil.util; + import :option; import :store; diff --git a/nihil.config/store.cc b/nihil.config/store.cc index ed8de1d..08850c4 100644 --- a/nihil.config/store.cc +++ b/nihil.config/store.cc @@ -2,8 +2,8 @@ module nihil.config; import nihil.std; +import nihil.core; import nihil.generator; -import nihil.util; namespace nihil::config { diff --git a/nihil.config/store.ccm b/nihil.config/store.ccm index e4229a7..2ceb52b 100644 --- a/nihil.config/store.ccm +++ b/nihil.config/store.ccm @@ -5,7 +5,7 @@ export module nihil.config:store; import nihil.std; import nihil.generator; -import nihil.util; +import nihil.core; namespace nihil::config { diff --git a/nihil.config/string.ccm b/nihil.config/string.ccm index c5e7284..8a114d2 100644 --- a/nihil.config/string.ccm +++ b/nihil.config/string.ccm @@ -2,8 +2,9 @@ export module nihil.config:string; import nihil.std; -import nihil.util; +import nihil.core; import nihil.ucl; + import :option; namespace nihil::config { diff --git a/nihil.config/write.ccm b/nihil.config/write.ccm index be2cfd7..00d7b52 100644 --- a/nihil.config/write.ccm +++ b/nihil.config/write.ccm @@ -2,9 +2,10 @@ export module nihil.config:write; import nihil.std; +import nihil.core; import nihil.posix; import nihil.ucl; -import nihil.util; + import :option; import :store; diff --git a/nihil.core/CMakeLists.txt b/nihil.core/CMakeLists.txt index 637b825..e9998a3 100644 --- a/nihil.core/CMakeLists.txt +++ b/nihil.core/CMakeLists.txt @@ -6,6 +6,22 @@ target_include_directories(nihil.core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_sources(nihil.core PUBLIC FILE_SET modules TYPE CXX_MODULES FILES nihil.core.ccm + + capture_stream.ccm + construct.ccm + ctype.ccm errc.ccm + error.ccm features.ccm + flagset.ccm + guard.ccm + match.ccm + monad.ccm + next_word.ccm + parse_size.ccm + save_errno.ccm + skipws.ccm + sys_error.ccm + tabulate.ccm + uuid.ccm ) diff --git a/nihil.util/capture_stream.ccm b/nihil.core/capture_stream.ccm index f061558..5ab4f2d 100644 --- a/nihil.util/capture_stream.ccm +++ b/nihil.core/capture_stream.ccm @@ -1,5 +1,5 @@ // This source code is released into the public domain. -export module nihil.util:capture_stream; +export module nihil.core:capture_stream; import nihil.std; diff --git a/nihil.util/capture_stream.test.cc b/nihil.core/capture_stream.test.cc index a4821b7..4dd7db6 100644 --- a/nihil.util/capture_stream.test.cc +++ b/nihil.core/capture_stream.test.cc @@ -3,7 +3,7 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; -import nihil.util; +import nihil.core; namespace { TEST_CASE("nihil.util: capture", "[nihil][nihil.util]") diff --git a/nihil.util/construct.ccm b/nihil.core/construct.ccm index 894a446..5dd4422 100644 --- a/nihil.util/construct.ccm +++ b/nihil.core/construct.ccm @@ -1,5 +1,5 @@ // This source code is released into the public domain. -export module nihil.util:construct; +export module nihil.core:construct; import nihil.std; diff --git a/nihil.util/ctype.ccm b/nihil.core/ctype.ccm index 8f5de27..365edc0 100644 --- a/nihil.util/ctype.ccm +++ b/nihil.core/ctype.ccm @@ -1,5 +1,5 @@ // This source code is released into the public domain. -export module nihil.util:ctype; +export module nihil.core:ctype; import nihil.std; diff --git a/nihil.util/ctype.test.cc b/nihil.core/ctype.test.cc index d000b45..df73707 100644 --- a/nihil.util/ctype.test.cc +++ b/nihil.core/ctype.test.cc @@ -3,7 +3,7 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; -import nihil.util; +import nihil.core; namespace { diff --git a/nihil.util/error.ccm b/nihil.core/error.ccm index fd3aac9..5aa23f5 100644 --- a/nihil.util/error.ccm +++ b/nihil.core/error.ccm @@ -1,5 +1,5 @@ // This source code is released into the public domain. -export module nihil.util:error; +export module nihil.core:error; // error: a type representing an error. // diff --git a/nihil.util/error.test.cc b/nihil.core/error.test.cc index f4ec1ee..f4ec1ee 100644 --- a/nihil.util/error.test.cc +++ b/nihil.core/error.test.cc diff --git a/nihil.util/flagset.ccm b/nihil.core/flagset.ccm index 4c42223..cea9889 100644 --- a/nihil.util/flagset.ccm +++ b/nihil.core/flagset.ccm @@ -1,5 +1,5 @@ // This source code is released into the public domain. -export module nihil.util:flagset; +export module nihil.core:flagset; /* * flagset: a type-safe flags type. diff --git a/nihil.util/flagset.test.cc b/nihil.core/flagset.test.cc index 85cd0d3..353b638 100644 --- a/nihil.util/flagset.test.cc +++ b/nihil.core/flagset.test.cc @@ -3,7 +3,7 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; -import nihil.util; +import nihil.core; namespace { struct test_tag diff --git a/nihil.util/guard.ccm b/nihil.core/guard.ccm index 77394fc..0576042 100644 --- a/nihil.util/guard.ccm +++ b/nihil.core/guard.ccm @@ -1,5 +1,5 @@ // This source code is released into the public domain. -export module nihil.util:guard; +export module nihil.core:guard; import nihil.std; diff --git a/nihil.util/guard.test.cc b/nihil.core/guard.test.cc index 2c3ac2f..43076f5 100644 --- a/nihil.util/guard.test.cc +++ b/nihil.core/guard.test.cc @@ -2,7 +2,7 @@ #include <catch2/catch_test_macros.hpp> -import nihil.util; +import nihil.core; TEST_CASE("guard: basic", "[guard]") { int n = 0; diff --git a/nihil.util/match.ccm b/nihil.core/match.ccm index b72416a..e1c894c 100644 --- a/nihil.util/match.ccm +++ b/nihil.core/match.ccm @@ -1,5 +1,5 @@ // This source code is released into the public domain. -export module nihil.util:match; +export module nihil.core:match; import nihil.std; diff --git a/nihil.util/match.test.cc b/nihil.core/match.test.cc index 6cc0e27..2394651 100644 --- a/nihil.util/match.test.cc +++ b/nihil.core/match.test.cc @@ -3,7 +3,7 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; -import nihil.util; +import nihil.core; namespace { TEST_CASE("match", "[nihil]") diff --git a/nihil.util/monad.ccm b/nihil.core/monad.ccm index eefa1fe..ae26416 100644 --- a/nihil.util/monad.ccm +++ b/nihil.core/monad.ccm @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -export module nihil.util:monad; +export module nihil.core:monad; import nihil.std; diff --git a/nihil.util/monad.test.cc b/nihil.core/monad.test.cc index 7f39fca..e5003ac 100644 --- a/nihil.util/monad.test.cc +++ b/nihil.core/monad.test.cc @@ -3,7 +3,7 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; -import nihil.util; +import nihil.core; namespace { TEST_CASE("monad: co_await std::optional<> with value", "[nihil]") diff --git a/nihil.util/next_word.ccm b/nihil.core/next_word.ccm index 89eeaee..7fcb2be 100644 --- a/nihil.util/next_word.ccm +++ b/nihil.core/next_word.ccm @@ -1,6 +1,9 @@ // This source code is released into the public domain. -export module nihil.util:next_word; +export module nihil.core:next_word; +import nihil.std; + +import :ctype; import :skipws; namespace nihil { diff --git a/nihil.util/next_word.test.cc b/nihil.core/next_word.test.cc index 87d491a..2566ea6 100644 --- a/nihil.util/next_word.test.cc +++ b/nihil.core/next_word.test.cc @@ -3,7 +3,7 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; -import nihil.util; +import nihil.core; namespace { diff --git a/nihil.core/nihil.core.ccm b/nihil.core/nihil.core.ccm index 0aa5402..37ad032 100644 --- a/nihil.core/nihil.core.ccm +++ b/nihil.core/nihil.core.ccm @@ -1,5 +1,20 @@ // This source code is released into the public domain. export module nihil.core; +export import :capture_stream; +export import :construct; +export import :ctype; export import :errc; +export import :error; export import :features; +export import :flagset; +export import :guard; +export import :match; +export import :monad; +export import :next_word; +export import :parse_size; +export import :save_errno; +export import :skipws; +export import :sys_error; +export import :tabulate; +export import :uuid; diff --git a/nihil.util/parse_size.ccm b/nihil.core/parse_size.ccm index 51bfb4f..5f80755 100644 --- a/nihil.util/parse_size.ccm +++ b/nihil.core/parse_size.ccm @@ -1,10 +1,10 @@ // This source code is released into the public domain. -export module nihil.util:parse_size; +export module nihil.core:parse_size; import nihil.std; -import nihil.core; import :ctype; +import :errc; import :error; import :monad; diff --git a/nihil.util/parse_size.test.cc b/nihil.core/parse_size.test.cc index ee97996..6676543 100644 --- a/nihil.util/parse_size.test.cc +++ b/nihil.core/parse_size.test.cc @@ -4,7 +4,6 @@ import nihil.std; import nihil.core; -import nihil.util; namespace { TEST_CASE("parse_size: empty value", "[nihil]") diff --git a/nihil.util/save_errno.ccm b/nihil.core/save_errno.ccm index 27567f8..56eafa8 100644 --- a/nihil.util/save_errno.ccm +++ b/nihil.core/save_errno.ccm @@ -3,7 +3,7 @@ module; #include <cerrno> -export module nihil.util:save_errno; +export module nihil.core:save_errno; // save_errno: save the current value of errno and restore it when we're destroyed. // this allows wrappers around C functions that use errno to preserve the caller's diff --git a/nihil.util/skipws.ccm b/nihil.core/skipws.ccm index 0a15775..3901120 100644 --- a/nihil.util/skipws.ccm +++ b/nihil.core/skipws.ccm @@ -1,6 +1,7 @@ // This source code is released into the public domain. -export module nihil.util:skipws; +export module nihil.core:skipws; +import nihil.std; import :ctype; namespace nihil { diff --git a/nihil.util/skipws.test.cc b/nihil.core/skipws.test.cc index 0cb741c..c8163ae 100644 --- a/nihil.util/skipws.test.cc +++ b/nihil.core/skipws.test.cc @@ -3,8 +3,9 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; -import nihil.util; +import nihil.core; +namespace { TEST_CASE("skipws: basic", "[skipws]") { using namespace std::literals; @@ -44,3 +45,4 @@ TEST_CASE("skipws: locale", "[skipws]") REQUIRE(nihil::skipws(L"\u2003foo"sv) == L"\u2003foo"); REQUIRE(nihil::skipws(L"\u2003foo"sv, std::locale("C.UTF-8")) == L"foo"); } +} // anonymous namespace diff --git a/nihil.util/sys_error.ccm b/nihil.core/sys_error.ccm index a39552e..3e5911f 100644 --- a/nihil.util/sys_error.ccm +++ b/nihil.core/sys_error.ccm @@ -3,7 +3,7 @@ module; #include <cerrno> -export module nihil.util:sys_error; +export module nihil.core:sys_error; import nihil.std; diff --git a/nihil.util/tabulate.ccm b/nihil.core/tabulate.ccm index 762e2a3..98a957c 100644 --- a/nihil.util/tabulate.ccm +++ b/nihil.core/tabulate.ccm @@ -1,5 +1,5 @@ // This source code is released into the public domain. -export module nihil.util:tabulate; +export module nihil.core:tabulate; import nihil.std; diff --git a/nihil.util/tabulate.test.cc b/nihil.core/tabulate.test.cc index 408cc18..e1ea32f 100644 --- a/nihil.util/tabulate.test.cc +++ b/nihil.core/tabulate.test.cc @@ -3,11 +3,12 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; -import nihil.util; +import nihil.core; using namespace std::literals; using namespace nihil; +namespace { TEST_CASE("tabulate: basic", "[tabulate]") { auto input = std::vector{ @@ -68,3 +69,4 @@ TEST_CASE("tabulate: align", "[tabulate]") "a longvalue s\n" "a s longvalue\n"); } +} // anonymous namespace diff --git a/nihil.util/uuid.ccm b/nihil.core/uuid.ccm index 7b5727c..b1b5d5f 100644 --- a/nihil.util/uuid.ccm +++ b/nihil.core/uuid.ccm @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. -export module nihil.util:uuid; +export module nihil.core:uuid; import nihil.std; diff --git a/nihil.util/uuid.test.cc b/nihil.core/uuid.test.cc index eca94d1..407f4e1 100644 --- a/nihil.util/uuid.test.cc +++ b/nihil.core/uuid.test.cc @@ -25,7 +25,7 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; -import nihil.util; +import nihil.core; // NOLINTBEGIN(bugprone-unchecked-optional-access) diff --git a/nihil.posix/CMakeLists.txt b/nihil.posix/CMakeLists.txt index 3fcf625..4fc7d0c 100644 --- a/nihil.posix/CMakeLists.txt +++ b/nihil.posix/CMakeLists.txt @@ -4,7 +4,6 @@ add_library(nihil.posix STATIC) target_link_libraries(nihil.posix PRIVATE nihil.std nihil.core - nihil.util ) target_sources(nihil.posix @@ -58,8 +57,8 @@ if(NIHIL_TESTS) target_link_libraries(nihil.posix.test PRIVATE nihil.std + nihil.core nihil.posix - nihil.util Catch2::Catch2WithMain ) diff --git a/nihil.posix/ensure_dir.ccm b/nihil.posix/ensure_dir.ccm index 9ae6d80..6534736 100644 --- a/nihil.posix/ensure_dir.ccm +++ b/nihil.posix/ensure_dir.ccm @@ -2,7 +2,7 @@ export module nihil.posix:ensure_dir; import nihil.std; -import nihil.util; +import nihil.core; namespace nihil { diff --git a/nihil.posix/execlp.ccm b/nihil.posix/execlp.ccm index ba80504..02f9f6f 100644 --- a/nihil.posix/execlp.ccm +++ b/nihil.posix/execlp.ccm @@ -2,7 +2,8 @@ export module nihil.posix:execlp; import nihil.std; -import nihil.util; +import nihil.core; + import :argv; import :execvp; diff --git a/nihil.posix/execv.ccm b/nihil.posix/execv.ccm index 2a77326..5c5a891 100644 --- a/nihil.posix/execv.ccm +++ b/nihil.posix/execv.ccm @@ -10,7 +10,7 @@ extern char **environ; // NOLINT export module nihil.posix:execv; import nihil.std; -import nihil.util; +import nihil.core; import :argv; import :executor; import :fd; diff --git a/nihil.posix/execvp.ccm b/nihil.posix/execvp.ccm index 0a0106d..df28fe8 100644 --- a/nihil.posix/execvp.ccm +++ b/nihil.posix/execvp.ccm @@ -3,7 +3,7 @@ export module nihil.posix:execvp; import nihil.std; import nihil.core; -import nihil.util; + import :argv; import :execv; import :find_in_path; diff --git a/nihil.posix/fd.ccm b/nihil.posix/fd.ccm index 1de343b..54a4502 100644 --- a/nihil.posix/fd.ccm +++ b/nihil.posix/fd.ccm @@ -7,7 +7,7 @@ module; export module nihil.posix:fd; import nihil.std; -import nihil.util; +import nihil.core; namespace nihil { diff --git a/nihil.posix/fd.test.cc b/nihil.posix/fd.test.cc index a0828e5..c164290 100644 --- a/nihil.posix/fd.test.cc +++ b/nihil.posix/fd.test.cc @@ -6,8 +6,8 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; +import nihil.core; import nihil.posix; -import nihil.util; using namespace std::literals; diff --git a/nihil.posix/find_in_path.ccm b/nihil.posix/find_in_path.ccm index 353750b..f68e61d 100644 --- a/nihil.posix/find_in_path.ccm +++ b/nihil.posix/find_in_path.ccm @@ -6,7 +6,7 @@ module; export module nihil.posix:find_in_path; import nihil.std; -import nihil.util; +import nihil.core; import :fd; import :getenv; import :paths; diff --git a/nihil.posix/find_in_path.test.cc b/nihil.posix/find_in_path.test.cc index 65cbe87..2c07ce2 100644 --- a/nihil.posix/find_in_path.test.cc +++ b/nihil.posix/find_in_path.test.cc @@ -3,8 +3,8 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; +import nihil.core; import nihil.posix; -import nihil.util; namespace { diff --git a/nihil.posix/getenv.ccm b/nihil.posix/getenv.ccm index f3490a2..bc7d841 100644 --- a/nihil.posix/getenv.ccm +++ b/nihil.posix/getenv.ccm @@ -9,7 +9,7 @@ module; export module nihil.posix:getenv; import nihil.std; -import nihil.util; +import nihil.core; namespace nihil { diff --git a/nihil.posix/getenv.test.cc b/nihil.posix/getenv.test.cc index 83c46dc..2c3d882 100644 --- a/nihil.posix/getenv.test.cc +++ b/nihil.posix/getenv.test.cc @@ -5,8 +5,8 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; +import nihil.core; import nihil.posix; -import nihil.util; namespace { TEST_CASE("getenv: existing value", "[getenv]") diff --git a/nihil.posix/open.ccm b/nihil.posix/open.ccm index a2fc9f4..c204633 100644 --- a/nihil.posix/open.ccm +++ b/nihil.posix/open.ccm @@ -7,7 +7,7 @@ module; export module nihil.posix:open; import nihil.std; -import nihil.util; +import nihil.core; import :fd; namespace nihil { diff --git a/nihil.posix/open.test.cc b/nihil.posix/open.test.cc index 932c03b..f530e6d 100644 --- a/nihil.posix/open.test.cc +++ b/nihil.posix/open.test.cc @@ -3,8 +3,8 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; +import nihil.core; import nihil.posix; -import nihil.util; namespace { diff --git a/nihil.posix/open_in_path.ccm b/nihil.posix/open_in_path.ccm index 577ab9d..beacefa 100644 --- a/nihil.posix/open_in_path.ccm +++ b/nihil.posix/open_in_path.ccm @@ -2,7 +2,8 @@ export module nihil.posix:open_in_path; import nihil.std; -import nihil.util; +import nihil.core; + import :fd; import :getenv; import :open; diff --git a/nihil.posix/open_in_path.test.cc b/nihil.posix/open_in_path.test.cc index ace8f1e..4bf0d7c 100644 --- a/nihil.posix/open_in_path.test.cc +++ b/nihil.posix/open_in_path.test.cc @@ -3,8 +3,8 @@ #include <catch2/catch_test_macros.hpp> import nihil.std; +import nihil.core; import nihil.posix; -import nihil.util; namespace { diff --git a/nihil.posix/process.ccm b/nihil.posix/process.ccm index e990f62..98195b3 100644 --- a/nihil.posix/process.ccm +++ b/nihil.posix/process.ccm @@ -6,7 +6,7 @@ module; export module nihil.posix:process; import nihil.std; -import nihil.util; +import nihil.core; namespace nihil { diff --git a/nihil.posix/read_file.ccm b/nihil.posix/read_file.ccm index f7d06cb..0648b91 100644 --- a/nihil.posix/read_file.ccm +++ b/nihil.posix/read_file.ccm @@ -2,7 +2,8 @@ export module nihil.posix:read_file; import nihil.std; -import nihil.util; +import nihil.core; + import :fd; import :open; diff --git a/nihil.posix/rename.ccm b/nihil.posix/rename.ccm index 6b640b1..145fea3 100644 --- a/nihil.posix/rename.ccm +++ b/nihil.posix/rename.ccm @@ -2,7 +2,7 @@ export module nihil.posix:rename; import nihil.std; -import nihil.util; +import nihil.core; namespace nihil { diff --git a/nihil.posix/spawn.ccm b/nihil.posix/spawn.ccm index ea84f4d..0945466 100644 --- a/nihil.posix/spawn.ccm +++ b/nihil.posix/spawn.ccm @@ -4,7 +4,8 @@ export module nihil.posix:spawn; // spawn(): fork and execute a child process. import nihil.std; -import nihil.util; +import nihil.core; + import :argv; import :executor; import :fd; diff --git a/nihil.posix/stat.ccm b/nihil.posix/stat.ccm index ee8113b..ac19f97 100644 --- a/nihil.posix/stat.ccm +++ b/nihil.posix/stat.ccm @@ -8,7 +8,8 @@ module; export module nihil.posix:stat; import nihil.std; -import nihil.util; +import nihil.core; + import :fd; namespace nihil { diff --git a/nihil.posix/stat.test.cc b/nihil.posix/stat.test.cc index cb199f6..4d6c658 100644 --- a/nihil.posix/stat.test.cc +++ b/nihil.posix/stat.test.cc @@ -1,8 +1,8 @@ // This source code is released into the public domain. import nihil.std; +import nihil.core; import nihil.posix; -import nihil.util; #include <sys/stat.h> diff --git a/nihil.posix/tempfile.ccm b/nihil.posix/tempfile.ccm index 15edccb..892d12b 100644 --- a/nihil.posix/tempfile.ccm +++ b/nihil.posix/tempfile.ccm @@ -2,7 +2,8 @@ export module nihil.posix:tempfile; import nihil.std; -import nihil.util; +import nihil.core; + import :fd; import :getenv; import :open; diff --git a/nihil.posix/unistd.ccm b/nihil.posix/unistd.ccm index 65cd015..6f3b914 100644 --- a/nihil.posix/unistd.ccm +++ b/nihil.posix/unistd.ccm @@ -6,7 +6,7 @@ module; export module nihil.posix:unistd; import nihil.std; -import nihil.util; +import nihil.core; // Symbols from unistd.h that might be useful. diff --git a/nihil.posix/unlink.ccm b/nihil.posix/unlink.ccm index f2f5faa..6496d8f 100644 --- a/nihil.posix/unlink.ccm +++ b/nihil.posix/unlink.ccm @@ -8,7 +8,7 @@ export module nihil.posix:unlink; // unlink: simple wrapper around ::unlink() import nihil.std; -import nihil.util; +import nihil.core; namespace nihil { diff --git a/nihil.posix/write_file.ccm b/nihil.posix/write_file.ccm index 471ef85..9f26bb1 100644 --- a/nihil.posix/write_file.ccm +++ b/nihil.posix/write_file.ccm @@ -2,7 +2,8 @@ export module nihil.posix:write_file; import nihil.std; -import nihil.util; +import nihil.core; + import :fd; import :open; import :rename; diff --git a/nihil.ucl/CMakeLists.txt b/nihil.ucl/CMakeLists.txt index a4d69e6..477dcf7 100644 --- a/nihil.ucl/CMakeLists.txt +++ b/nihil.ucl/CMakeLists.txt @@ -6,7 +6,6 @@ add_library(nihil.ucl STATIC) target_link_libraries(nihil.ucl PRIVATE nihil.std nihil.core - nihil.util ) target_sources(nihil.ucl @@ -46,7 +45,7 @@ if(NIHIL_TESTS) target_link_libraries(nihil.ucl.test PRIVATE nihil.std - nihil.util + nihil.core nihil.ucl Catch2::Catch2WithMain) diff --git a/nihil.ucl/integer.ccm b/nihil.ucl/integer.ccm index e3cf98d..8734c2d 100644 --- a/nihil.ucl/integer.ccm +++ b/nihil.ucl/integer.ccm @@ -7,7 +7,7 @@ export module nihil.ucl:integer; import nihil.std; import nihil.core; -import nihil.util; + import :object; import :type; diff --git a/nihil.ucl/object_cast.ccm b/nihil.ucl/object_cast.ccm index 04d75a9..793bce9 100644 --- a/nihil.ucl/object_cast.ccm +++ b/nihil.ucl/object_cast.ccm @@ -6,7 +6,8 @@ module; export module nihil.ucl:object_cast; import nihil.std; -import nihil.util; +import nihil.core; + import :type; import :object; import :array; diff --git a/nihil.ucl/parser.ccm b/nihil.ucl/parser.ccm index 306f068..bfd4742 100644 --- a/nihil.ucl/parser.ccm +++ b/nihil.ucl/parser.ccm @@ -6,7 +6,8 @@ module; export module nihil.ucl:parser; import nihil.std; -import nihil.util; +import nihil.core; + import :object; import :map; diff --git a/nihil.ucl/type.ccm b/nihil.ucl/type.ccm index e7843d2..b0403c1 100644 --- a/nihil.ucl/type.ccm +++ b/nihil.ucl/type.ccm @@ -6,7 +6,7 @@ module; export module nihil.ucl:type; import nihil.std; -import nihil.util; +import nihil.core; namespace nihil::ucl { diff --git a/nihil.util/CMakeLists.txt b/nihil.util/CMakeLists.txt deleted file mode 100644 index 30a33b3..0000000 --- a/nihil.util/CMakeLists.txt +++ /dev/null @@ -1,59 +0,0 @@ -# This source code is released into the public domain. - -add_library(nihil.util STATIC) - -target_link_libraries(nihil.util PRIVATE - nihil.std - nihil.core -) - -target_sources(nihil.util - PUBLIC FILE_SET modules TYPE CXX_MODULES FILES - nihil.util.ccm - - capture_stream.ccm - construct.ccm - ctype.ccm - error.ccm - flagset.ccm - guard.ccm - match.ccm - monad.ccm - parse_size.ccm - next_word.ccm - save_errno.ccm - skipws.ccm - sys_error.ccm - tabulate.ccm - uuid.ccm -) - -if(NIHIL_TESTS) - enable_testing() - - add_executable(nihil.util.test - capture_stream.test.cc - ctype.test.cc - error.test.cc - flagset.test.cc - guard.test.cc - match.test.cc - monad.test.cc - parse_size.test.cc - next_word.test.cc - skipws.test.cc - tabulate.test.cc - uuid.test.cc - ) - - target_link_libraries(nihil.util.test PRIVATE - nihil.std - nihil.core - nihil.util - Catch2::Catch2WithMain - ) - - include(CTest) - include(Catch) - catch_discover_tests(nihil.util.test) -endif() diff --git a/nihil.util/nihil.util.ccm b/nihil.util/nihil.util.ccm deleted file mode 100644 index 49e5687..0000000 --- a/nihil.util/nihil.util.ccm +++ /dev/null @@ -1,18 +0,0 @@ -// This source code is released into the public domain. -export module nihil.util; - -export import :capture_stream; -export import :construct; -export import :ctype; -export import :error; -export import :flagset; -export import :guard; -export import :match; -export import :monad; -export import :parse_size; -export import :next_word; -export import :save_errno; -export import :skipws; -export import :sys_error; -export import :tabulate; -export import :uuid; |
