# lawref.std_registry

*module*

Реестр стандартной библиотеки 0.1 (WP-31; SPEC [§257](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/34-part-xxxiii-standard-library.ru.md#257-lawstddata)–[§266](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/34-part-xxxiii-standard-library.ru.md#266-lawstdresults)).

С фазы 1 DECISION-0166 состав `LAW_STD` ПОРОЖДАЕТСЯ из каталога `packs/std/`
(`catalogue.json` пакетов → `std_generated.py`, генератор
`packs/std/tools/gen_std.py`); этот модуль — стабильный адрес для читателей
(`exports()`, `LAW_STD`) и больше ничего не объявляет. Совпадение каталога с
prose [§35](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/08-part-viii-type-system.ru.md#35-встроенные-типы-данных), [§257](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/34-part-xxxiii-standard-library.ru.md#257-lawstddata)–[§266](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/34-part-xxxiii-standard-library.ru.md#266-lawstdresults), [§58](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/09-part-ix-values-terms-expressions.ru.md#58-arithmetic), [§59](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/09-part-ix-values-terms-expressions.ru.md#59-aggregates) держат ворота
`verify/ci/gates/repo/check_std_catalogue.py`, а не эта строка.

**Кто читает реестр (проверено, не предположено):** `engines/lawref/selftest.py`,
ворота выше и `check_std_shadowing.py`. `engines/lawref/lawref/resolver.py` его
НЕ читает — резолюция std-имён у оракула не идёт через эту таблицу. У
компилятора та же роль — порождённый `law-hir/src/std_generated.rs`.

История до каталога: E-0005/E-0015/E-0028/E-0029/E-0036/E-0037/E-0039 и
0.2-11 — каждая правила эту таблицу руками, и трижды реализации оказывались
согласны между собой при prose, не называющем имя (E-0037, 0.2-11, E-0039):
differential такого не видит по построению. Каталог закрывает класс.

## lawref.std_registry.LAW_STD

*attribute* · *module attribute*

```python
LAW_STD: dict[str, tuple[str, ...]] = {'law.std.data': ('Option', 'Result', 'List', 'Set', 'Map', 'Boolean', 'Decimal', 'Rational', 'Integer', 'Natural', 'Text', 'LanguageTag', 'Uri', 'Digest', 'CountryCode', 'CardinalityError', 'Jurisdiction', 'text_length', 'text_matches'), 'law.std.time': ('Date', 'LocalTime', 'Instant', 'OffsetDateTime', 'Interval', 'Duration', 'CalendarPeriod', 'BusinessPeriod', 'Calendar', 'Timezone', 'DeadlinePolicy', 'before', 'after', 'during', 'overlaps', 'contains', 'add_duration', 'add_business_days', 'add_calendar_period', 'add_legal_term', 'days_between', 'hours_between', 'minutes_between', 'month_start_of', 'month_end_of', 'weekday_of'), 'law.std.units': ('Quantity', 'Dimension', 'Unit', 'Magnitude', 'Bounds', 'Mass', 'Length', 'Area', 'Volume', 'Time', 'Velocity', 'Current', 'Temperature', 'Amount', 'Luminosity', 'percent', 'convert', 'with_unit', 'magnitude', 'unit_convert', 'scalar_of', 'quantity_of', 'unit_exponent', 'ln_bounds', 'exp_bounds', 'bounds_add', 'bounds_sub', 'bounds_scale', 'bounds_const', 'round_bounds', 'sqrt_bounds', 'pi_bounds', 'sin_bounds', 'cos_bounds', 'bounds_mul', 'bounds_div'), 'law.std.money': ('Currency', 'Money', 'round', 'div_round', 'currency_convert'), 'law.std.actors': ('Actor', 'NaturalPerson', 'LegalPerson', 'Organization', 'PublicAuthority', 'Official', 'Court', 'Collective', 'LegalContext', 'LegalRole', 'has_role'), 'law.std.documents': ('Document', 'SourceWork', 'SourceEdition', 'Publication', 'Fragment', 'DocumentIdentifier', 'Signature', 'Digest'), 'law.std.events': ('Event', 'Action', 'occurs_at', 'actor', 'participant', 'place'), 'law.std.norms': ('Duty', 'Liberty', 'Power', 'Immunity', 'AchievementGoal', 'MaintenanceGoal', 'ForbearanceGoal', 'PositionInstance', 'NormativeStatus'), 'law.std.evidence': ('EvidenceItem', 'EvidenceStatus', 'SupportEdge', 'EvidencePolicy', 'CompletenessCertificate'), 'law.std.results': ('TruthStatus', 'ApplicabilityStatus', 'EvaluationStatus', 'EvaluationResult', 'ComplianceResult', 'ConflictReport', 'ProofRef', 'ManifestRef')}
```

Re-exported from: `lawref.std_generated`

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/std_generated.py#L25-L179)

## lawref.std_registry.STD_PACKAGES

*attribute* · *module attribute*

```python
STD_PACKAGES: tuple[str, ...] = ('law.std.data', 'law.std.time', 'law.std.units', 'law.std.money', 'law.std.actors', 'law.std.documents', 'law.std.events', 'law.std.norms', 'law.std.evidence', 'law.std.results')
```

Re-exported from: `lawref.std_generated`

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/std_generated.py#L275-L286)

## lawref.std_registry.STD_VERSIONS

*attribute* · *module attribute*

```python
STD_VERSIONS: dict[str, str] = {'0.1': '0.1.0', '0.2': '0.2.0'}
```

Re-exported from: `lawref.std_generated`

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/std_generated.py#L289-L292)

## lawref.std_registry.exports

*function*

```python
def exports(package: str) -> tuple[str, ...]
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/std_registry.py#L27-L28)

## lawref.std_registry.is_std_package

*function*

```python
def is_std_package(name: str) -> bool
```

[§23](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/06-part-vi-package-and-module-system.ru.md#23-import) (DECISION-0166 [§4.3](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/02-part-ii-goals-and-scope.ru.md#4-не-цели-01)): имя из пространства прелюдии `law.std`.

Ответ по ПРЕФИКСУ, а не по каталогу: неизвестный `law.std.tim` — тоже
прелюдия (её нет — это отказ компилятора, а не зависимость для lock-а).
Голое `law.std` зарезервировано вместе с подпространством.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/std_registry.py#L31-L38)

## lawref.std_registry.std_version

*function*

```python
def std_version(language: str) -> str | None
```

Версия std, которую подтверждает явный `import law.std.<pkg> version`.

Ключ — две первые компоненты версии языка (`0.1`, `0.2`); неизвестная
версия языка — None, и это отказ вызывающего, не умолчание.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/std_registry.py#L41-L48)
