@@ -4614,7 +4614,10 @@
4614:: Restricted-number promotion considers written capitals only; if there
4614:: Restricted-number promotion considers written capitals only; if there
4615:: are none, it skips the otherwise unnecessary environment traversal.
4615:: are none, it skips the otherwise unnecessary environment traversal.
4616:: Bare @ is a separate unrestricted atom type. A directional fit check
4616:: Bare @ is a separate unrestricted atom type. A directional fit check
4617−:: permits concrete atoms to widen to it, never the reverse. A fit that
4617+:: permits concrete atoms to widen to it, never the reverse. A bare
4618+:: decimal is a @ud: its variable binds only @ud or @u, it fits @ and *,
4619+:: and +decimal-misfit names it where it meets another aura (S4); a
4620+:: ++ generic over its aura generalizes it to any aura. A fit that
4618:: needs a not-yet-implemented constraint remains unsupported. Named unions
4621:: needs a not-yet-implemented constraint remains unsupported. Named unions
4619:: retain origin and ordered arguments, including phantom arguments, apart
4622:: retain origin and ordered arguments, including phantom arguments, apart
4620:: from their display name. Generic cases must be disjoint for all arguments.
4623:: from their display name. Generic cases must be disjoint for all arguments.
@@ -4845,7 +4848,8 @@
4845:: +itype-unify: consistent substitutions, or ~ for a mismatch
4848:: +itype-unify: consistent substitutions, or ~ for a mismatch
4847:: Different concrete auras conflict. A variable may become an atom or
4850:: Different concrete auras conflict. A variable may become an atom or
4848−:: a function, but cannot contain itself. Aura-only variables and faces
4851+:: a function, but cannot contain itself. A decimal's variable binds
4852+:: only @ud or @u (+decimal-aura). Aura-only variables and faces
4849:: require further distinctions before this supports general Jibb.
4853:: require further distinctions before this supports general Jibb.
4851++ itype-unify
4855++ itype-unify
@@ -4894,10 +4898,10 @@
4894 ?: &(?=(%rnvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4898 ?: &(?=(%rnvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4895 ?: &(?=(%avar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4899 ?: &(?=(%avar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4896 ?: ?=(%rnvar -.a)
4900 ?: ?=(%rnvar -.a)
4897− ?. |(?=(%rnvar -.b) ?=(%atom -.b)) ~
4901+ ?. |(?=(%rnvar -.b) &(?=(%atom -.b) (decimal-aura aura.b))) ~
4898 `[[id.a b] sub]
4902 `[[id.a b] sub]
4899 ?: ?=(%rnvar -.b)
4903 ?: ?=(%rnvar -.b)
4900− ?. ?=(%atom -.a) ~
4904+ ?. &(?=(%atom -.a) (decimal-aura aura.a)) ~
4901 `[[id.b a] sub]
4905 `[[id.b a] sub]
4902 ?: &(?=(%avar -.a) ?=(%rvar -.b)) `[[id.a b] sub]
4906 ?: &(?=(%avar -.a) ?=(%rvar -.b)) `[[id.a b] sub]
4903 ?: &(?=(%rvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4907 ?: &(?=(%rvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
@@ -4908,14 +4912,15 @@
4908 ?. ?=(%atom -.a) ~
4912 ?. ?=(%atom -.a) ~
4909 `[[id.b a] sub]
4913 `[[id.b a] sub]
4910 :: The narrower decimal constraint survives a match with an atom
4914 :: The narrower decimal constraint survives a match with an atom
4911− :: variable; decimal syntax alone does not make it a loobean.
4915+ :: variable; decimal syntax alone does not make it a loobean. A
4916+ :: concrete aura takes a decimal only if it is @ud or @u.
4912 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4917 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4913 ?: &(?=(%avar -.a) ?=(%nvar -.b)) `[[id.a b] sub]
4918 ?: &(?=(%avar -.a) ?=(%nvar -.b)) `[[id.a b] sub]
4914 ?: ?=(%nvar -.a)
4919 ?: ?=(%nvar -.a)
4915− ?. |(?=(%nvar -.b) ?=(%atom -.b)) ~
4920+ ?. |(?=(%nvar -.b) &(?=(%atom -.b) (decimal-aura aura.b))) ~
4916 `[[id.a b] sub]
4921 `[[id.a b] sub]
4917 ?: ?=(%nvar -.b)
4922 ?: ?=(%nvar -.b)
4918− ?. ?=(%atom -.a) ~
4923+ ?. &(?=(%atom -.a) (decimal-aura aura.a)) ~
4919 `[[id.b a] sub]
4924 `[[id.b a] sub]
4920 ?: ?=(%avar -.a)
4925 ?: ?=(%avar -.a)
4921 ?. |(?=(%avar -.b) ?=(%atom -.b) ?=(%any-atom -.b) ?=(%flag -.b)) ~
4926 ?. |(?=(%avar -.b) ?=(%atom -.b) ?=(%any-atom -.b) ?=(%flag -.b)) ~
@@ -5060,6 +5065,16 @@
5060 ?. =(i.a i.b) |
5065 ?. =(i.a i.b) |
5061 $(a t.a, b t.b)
5066 $(a t.a, b t.b)
5068+:: +decimal-aura: whether a bare decimal fits an atom of this aura
5070+:: A decimal is a @ud, so as in Hoon it fits @ud and its ancestors
5071+:: @u and @; every other aura takes its own literal (S4).
5076+ (aura-prefix aura %ud)
5063:: Related auras in a structural unification need a common-type rule;
5078:: Related auras in a structural unification need a common-type rule;
5064:: until that rule is implemented, report an unknown rather than error.
5079:: until that rule is implemented, report an unknown rather than error.
@@ -5795,6 +5810,24 @@
5795 ["canonicalization should retain gate-free variables" problems]
5810 ["canonicalization should retain gate-free variables" problems]
5796 =? problems !=((show-atom-constraint canonical-free) " where A contains no gates")
5811 =? problems !=((show-atom-constraint canonical-free) " where A contains no gates")
5797 ["the printer should show gate-free constraints" problems]
5812 ["the printer should show gate-free constraints" problems]
5813+ =/ decimal=itype [%nvar 50]
5814+ =? problems ?=(~ (itype-unify decimal num ~))
5815+ ["a decimal should unify with @ud" problems]
5816+ =? problems ?=(~ (itype-unify [%atom %u] decimal ~))
5817+ ["a decimal should unify with @u" problems]
5818+ =? problems ?=(^ (itype-unify decimal [%atom %dr] ~))
5819+ ["a decimal should not unify with @dr" problems]
5820+ =? problems ?=(^ (itype-unify [%atom %ux] decimal ~))
5821+ ["a decimal should not unify with @ux" problems]
5822+ =/ restricted=(unit isub) (itype-unify decimal [%rvar 51] ~)
5823+ =? problems |(?=(~ restricted) ?=(^ (itype-unify [%rvar 51] [%atom %p] u.restricted)))
5824+ ["arithmetic should keep a decimal's aura rule" problems]
5825+ =/ decimal-any=ifit (itype-fit decimal [%any-atom ~] ~ 52)
5826+ =? problems !?=(%ok -.decimal-any)
5827+ ["a decimal should fit @" problems]
5828+ =/ decimal-noun=ifit (itype-fit decimal [%noun ~] ~ 52)
5829+ =? problems !?=(%ok -.decimal-noun)
5830+ ["a decimal should fit a noun" problems]
5798 problems
5831 problems
5800:: The expression inference below is deliberately a fragment: bindings,
5833:: The expression inference below is deliberately a fragment: bindings,
@@ -7810,6 +7843,8 @@
7810 ?^ missing [%| u.missing]
7843 ?^ missing [%| u.missing]
7811 =/ nested=(unit idiag) (nested-missing-tag e typ.p.value expected sub.state.p.value next.state.p.value context)
7844 =/ nested=(unit idiag) (nested-missing-tag e typ.p.value expected sub.state.p.value next.state.p.value context)
7812 ?^ nested [%| u.nested]
7845 ?^ nested [%| u.nested]
7846+ =/ decimal=(unit idiag) (decimal-misfit e typ.p.value expected sub.state.p.value next.state.p.value)
7847+ ?^ decimal [%| u.decimal]
7813 ?: &(?=(%collection -.expected) =(%list name.expected))
7848 ?: &(?=(%collection -.expected) =(%list name.expected))
7814 [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
7849 [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
7815 ?: ?=(%flag -.expected)
7850 ?: ?=(%flag -.expected)
@@ -7875,11 +7910,15 @@
7875 =/ fit=ifit (itype-fit typ.p.tail target sub.state.p.tail next.state.p.tail)
7910 =/ fit=ifit (itype-fit typ.p.tail target sub.state.p.tail next.state.p.tail)
7876 ?: ?=(%unknown -.fit) [%| ["list tail constraint is not supported by partial inference" ~]]
7911 ?: ?=(%unknown -.fit) [%| ["list tail constraint is not supported by partial inference" ~]]
7877 ?: ?=(%bad -.fit)
7912 ?: ?=(%bad -.fit)
7913+ =/ decimal=(unit idiag) (decimal-misfit val.i.t.items.e typ.p.tail target sub.state.p.tail next.state.p.tail)
7914+ ?^ decimal [%| u.decimal]
7878 [%| ["list tail does not fit its expected type" ~[[context (site-type-note "expected list" target sub.state.p.tail)] [(span-of val.i.t.items.e) (site-type-note "list tail" typ.p.tail sub.state.p.tail)]]]]
7915 [%| ["list tail does not fit its expected type" ~[[context (site-type-note "expected list" target sub.state.p.tail)] [(span-of val.i.t.items.e) (site-type-note "list tail" typ.p.tail sub.state.p.tail)]]]]
7879 [%& target state.p.tail(sub sub.fit, next next.fit)]
7916 [%& target state.p.tail(sub sub.fit, next next.fit)]
7918+:: done holds the items already checked, the last first, so that a
7919+:: decimal among them can be blamed when a later item fixes its aura.
7881++ infer-open-list-items
7920++ infer-open-list-items
7882− |= [items=(list expr) expected=itype env=ienv state=istate context=span]
7921+ |= [items=(list expr) expected=itype env=ienv state=istate context=span done=(list expr)]
7883 ^- iresult
7922 ^- iresult
7884 ?~ items [%& expected state]
7923 ?~ items [%& expected state]
7885 =/ target=itype (itype-walk expected sub.state)
7924 =/ target=itype (itype-walk expected sub.state)
@@ -7895,10 +7934,18 @@
7895 ?: ?=(%bad -.fit)
7934 ?: ?=(%bad -.fit)
7896 ?: |((itype-family-related typ.p.value target sub.state.p.value) (itype-has-any-atom typ.p.value sub.state.p.value) (itype-has-any-atom target sub.state.p.value))
7935 ?: |((itype-family-related typ.p.value target sub.state.p.value) (itype-has-any-atom typ.p.value sub.state.p.value) (itype-has-any-atom target sub.state.p.value))
7897 [%| ["list item widening is not supported by partial inference" ~]]
7936 [%| ["list item widening is not supported by partial inference" ~]]
7937+ =/ decimal=(unit idiag) (decimal-misfit i.items typ.p.value target sub.state.p.value next.state.p.value)
7938+ ?^ decimal [%| u.decimal]
7939+ =/ earlier=(list expr) (flop done)
7942+ =/ found=(unit idiag) (decimal-misfit-at i.earlier typ.p.value sub.state.p.value)
7943+ ?^ found [%| u.found]
7944+ $(earlier t.earlier)
7898 [%| ["list items do not have compatible types" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
7945 [%| ["list items do not have compatible types" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
7899 ?: (itype-has-tag (itype-normalize expected sub.fit))
7946 ?: (itype-has-tag (itype-normalize expected sub.fit))
7900 [%| ["list item needs context in partial inference" ~]]
7947 [%| ["list item needs context in partial inference" ~]]
7901− $(items t.items, state state.p.value(sub sub.fit, next next.fit))
7948+ $(items t.items, state state.p.value(sub sub.fit, next next.fit), done [i.items done])
7903++ infer-list-items
7950++ infer-list-items
7904 |= [items=(list expr) expected=itype env=ienv state=istate context=span]
7951 |= [items=(list expr) expected=itype env=ienv state=istate context=span]
@@ -7919,6 +7966,8 @@
7919 ?^ missing [%| u.missing]
7966 ?^ missing [%| u.missing]
7920 =/ nested=(unit idiag) (nested-missing-tag i.items typ.p.value target sub.state.p.value next.state.p.value context)
7967 =/ nested=(unit idiag) (nested-missing-tag i.items typ.p.value target sub.state.p.value next.state.p.value context)
7921 ?^ nested [%| u.nested]
7968 ?^ nested [%| u.nested]
7969+ =/ decimal=(unit idiag) (decimal-misfit i.items typ.p.value target sub.state.p.value next.state.p.value)
7970+ ?^ decimal [%| u.decimal]
7922 [%| ["list item does not fit its expected type" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
7971 [%| ["list item does not fit its expected type" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
7923 $(items t.items, state state.p.value(sub sub.fit, next next.fit))
7972 $(items t.items, state state.p.value(sub sub.fit, next next.fit))
@@ -8284,6 +8333,8 @@
8284 ^- (unit iresult)
8333 ^- (unit iresult)
8285 ?> ?=(%branch -.e)
8334 ?> ?=(%branch -.e)
8286 ?: ?=(%| -.subject) `subject
8335 ?: ?=(%| -.subject) `subject
8336+ =/ decimal=(unit idiag) (decimal-arms-misfit arms.e typ.p.subject sub.state.p.subject)
8337+ ?^ decimal `[%| u.decimal]
8287 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8338 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8288 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
8339 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
8289 =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
8340 =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
@@ -8322,6 +8373,8 @@
8322 ^- (unit iresult)
8373 ^- (unit iresult)
8323 ?> ?=(%branch -.e)
8374 ?> ?=(%branch -.e)
8324 ?: ?=(%| -.subject) `subject
8375 ?: ?=(%| -.subject) `subject
8376+ =/ decimal=(unit idiag) (decimal-arms-misfit arms.e typ.p.subject sub.state.p.subject)
8377+ ?^ decimal `[%| u.decimal]
8325 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8378 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8326 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
8379 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
8327 =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
8380 =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
@@ -8712,6 +8765,8 @@
8712 =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
8765 =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
8713 ?: ?=(%unknown -.fit) [%| ["change field constraint is not supported by partial inference" ~]]
8766 ?: ?=(%unknown -.fit) [%| ["change field constraint is not supported by partial inference" ~]]
8714 ?: ?=(%bad -.fit)
8767 ?: ?=(%bad -.fit)
8768+ =/ decimal=(unit idiag) (decimal-misfit val.entry typ.p.value expected sub.state.p.value next.state.p.value)
8769+ ?^ decimal [%| u.decimal]
8715 [%| ["change field and replacement do not unify" ~[[at.entry (site-type-note "expected replacement" expected sub.state.p.value)] [(span-of val.entry) (site-type-note "replacement" typ.p.value sub.state.p.value)]]]]
8770 [%| ["change field and replacement do not unify" ~[[at.entry (site-type-note "expected replacement" expected sub.state.p.value)] [(span-of val.entry) (site-type-note "replacement" typ.p.value sub.state.p.value)]]]]
8716 $(edits t.edits, state state.p.value(sub sub.fit, next next.fit), seen [name.entry seen])
8771 $(edits t.edits, state state.p.value(sub sub.fit, next next.fit), seen [name.entry seen])
@@ -8817,6 +8872,183 @@
8817 ?. ?=(%ok -.first) ~
8872 ?. ?=(%ok -.first) ~
8818 $(items t.items, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
8873 $(items t.items, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
8875+:: +decimal-misfit: a decimal's error where another aura is expected
8877+:: A bare decimal is a @ud and fits only @ud, @u, @ and * (S4). After
8878+:: a value fails to fit, refit it with each decimal's variable widened
8879+:: to any aura (+decimal-relax), so that a gate's shared capital learns
8880+:: its aura from the other arguments, then walk the value's syntax
8881+:: beside the type it should fit. The first decimal whose place is an
8882+:: atom of another aura gets the error; otherwise ~, and the caller's
8883+:: own error stands.
8886+ |= [e=expr actual=itype expected=itype sub=isub next=@ud]
8888+ =/ loose=isub (turn sub |=(b=ibinding b(val (decimal-relax val.b))))
8889+ =/ fit=ifit (itype-fit (decimal-relax actual) (decimal-relax expected) loose next)
8890+ (decimal-misfit-at e (decimal-relax expected) ?:(?=(%ok -.fit) sub.fit loose))
8892+:: +decimal-relax: a type with each decimal's variable taking any aura
8899+ %rnvar [%rvar id.t]
8900+ %collection t(args (turn args.t |=(c=itype (decimal-relax c))))
8901+ %grec t(args (turn args.t |=(c=itype (decimal-relax c))))
8902+ %union t(cases (turn cases.t |=(c=itype (decimal-relax c))), args (turn args.t |=(c=itype (decimal-relax c))))
8903+ %face t(body $(t body.t))
8904+ %fn [%fn $(t sample.t) $(t product.t)]
8905+ %cell [%cell $(t hed.t) $(t tal.t)]
8908+:: +decimal-misfit-at: walk a value beside the type it should fit
8910+:: Through groups, faces, tuples and term-headed pairs, the union case
8911+:: a tuple's head tag picks, units and list literals.
8913+++ decimal-misfit-at
8914+ |= [e=expr expected=itype sub=isub]
8916+ =. expected (itype-walk expected sub)
8917+ ?: ?=(%face -.expected) $(expected body.expected)
8919+ %lit (decimal-lit-misfit at.e lit.e expected |)
8920+ %group $(e inner.e)
8921+ %pair $(e (pair-as-cell e))
8922+ %tuple (decimal-misfit-items items.e expected sub)
8924+ ?. ?=(%collection -.expected) ~
8925+ ?. &(=(%unit name.expected) ?=([* ~] args.expected)) ~
8926+ $(e val.e, expected i.args.expected)
8928+ ?. ?=(%collection -.expected) ~
8929+ ?. &(=(%list name.expected) ?=([* ~] args.expected)) ~
8930+ =/ items=(list expr) items.e
8933+ =/ found=(unit idiag) ^$(e i.items, expected i.args.expected)
8938+:: +decimal-misfit-items: a tuple's items beside a cell, the last its tail
8940+++ decimal-misfit-items
8941+ |= [items=(list item) expected=itype sub=isub]
8944+ ?~ t.items (decimal-misfit-at val.i.items expected sub)
8945+ =. expected (itype-walk expected sub)
8946+ ?: ?=(%face -.expected) $(expected body.expected)
8947+ ?: ?=(%union -.expected)
8948+ =/ head=expr val.i.items
8949+ ?. ?=(%lit -.head) ~
8950+ =/ case=(unit itype) (decimal-case val.lit.head cases.expected sub)
8953+ ?. ?=(%cell -.expected) ~
8954+ =/ found=(unit idiag) (decimal-misfit-at val.i.items hed.expected sub)
8956+ $(items t.items, expected tal.expected)
8958+:: +decimal-pattern-misfit: a decimal pattern where another aura is matched
8960+:: The subject's type is known, so no refit is needed. A cell pattern
8961+:: picks its union case by its head, as a tuple does.
8963+++ decimal-pattern-misfit
8964+ |= [p=pattern expected=itype sub=isub]
8966+ =. expected (itype-walk expected sub)
8967+ ?: ?=(%face -.expected) $(expected body.expected)
8968+ ?: ?=(%lit -.p) (decimal-lit-misfit at.p lit.p expected &)
8970+ (decimal-pattern-items items.p expected sub)
8972+:: +decimal-pattern-items: a cell pattern's items, as +decimal-misfit-items
8974+++ decimal-pattern-items
8975+ |= [items=(list pattern) expected=itype sub=isub]
8978+ ?~ t.items (decimal-pattern-misfit i.items expected sub)
8979+ =. expected (itype-walk expected sub)
8980+ ?: ?=(%face -.expected) $(expected body.expected)
8981+ ?: ?=(%union -.expected)
8982+ ?. ?=(%lit -.i.items) ~
8983+ =/ case=(unit itype) (decimal-case val.lit.i.items cases.expected sub)
8986+ ?. ?=(%cell -.expected) ~
8987+ =/ found=(unit idiag) (decimal-pattern-misfit i.items hed.expected sub)
8989+ $(items t.items, expected tal.expected)
8991+:: +decimal-arms-misfit: the first arm whose pattern has a misplaced decimal
8993+++ decimal-arms-misfit
8994+ |= [arms=(list arm) subject=itype sub=isub]
8997+ =/ found=(unit idiag) (decimal-pattern-misfit pat.i.arms subject sub)
9001+:: +decimal-case: the one union case whose head is the constant value
9004+ |= [value=@ cases=(list itype) sub=isub]
9006+ =/ hits=(list itype)
9009+ =. c (itype-walk c sub)
9011+ =/ head=itype (itype-walk hed.c sub)
9012+ =? head ?=(%face -.head) (itype-walk body.head sub)
9013+ &(?=(%const -.head) =(value val.literal.head))
9014+ ?. ?=([* ~] hits) ~
9017+:: +decimal-lit-misfit: the error for a decimal at a place of known type
9019+++ decimal-lit-misfit
9020+ |= [at=span l=lit expected=itype pattern=?]
9022+ ?. &(=(%number form.l) =(%ud aura.l)) ~
9023+ ?. ?=(%atom -.expected) ~
9024+ ?: (decimal-aura aura.expected) ~
9025+ `[(decimal-misfit-msg l aura.expected pattern) ~[[at "decimal"]]]
9027+:: +decimal-misfit-msg: "`30` is a @ud, not a @dr; write ~s30"
9029+:: The hint writes the value in the expected aura's own literal where
9030+:: that reads naturally: 30 seconds, the text "30", the ship ~syd; a
9031+:: date gets an example. Patterns take no dates, durations or knots,
9032+:: so in a pattern those auras get no hint.
9034+++ decimal-misfit-msg
9035+ |= [l=lit aura=@ta pattern=?]
9037+ =/ what=tape "`{(trip txt.l)}` is a @ud, not a @{(trip aura)}"
9039+ ?: &(pattern ?=(?(%da %dr %ta) aura)) ""
9041+ %da "a date, as ~2026.1.1"
9042+ %dr (trip (scot %dr (mul val.l ~s1)))
9043+ %p (trip (scot %p val.l))
9044+ %t (show-quoted txt.l)
9045+ %ta "~.{(trip txt.l)}"
9046+ %ux (trip (scot %ux val.l))
9047+ %uv (trip (scot %uv val.l))
9050+ "{what}; write {hint}"
8820:: A term-headed pair is the same noun as a two-item cell. Preserve the
9052:: A term-headed pair is the same noun as a two-item cell. Preserve the
8821:: whole pair span for the synthetic head and the value's own span for
9053:: whole pair span for the synthetic head and the value's own span for
8822:: the payload; unresolved term constraints follow ordinary cell inference.
9054:: the payload; unresolved term constraints follow ordinary cell inference.
@@ -8874,7 +9106,7 @@
8874 ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
9106 ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
8875 [%| ["list literal needs the standard prelude in partial inference" ~]]
9107 [%| ["list literal needs the standard prelude in partial inference" ~]]
8876 =/ element=itype [%var next.state]
9108 =/ element=itype [%var next.state]
8877− =/ result=iresult (infer-open-list-items items.e element env state(next +(next.state)) at.e)
9109+ =/ result=iresult (infer-open-list-items items.e element env state(next +(next.state)) at.e ~)
8878 ?: ?=(%| -.result) result
9110 ?: ?=(%| -.result) result
8879 [%& [%collection %list ~[element]] state.p.result]
9111 [%& [%collection %list ~[element]] state.p.result]
8880 %str (infer-string-pieces pieces.e env state)
9112 %str (infer-string-pieces pieces.e env state)
@@ -9002,6 +9234,10 @@
9002 [%| ["record branch matching is not supported by partial inference" ~]]
9234 [%| ["record branch matching is not supported by partial inference" ~]]
9003 ?: |((itype-has-any-atom typ.p.left sub.state.p.right) (itype-has-any-atom typ.p.right sub.state.p.right) (itype-family-related typ.p.left typ.p.right sub.state.p.right))
9235 ?: |((itype-has-any-atom typ.p.left sub.state.p.right) (itype-has-any-atom typ.p.right sub.state.p.right) (itype-family-related typ.p.left typ.p.right sub.state.p.right))
9004 [%| ["branch widening is not supported by partial inference" ~]]
9236 [%| ["branch widening is not supported by partial inference" ~]]
9237+ =/ decimal-x=(unit idiag) (decimal-misfit val.x typ.p.left typ.p.right sub.state.p.right next.state.p.right)
9238+ ?^ decimal-x [%| u.decimal-x]
9239+ =/ decimal-y=(unit idiag) (decimal-misfit val.y typ.p.right typ.p.left sub.state.p.right next.state.p.right)
9240+ ?^ decimal-y [%| u.decimal-y]
9005 [%| ["branch arms have incompatible types" ~[[(span-of val.x) (site-type-note "first arm" typ.p.left sub.state.p.right)] [(span-of val.y) (site-type-note "second arm" typ.p.right sub.state.p.right)]]]]
9241 [%| ["branch arms have incompatible types" ~[[(span-of val.x) (site-type-note "first arm" typ.p.left sub.state.p.right)] [(span-of val.y) (site-type-note "second arm" typ.p.right sub.state.p.right)]]]]
9006 [%& typ.u.joined state.p.right(sub sub.u.joined)]
9242 [%& typ.u.joined state.p.right(sub sub.u.joined)]
@@ -9023,6 +9259,8 @@
9023 ?^ missing [%| u.missing]
9259 ?^ missing [%| u.missing]
9024 =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value typ.u.target sub.state.p.value next.state.p.value at.shape.e)
9260 =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value typ.u.target sub.state.p.value next.state.p.value at.shape.e)
9025 ?^ nested [%| u.nested]
9261 ?^ nested [%| u.nested]
9262+ =/ decimal=(unit idiag) (decimal-misfit val.e typ.p.value typ.u.target sub.state.p.value next.state.p.value)
9263+ ?^ decimal [%| u.decimal]
9026 [%| ["cast mold and expression type do not unify" ~[[at.shape.e (site-type-note "cast mold" typ.u.target sub.state.p.value)] [(span-of val.e) (site-type-note "expression" typ.p.value sub.state.p.value)]]]]
9264 [%| ["cast mold and expression type do not unify" ~[[at.shape.e (site-type-note "cast mold" typ.u.target sub.state.p.value)] [(span-of val.e) (site-type-note "expression" typ.p.value sub.state.p.value)]]]]
9027 ?: &(?=(^ defer.state.p.value) !(dg-stable-fit typ.p.value typ.u.target sub.fit))
9265 ?: &(?=(^ defer.state.p.value) !(dg-stable-fit typ.p.value typ.u.target sub.fit))
9028 [%| ["deferred cast fit needs stable inference" ~]]
9266 [%| ["deferred cast fit needs stable inference" ~]]
@@ -9346,11 +9584,17 @@
9346 ?^ missing [%| u.missing]
9584 ?^ missing [%| u.missing]
9347 =/ nested=(unit idiag) (nested-missing-tag i.args.e typ.p.arg sample.ht sub.st next.st (span-of head.e))
9585 =/ nested=(unit idiag) (nested-missing-tag i.args.e typ.p.arg sample.ht sub.st next.st (span-of head.e))
9348 ?^ nested [%| u.nested]
9586 ?^ nested [%| u.nested]
9587+ =/ decimal=(unit idiag) (decimal-misfit i.args.e typ.p.arg sample.ht sub.st next.st)
9588+ ?^ decimal [%| u.decimal]
9349 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
9589 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
9350 =/ bad=(unit [at=span typ=itype])
9590 =/ bad=(unit [at=span typ=itype])
9351 (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
9591 (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
9352 =/ whole-args=span
9592 =/ whole-args=span
9353 [beg:(span-of i.args.e) end:(span-of (rear args.e))]
9593 [beg:(span-of i.args.e) end:(span-of (rear args.e))]
9594+ =/ decimal=(unit idiag)
9595+ =/ items=(list item) (turn args.e |=(a=expr [(span-of a) ~ a]))
9596+ (decimal-misfit [%tuple whole-args items] typ.p.arg sample.ht sub.st next.st)
9597+ ?^ decimal [%| u.decimal]
9354 =/ arg-at=span ?~(bad whole-args at.u.bad)
9598 =/ arg-at=span ?~(bad whole-args at.u.bad)
9355 =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
9599 =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
9356 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [arg-at (site-type-note "argument" arg-type sub.st)]]]]
9600 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [arg-at (site-type-note "argument" arg-type sub.st)]]]]
@@ -9421,6 +9665,8 @@
9421 ?^ missing [%| u.missing]
9665 ?^ missing [%| u.missing]
9422 =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value payload sub.state.p.value next.state.p.value context)
9666 =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value payload sub.state.p.value next.state.p.value context)
9423 ?^ nested [%| u.nested]
9667 ?^ nested [%| u.nested]
9668+ =/ decimal=(unit idiag) (decimal-misfit val.e typ.p.value payload sub.state.p.value next.state.p.value)
9669+ ?^ decimal [%| u.decimal]
9424 [%| ["unit payload does not fit its expected type" ~[[context (site-type-note "expected unit payload" payload sub.state.p.value)] [(span-of val.e) (site-type-note "payload" typ.p.value sub.state.p.value)]]]]
9670 [%| ["unit payload does not fit its expected type" ~[[context (site-type-note "expected unit payload" payload sub.state.p.value)] [(span-of val.e) (site-type-note "payload" typ.p.value sub.state.p.value)]]]]
9425 [%& expected state.p.value(sub sub.fit, next next.fit)]
9671 [%& expected state.p.value(sub sub.fit, next next.fit)]