This commit is contained in:
2026-06-16 01:27:54 +09:00
parent 5d6a03b74f
commit 4e82f47f90
31 changed files with 141 additions and 112 deletions
+7 -7
View File
@@ -4,7 +4,7 @@
## 基本的な設定スキーマ
```n
```dcdl
rec {
Host = IPv4Address;
@@ -35,7 +35,7 @@ enabled_config = NewConfig;
## 関数と文字列生成
```n
```dcdl
let
maybe_hw = String & /Hello! .*/;
part = {
@@ -59,7 +59,7 @@ in
## match
```n
```dcdl
(
input_a: {
hoge = Int & >= 0;
@@ -93,7 +93,7 @@ in
## deep patch
```n
```dcdl
Base = {
feature_hoge = {
enable = Bool default true;
@@ -108,7 +108,7 @@ Patched = Base // {
`Patched` は以下に相当する。
```n
```dcdl
{
feature_hoge = {
enable = false;
@@ -119,7 +119,7 @@ Patched = Base // {
## 循環 import
```n
```dcdl
# main.n
{
schema = {
@@ -130,7 +130,7 @@ Patched = Base // {
}
```
```n
```dcdl
# func.n
(input: (import ./main.n).schema) =>
{