@@ -4660,6 +4660,14 @@
46604660:: proofs to fewer than 1,024 cells; the projection planner has a separate
46614661:: 4,096-step bound. These are inference limits, not language limits.
46624662::
4663+:: `unface` is reserved with proj (+reserved-name) and is also handled by
4664+:: type: (unface e) has e's type with every face removed, through cells,
4665+:: gates and collection arguments, keeping unions and recursive molds
4666+:: whole (+itype-unface). It is not a value, it takes one argument, and
4667+:: a bare type variable is unsupported, as field access on one is. A ++
4668+:: whose body is (unface |= …) is a gate for recursion (+unfaced-gate).
4669+:: It lowers to its argument; no lowering is implemented yet.
4670+::
46634671:: Supported API imports derive request-gate types atomically for multiple
46644672:: paths, including one typed segment or one diff fold per case. Their checked
46654673:: ordinary definitions, mark molds and supported poke constructor are also
@@ -4967,6 +4975,35 @@
49674975 $(a tal.a, b tal.b, sub u.first)
49684976 ~
49694977::
4978+:: +itype-unface: t with every face removed, for (unface e)
4979+::
4980+:: It strips through cells, through a gate's sample and product and
4981+:: through a built-in collection's arguments, the prelude's unit
4982+:: included, walking bound variables. Other unions and recursive
4983+:: molds are compared by name or by their exact cases, so stripping
4984+:: inside them would stop them from fitting their own name: they are
4985+:: kept whole. An unbound variable stays, so faces it is bound to
4986+:: later are kept. The unit keeps its own u=, as a list keeps i= and
4987+:: t= in its mold.
4988+::
4989+++ itype-unface
4990+ |= [t=itype sub=isub]
4991+ ^- itype
4992+ =. t (itype-walk t sub)
4993+ ?+ -.t t
4994+ %face $(t body.t)
4995+ %cell [%cell $(t hed.t) $(t tal.t)]
4996+ %fn [%fn $(t sample.t) $(t product.t)]
4997+ %collection [%collection name.t (turn args.t |=(a=itype ^$(t a)))]
4998+ %union
4999+ ?. =(origin.t `[/lib/jibb/prelude/jibb %unit]) t
5000+ ?. ?=([* ~] args.t) t
5001+ =/ nil=itype [%const [%null %n 0 '~']]
5002+ ?. =(cases.t ~[nil [%cell nil [%face %u i.args.t]]]) t
5003+ =/ arg=itype $(t i.args.t)
5004+ t(cases ~[nil [%cell nil [%face %u arg]]], args ~[arg])
5005+ ==
5006+::
49705007+$ igf-form [typ=itype sub=isub left=@ud]
49715008+$ igf-forms [types=(list itype) sub=isub left=@ud]
49725009++ itype-gate-free-forms
@@ -7367,12 +7404,12 @@
73677404 ^- isample-result
73687405 ?- -.s
73697406 %bind
7370− ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
7407+ ?: |((reserved-name name.s) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
73717408 [%| "sample shadows a name"]
73727409 =/ t=itype [%var next.state]
73737410 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
73747411 %face
7375− ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
7412+ ?: |((reserved-name name.s) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
73767413 [%| "sample shadows a name"]
73777414 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
73787415 ?~ t [%| "sample mold is not supported by partial inference"]
@@ -7440,7 +7477,7 @@
74407477 |-
74417478 ?~ ds &
74427479 ?: ?=(%mold -.i.ds) $(ds t.ds)
7443− ?: =(name.i.ds %proj) |
7480+ ?: (reserved-name name.i.ds) |
74447481 ?. (unique-value-name name.i.ds names) |
74457482 ?: ?=(^ (ienv-lookup name.i.ds env)) |
74467483 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
@@ -7464,7 +7501,7 @@
74647501 |-
74657502 ?~ locals &
74667503 =/ n=term name.i.locals
7467− ?: =(n %proj) |
7504+ ?: (reserved-name n) |
74687505 ?. (unique-value-name n names) |
74697506 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
74707507 ?: (lien marks.state |=(m=term =(n m))) |
@@ -8144,7 +8181,7 @@
81448181 [%| ["list branch pattern is not supported by partial inference" ~]]
81458182 =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
81468183 ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
8147− ?: |(=(head.u.binder %proj) =(tail.u.binder %proj) =(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
8184+ ?: |((reserved-name head.u.binder) (reserved-name tail.u.binder) =(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
81488185 [%| ["pattern binder shadows a name" ~]]
81498186 =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
81508187 =/ left=iresult
@@ -8181,7 +8218,7 @@
81818218 [%| ["unit branch pattern is not supported by partial inference" ~]]
81828219 =/ binder=(unit term) ?:(first-empty second-name first-name)
81838220 ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
8184− ?: |(=(u.binder %proj) ?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
8221+ ?: |((reserved-name u.binder) ?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
81858222 [%| ["pattern binder shadows a name" ~]]
81868223 =/ payload=(unit itype) (unit-union-payload typ)
81878224 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
@@ -8288,7 +8325,7 @@
82888325 ^- (unit ienv)
82898326 =. t ?:(?=(%face -.t) body.t t)
82908327 ?: ?=(%bind -.p)
8291− ?: |(=(name.p %proj) ?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
8328+ ?: |((reserved-name name.p) ?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
82928329 `[[name.p [t ~]] env]
82938330 ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
82948331 `env
@@ -9278,6 +9315,7 @@
92789315 [%& typ.instance state.instance]
92799316 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
92809317 ?~ scheme
9318+ ?: =(i.names.e %unface) [%| (unface-value at.e)]
92819319 ?~ prelude.state [%| ["name is not available to partial inference" ~]]
92829320 =/ prelude-entry=(unit ischeme) (ienv-lookup i.names.e values.u.prelude.state)
92839321 ?~ prelude-entry [%| ["name is not available to partial inference" ~]]
@@ -9285,7 +9323,10 @@
92859323 [%& typ.inst state.inst]
92869324 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
92879325 [%& typ.instance state.instance]
9288− %group $(e inner.e)
9326+ %group
9327+ ?: &(?=(%wing -.inner.e) =(names.inner.e ~[%unface]) ?=(~ (ienv-lookup %unface env)))
9328+ [%| ["unface takes one argument, as (unface e)" ~[[at.e "unface call"]]]]
9329+ $(e inner.e)
92899330 %change
92909331 ?~ edits.e [%| ["a change takes at least one field" ~[[at.e "empty change"]]]]
92919332 =/ target=iresult $(e [%wing at.e target.e])
@@ -9429,6 +9470,7 @@
94299470 ?~ args.e [%| ["call has no argument" ~]]
94309471 ?: (explicit-proj-call e env state)
94319472 [%| ["proj needs an expected record type" ~]]
9473+ ?: (reserved-call %unface e env state) (infer-unface e env state)
94329474 (infer-call-with-head e env state (infer-fragment head.e env state))
94339475 * [%| ["expression is not supported by partial inference" ~]]
94349476 ==
@@ -9819,6 +9861,7 @@
98199861 ^- iresult
98209862 ?> ?=(%call -.e)
98219863 ?~ args.e [%| ["call has no argument" ~]]
9864+ ?: (reserved-call %unface e env state) (infer-unface e env state)
98229865 =/ head=iresult (infer-fragment head.e env state)
98239866 ?: ?=(%| -.head) head
98249867 =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
@@ -9901,18 +9944,70 @@
99019944 `(infer-simple-items items.e env state)
99029945 `(width-infer-items items.e index.u.target env state context)
99039946::
9904−:: Experimental intrinsic recognition; real bindings retain normal calls.
9947+:: +reserved-call: whether e calls the reserved operation n
9948+::
9949+:: Experimental intrinsic recognition; real bindings retain normal calls.
9950+++ reserved-call
9951+ |= [n=term e=expr env=ienv state=istate]
9952+ ^- ?
9953+ ?. ?=(%call -.e) |
9954+ ?. ?=(%wing -.head.e) |
9955+ ?. =(names.head.e ~[n]) |
9956+ ?: ?=(^ (ienv-lookup n env)) |
9957+ ?: (lien globals.state |=(x=term =(x n))) |
9958+ ?~ prelude.state &
9959+ ?:(?=(^ (ienv-lookup n values.u.prelude.state)) | &)
99059960++ explicit-proj-call
99069961 |= [e=expr env=ienv state=istate]
99079962 ^- ?
99089963 ?. ?=(%call -.e) |
99099964 ?. ?=([* ~] args.e) |
9910− ?. ?=(%wing -.head.e) |
9911− ?. =(names.head.e ~[%proj]) |
9912− ?: ?=(^ (ienv-lookup %proj env)) |
9913− ?: (lien globals.state |=(n=term =(n %proj))) |
9914− ?~ prelude.state &
9915− ?:(?=(^ (ienv-lookup %proj values.u.prelude.state)) | &)
9965+ (reserved-call %proj e env state)
9966+::
9967+:: +infer-unface: (unface e), e's type with every face removed
9968+::
9969+:: A reserved operation handled by type, like proj. Any number of
9970+:: arguments is taken here so that a wrong count is an error. A type
9971+:: not yet known would wait, as wing access does; the partial checker
9972+:: has no such wait and reports it as unsupported, as it does field
9973+:: access on such a type.
9974+++ infer-unface
9975+ |= [e=expr env=ienv state=istate]
9976+ ^- iresult
9977+ ?> ?=(%call -.e)
9978+ ?. ?=([* ~] args.e)
9979+ [%| ["unface takes one argument, as (unface e)" ~[[at.e "unface call"]]]]
9980+ ?^ defer.state [%| ["deferred unface needs unsupported inference" ~]]
9981+ =/ value=iresult (infer-fragment i.args.e env state)
9982+ ?: ?=(%| -.value) value
9983+ =/ typ=itype (itype-walk typ.p.value sub.state.p.value)
9984+ ?: ?=(?(%var %fvar) -.typ)
9985+ [%| ["unface on a type not yet known is not supported by partial inference" ~]]
9986+ [%& (itype-unface typ sub.state.p.value) state.p.value]
9987+::
9988+:: +unface-value: the error for unface written where a value goes
9989+::
9990+++ unface-value
9991+ |= at=span
9992+ ^- idiag
9993+ ["unface is not a value; write |=(g (unface g))" ~[[at "unface used as a value"]]]
9994+::
9995+:: +unfaced-gate: the gate under a ++'s (unface |= …), or ~
9996+::
9997+:: Such a ++ is a gate for recursion: its own name has the unfaced
9998+:: type, and its body may call it.
9999+++ unfaced-gate
10000+ |= [e=expr env=ienv state=istate]
10001+ ^- (unit expr)
10002+ ?: ?=(%group -.e) $(e inner.e)
10003+ ?. (reserved-call %unface e env state) ~
10004+ ?> ?=(%call -.e)
10005+ ?. ?=([* ~] args.e) ~
10006+ =/ gate=expr i.args.e
10007+ |-
10008+ ?: ?=(%group -.gate) $(gate inner.gate)
10009+ ?. ?=(?(%gate %gate-wide) -.gate) ~
10010+ `gate
991610011++ infer-proj-source
991710012 |= [e=expr expected=itype env=ienv state=istate context=span]
991810013 ^- iresult
@@ -10319,7 +10414,7 @@
1031910414 ?~ pats [%& ~]
1032010415 ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
1032110416 =/ name=term name.i.pats
10322− ?: |(=(name %proj) ?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
10417+ ?: |((reserved-name name) ?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
1032310418 [%| 'pattern shadows a name']
1032410419 =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
1032510420 ?: ?=(%| -.rest) rest
@@ -10861,6 +10956,9 @@
1086110956 ?^ defer.state [%| ["deferred recursive inference is unsupported" ~]]
1086210957 =. gate-defs.state ~
1086310958 ?. ?=(%value -.d) [%| ["recursive definition is not a gate" ~]]
10959+ :: A ++ whose body is (unface |= …) is a gate too, unfaced
10960+ =/ peeled=(unit expr) (unfaced-gate val.d env state)
10961+ =? val.d ?=(^ peeled) u.peeled
1086410962 ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
1086510963 [%| ["recursive definition is not a gate" ~]]
1086610964 =/ result=(unit itype) (recursive-branch-seed d env state)
@@ -10884,6 +10982,7 @@
1088410982 =/ product=itype ?~(result [%var id] u.result)
1088510983 =/ st=istate state.p.sam(next +(id))
1088610984 =/ seed=itype [%fn typ.p.sam product]
10985+ =? seed ?=(^ peeled) (itype-unface seed sub.st)
1088710986 =/ seeded=ienv [[name.d [seed ~]] env.p.sam]
1088810987 =/ body=expr
1088910988 ?- -.gate
@@ -10895,7 +10994,9 @@
1089510994 ?: ?=(%| -.out) out
1089610995 =/ uni=(unit isub) (itype-unify product typ.p.out sub.state.p.out)
1089710996 ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
10898− [%& [%fn typ.p.sam typ.p.out] state.p.out(sub u.uni)]
10997+ =/ typ=itype [%fn typ.p.sam typ.p.out]
10998+ =? typ ?=(^ peeled) (itype-unface typ u.uni)
10999+ [%& typ state.p.out(sub u.uni)]
1089911000::
1090011001++ dependency-root
1090111002 |= names=(list term)
@@ -11003,7 +11104,7 @@
1100311104:: Infer a cyclic component with one monomorphic seed per gate. All members
1100411105:: must succeed before any scheme is available; pending constraints and
1100511106:: unresolved branch joins remain partial.
11006−+$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps]
11107++$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps unfaced=?]
1100711108+$ igate-seeds (each [entries=(list igate-entry) state=istate] idiag)
1100811109++ seed-gate-group
1100911110 |= [ds=(list def) env=ienv state=istate]
@@ -11011,7 +11112,9 @@
1101111112 ?~ ds [%& [~ state]]
1101211113 =/ d=def i.ds
1101311114 ?. ?=(%value -.d) [%| ["recursive group contains a non-gate" ~]]
11014− =/ gate=expr val.d
11115+ :: A ++ whose body is (unface |= …) is a gate too, unfaced
11116+ =/ peeled=(unit expr) (unfaced-gate val.d env state)
11117+ =/ gate=expr ?~(peeled val.d u.peeled)
1101511118 ?. |(?=(%gate -.gate) ?=(%gate-wide -.gate))
1101611119 [%| ["recursive group contains a non-gate" ~]]
1101711120 =/ initial=istate (reserve-def-caps gate state)
@@ -11029,7 +11132,8 @@
1102911132 * !!
1103011133 ==
1103111134 =/ seed=itype [%fn typ.p.sam [%var next.state.p.sam]]
11032− =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam]
11135+ =? seed ?=(^ peeled) (itype-unface seed sub.state.p.sam)
11136+ =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam ?=(^ peeled)]
1103311137 =/ after=istate state.p.sam(next +(next.state.p.sam), caps caps.state)
1103411138 =/ rest=igate-seeds $(ds t.ds, state after)
1103511139 ?: ?=(%| -.rest) rest
@@ -11069,6 +11173,7 @@
1106911173 ?: (constrained-capitals caps.entry sub.state)
1107011174 [%| ["explicit capital constraints are not supported by partial inference" ~]]
1107111175 =/ typ=itype (itype-normalize typ.entry sub.state)
11176+ =? typ unfaced.entry (itype-unface typ ~)
1107211177 ?: (itype-has-nvar typ) [%| ["recursive group needs unsupported inference" ~]]
1107311178 ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
1107411179 [%| ["recursive group needs unsupported inference" ~]]
@@ -12292,59 +12397,68 @@
1229212397 ==
1229312398 [n $(imports t.imports)]
1229412399::
12295−++ reserved-proj-sample
12400+:: +reserved-name: whether n names a reserved operation
12401+::
12402+:: proj and unface are handled by the checker by type, not bound, so
12403+:: no module may define, import or bind either name, as a value or
12404+:: as a mold. A field, tag or path segment may still be spelled so.
12405+++ reserved-name
12406+ |= n=term
12407+ ^- ?
12408+ |(=(n %proj) =(n %unface))
12409+++ reserved-sample
1229612410 |= sam=sample
1229712411 ^- ?
1229812412 ?- -.sam
12299− %bind =(name.sam %proj)
12300− %face =(name.sam %proj)
12301− %pun =(name.sam %proj)
12302− %cell (lien items.sam reserved-proj-sample)
12413+ %bind (reserved-name name.sam)
12414+ %face (reserved-name name.sam)
12415+ %pun (reserved-name name.sam)
12416+ %cell (lien items.sam reserved-sample)
1230312417 * |
1230412418 ==
12305−++ reserved-proj-pattern
12419+++ reserved-pattern
1230612420 |= p=pattern
1230712421 ^- ?
1230812422 ?- -.p
12309− %bind =(name.p %proj)
12310− %cell (lien items.p reserved-proj-pattern)
12423+ %bind (reserved-name name.p)
12424+ %cell (lien items.p reserved-pattern)
1231112425 * |
1231212426 ==
12313−++ reserved-proj-def
12427+++ reserved-def
1231412428 |= d=def
1231512429 ^- ?
12316− ?: =(name.d %proj) &
12317− ?: ?=(%value -.d) (reserved-proj-expr val.d)
12430+ ?: (reserved-name name.d) &
12431+ ?: ?=(%value -.d) (reserved-expr val.d)
1231812432 |
12319−++ reserved-proj-expr
12433+++ reserved-expr
1232012434 |= e=expr
1232112435 ^- ?
1232212436 ?- -.e
12323− %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
12324− %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
12325− %change (lien edits.e |=(p=edit (reserved-proj-expr val.p)))
12437+ %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (reserved-expr p.p) |)))
12438+ %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (reserved-expr p.p) |)))
12439+ %change (lien edits.e |=(p=edit (reserved-expr val.p)))
1232612440 %pair $(e val.e)
1232712441 %unit $(e val.e)
1232812442 %group $(e inner.e)
12329− %list (lien items.e reserved-proj-expr)
12330− %tuple (lien items.e |=(i=item (reserved-proj-expr val.i)))
12331− ?(%gate %gate-wide) |((reserved-proj-sample sample.e) $(e body.e))
12443+ %list (lien items.e reserved-expr)
12444+ %tuple (lien items.e |=(i=item (reserved-expr val.i)))
12445+ ?(%gate %gate-wide) |((reserved-sample sample.e) $(e body.e))
1233212446 %cast $(e val.e)
12333− %call |($(e head.e) (lien args.e reserved-proj-expr))
12447+ %call |($(e head.e) (lien args.e reserved-expr))
1233412448 %trace |($(e val.e) $(e then.e))
12335− %branch |($(e subject.e) (lien arms.e |=(a=arm |((reserved-proj-pattern pat.a) (reserved-proj-expr val.a)))))
12336− %body |((lien defs.e reserved-proj-def) $(e final.e))
12449+ %branch |($(e subject.e) (lien arms.e |=(a=arm |((reserved-pattern pat.a) (reserved-expr val.a)))))
12450+ %body |((lien defs.e reserved-def) $(e final.e))
1233712451 * |
1233812452 ==
1233912453::
12340−++ module-has-reserved-proj
12454+++ module-has-reserved
1234112455 |= mod=module
1234212456 ^- ?
1234312457 =/ imported=(list term) (import-binding-names imports.mod)
1234412458 =/ vals=(list term) (global-value-names defs.mod)
1234512459 =/ molds=imolds (collect-simple-molds defs.mod)
1234612460 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
12347− |((lien (weld imported (weld vals mold-names)) |=(n=term =(n %proj))) (lien defs.mod reserved-proj-def))
12461+ |((lien (weld imported (weld vals mold-names)) reserved-name) (lien defs.mod reserved-def))
1234812462::
1234912463++ module-scope-valid
1235012464 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
@@ -12353,7 +12467,7 @@
1235312467 =/ vals=(list term) (global-value-names defs.mod)
1235412468 =/ molds=imolds (collect-simple-molds defs.mod)
1235512469 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
12356− ?: (module-has-reserved-proj mod) |
12470+ ?: (module-has-reserved mod) |
1235712471 ?. %+ levy imported
1235812472 |= n=term
1235912473 &((unique-value-name n imported) !(lien vals |=(v=term =(n v))) !(lien mold-names |=(m=term =(n m))) !(lien prelude-values |=(v=term =(n v))) !(lien prelude-molds |=(m=term =(n m))))
@@ -13042,7 +13156,7 @@
1304213156 ^- ?
1304313157 =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
1304413158 =/ derived=(list term) (weld path-names poke-names)
13045− ?: (lien derived |=(n=term =(n %proj))) |
13159+ ?: (lien derived reserved-name) |
1304613160 =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
1304713161 (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
1304813162::
@@ -13074,7 +13188,7 @@
1307413188 =/ clashes=(list term)
1307513189 %+ skip names
1307613190 |= n=term
13077− ?| =(n %proj)
13191+ ?| (reserved-name n)
1307813192 &((unique-value-name n names) !(lien outer |=(x=term =(n x))))
1307913193 ==
1308013194 ?~ clashes ~
@@ -13849,7 +13963,7 @@
1384913963 =/ action=term %poke
1385013964 =/ ordinary=(list def) ds
1385113965 =/ derived=(list term) ~[%state action]
13852− ?: (lien derived |=(n=term =(n %proj))) [%| ~]
13966+ ?: (lien derived reserved-name) [%| ~]
1385313967 =/ outer=(list term)
1385413968 (weld prelude-values (weld (global-value-names ordinary) (api-import-faces imports.mod)))
1385513969 =/ clashes=(list term)
@@ -15619,8 +15733,8 @@
1561915733 ?: ?=(%| -.parsed) (show-error src p.parsed)
1562015734 =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
1562115735 ?^ duplicate (duplicate-fields-report file src u.duplicate)
15622− ?: (module-has-reserved-proj p.parsed)
15623− 'module has reserved proj name'
15736+ ?: (module-has-reserved p.parsed)
15737+ 'module has a reserved proj or unface name'
1562415738 =/ ds=(list def) defs.p.parsed
1562515739 =/ molds=imolds (collect-simple-molds ds)
1562615740 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
@@ -15698,7 +15812,7 @@
1569815812 =. head-evidence.initial heads
1569915813 =. initial (reserve-def-caps val.d initial)
1570015814 =/ result=iresult
15701− ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
15815+ ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d) ?=(^ (unfaced-gate val.d env initial)))
1570215816 (infer-recursive-gate d env initial)
1570315817 (infer-fragment val.d env initial)
1570415818 ?: ?=(%| -.result)