on master help sign in
Say in the spec that a bare decimal is a @ud

grammar.md's Decimal row, Literals by context and its table said a number takes any aura by context. They now say what the checker does: a decimal is a @ud, a context can make it a @u, it fits @ and *, and every other aura takes its own literal, with ^- @dr 30, ^- @p 0, (add ~s1 1) and (text 5) as errors; a ++ generic over its aura keeps it generic. Patterns say a number pattern can't match a @p or a @dr. compiler.md describes +decimal-misfit, and inline-decimal's about.txt quotes the new Decimal row. Term literals (%1.000) are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U4FzmThon6Q3x1uL8yUKEY

commitba4697473595f36c9eec8d65fcb37ee6c3e747ad authorClaude <noreply@anthropic.com> dateTue 3 Nov 2026, 02:53 (10 hours ago) parentc4e28d2
3 files changed+7−5
docs/compiler.md+2 docs/spec/grammar.md+4−4 tests/golden/inline-decimal/about.txt+1−1
docs/compiler.md+2
@@ -74,6 +74,8 @@ A single-arm cell pattern can bind two or more positions, with its last binder c
7474
7575String interpolation infers its pieces in order and preserves substitutions and pending constraints. A piece with a known atom aura, unrestricted `@`, or a tape `(list @tD)` is accepted; an isolated decimal literal takes its normal `@ud` default. A known cell reports that it needs a printer, and an explicitly generic atom asks for an aura at its use site. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported in this fragment.
7676
77+A bare decimal is a `@ud` (S4): its variable binds only `@ud` or `@u`, and it fits `@` and `*`. A `++` generic over the decimal's aura generalizes it to an atom variable, so there it takes any aura. When a fit fails, `+decimal-misfit` refits with each decimal widened to any aura, so that a generic gate's capital learns its aura from the other arguments, then walks the value's syntax beside the expected type through groups, faces, tuples, term-headed pairs, the union case a head tag picks, units and lists. The first decimal at an atom of another aura gets an error naming it and the expected aura's literal, as "`30` is a @ud, not a @dr; write ~s30"; otherwise the site's own error stands. Casts, call arguments, change fields, list items and tails, unit payloads, branch joins and contextual branch arms use it, and a `?-` over a known union or an atom checks its number patterns against the subject's type the same way.
78+
7779The Hoon bridge translates imported `(unit T)` to the canonical public `unit` union when the prepared template validates as the standard mold. Without that template it retains the older opaque collection behavior. Conversion recurses through imported unions and collection arguments, and API path/diff/poke analysis uses the same prepared reader. The fixtures prove identity, `fall`, `need`, casts, union- and list-nested `need`, canonical unit-typed API full/diff marks, and a canonical direct-poke export while leaving no-prelude output unchanged.
7880
7981The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual loobean literals specialize against a matching singleton by noun, including a proven singleton in a direct union; named loobean singletons do not silently widen to a distinct aura. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
docs/spec/grammar.md+4−4
@@ -18,7 +18,7 @@ The syntax the compiler accepts.
1818
1919| Form | Example | Type |
2020| --- | --- | --- |
21−| Decimal | `1.000` | `@ud`, or any aura by context; groups of three, as in Hoon |
21+| Decimal | `1.000` | `@ud`, which also fits `@u`, `@` and `*`; groups of three, as in Hoon |
2222| Hexadecimal | `0x1f` | `@ux` |
2323| Base 32 | `0v5.fdf99` | `@uv` |
2424| Ship | `~zod`, `~sampel-palnet` | `@p` |
@@ -159,12 +159,12 @@ A tag literal or `~` gets a fresh type variable and a pending constraint: the va
159159
160160## Literals by context
161161
162−Number and cell literals resolve like tags: each waits for its context and takes a default when its `++` is checked. A number takes `@ud` only if nothing fixes its aura and its `++` isn't generic over it, so `++ inc |= n=A (add n 1)` stays generic, while the sum in `"{(add 1 2)}"` is a `@ud`.
162+Number and cell literals resolve like tags: each waits for its context and takes a default when its `++` is checked. A number is a `@ud`, as in Hoon: a context can make it a `@u`, and it fits `@` and `*`, but every other aura takes its own literal, as `~s30` for a `@dr`, `~2026.1.1` for a `@da`, `~zod` for a `@p`, `"5"` for a `@t` and `0x1` for a `@ux`. So `^- @dr 30`, `^- @p 0`, `(add ~s1 1)` and `(text 5)` are errors, each naming the number and the aura it met. A number takes `@ud` only if nothing fixes its aura and its `++` isn't generic over it, so `++ inc |= n=A (add n 1)` stays generic, and `(inc ~s1)` is a `@dr`, while the sum in `"{(add 1 2)}"` is a `@ud`.
163163
164164| Literal | Can become | Default |
165165| --- | --- | --- |
166166| Tag `%a`, or `~` | A union's case or a constant atom | None: an error asking for a `^-` |
167−| Number `5` | Any aura | `@ud` |
167+| Number `5` | `@ud` or `@u`, or any aura its `++` is generic over | `@ud` |
168168| Cell `[x xs]` | A tuple, a record, a cons | A tuple |
169169
170170- In `{…}`, an atom prints by its aura: `@ud` as `1.000`, `@da` as a UTC date with sub-seconds, `@p` as a ship, and a bare `@` as `@ud`. `@t`, `@ta`, `@tas` and tapes splice as text; any other cell is an error asking for a printer. Printers are picked when compiling, so an atom whose aura its `++` is generic over, as `n` in `|= n=A` when `A` is constrained to atoms, is an error asking for an aura, here and in a `(…)` segment of an application path. For readers, `print-date` prints in the theme's zone, Urbit-style, to the minute, as `~2026.10.29..14.30`; numbers keep Hoon's form.
@@ -181,7 +181,7 @@ Number and cell literals resolve like tags: each waits for its context and takes
181181
182182## Patterns
183183
184−Arms are tried in order. Every case needs an arm or a catch-all, `*` or a bare name. An arm that earlier arms cover, such as a second `%add` or anything after `[%move * *]`, is an error, and a case that should fail says `!!`. A name in a pattern always binds anew, so compare values with `?- (eq a b)`. A name is an error where the subject's type at its position is a union, or a one-case mold, and a case that the rest of the pattern can match has there the constant the name spells, so `stop` written for `%stop` below is an error, not a catch-all. Positions typed by an aura, `*`, a type variable, a container's element or a recursive mold are unaffected, so `[t %draft] t` still binds `t`, and `x` is still a catch-all on a `@tas` subject. Patterns take terms, numbers, strings without `{…}`, ships, loobeans and `~`, and cells of patterns, which nest; not `~[…]` lists or `a+b` pairs.
184+Arms are tried in order. Every case needs an arm or a catch-all, `*` or a bare name. An arm that earlier arms cover, such as a second `%add` or anything after `[%move * *]`, is an error, and a case that should fail says `!!`. A name in a pattern always binds anew, so compare values with `?- (eq a b)`. A name is an error where the subject's type at its position is a union, or a one-case mold, and a case that the rest of the pattern can match has there the constant the name spells, so `stop` written for `%stop` below is an error, not a catch-all. Positions typed by an aura, `*`, a type variable, a container's element or a recursive mold are unaffected, so `[t %draft] t` still binds `t`, and `x` is still a catch-all on a `@tas` subject. Patterns take terms, numbers, strings without `{…}`, ships, loobeans and `~`, and cells of patterns, which nest; not `~[…]` lists or `a+b` pairs. A number pattern is a `@ud` too, so `0` can't match a `@p` or a `@dr`: write `~zod`, or compare a duration with `eq`.
185185
186186| Pattern | Matches | Binds |
187187| --- | --- | --- |
tests/golden/inline-decimal/about.txt+1−1
@@ -1,3 +1,3 @@
1−source: Grammar tab, Literals table, the Decimal row: `1.000`, "`@ud`, or any aura by context; groups of three, as in Hoon"
1+source: Grammar tab, Literals table, the Decimal row: `1.000`, "`@ud`, which also fits `@u`, `@` and `*`; groups of three, as in Hoon"
22tests: the decimal literal 1.000
33expect: parses