@@ -774,39 +774,38 @@
774774:: (face 2:11 items
775775:: (apply 2:17 list (aura 2:23 @t)))
776776:: (face 2:27 open (flag 2:32))))
777−:: (mold 3:1 cart-action
777+:: (mold 3:1 poke
778778:: (union 4:3
779779:: (cell 4:3
780780:: (const 4:4 %add)
781781:: (face 4:9 item (aura 4:14 @t)))
782782:: (const 5:3 %toggle)))
783−:: (mold 6:1 poke (ref 6:9 cart-action))
784−:: (value 8:1 main
785−:: (group 8:9
786−:: (call 8:10 (wing 8:10 store) (wing 8:16 init) (wing 8:21 update))))
787−:: (value 9:1 init
788−:: (cast 9:9
789−:: (ref 9:12 state)
790−:: (tuple 9:18 (lit 9:19 ~) (lit 9:21 %.n))))
791−:: (value 10:1 update
792−:: (gate 10:11
793−:: (cell 10:14
794−:: (face 10:15 a (ref 10:17 cart-action))
795−:: (face 10:29 s (ref 10:31 state)))
796−:: (body 11:3
797−:: (branch 11:3
798−:: (wing 11:6 a)
783+:: (value 7:1 main
784+:: (group 7:9
785+:: (call 7:10 (wing 7:10 store) (wing 7:16 init) (wing 7:21 update))))
786+:: (value 8:1 init
787+:: (cast 8:9
788+:: (ref 8:12 state)
789+:: (tuple 8:18 (lit 8:19 ~) (lit 8:21 %.n))))
790+:: (value 9:1 update
791+:: (gate 9:11
792+:: (cell 9:14
793+:: (face 9:15 a (ref 9:17 poke))
794+:: (face 9:22 s (ref 9:24 state)))
795+:: (body 10:3
796+:: (branch 10:3
797+:: (wing 10:6 a)
798+:: (arm 11:5
799+:: (cell 11:5 (lit 11:6 %add) (bind 11:11 item))
800+:: (change 11:18 s
801+:: (edit 11:20 items
802+:: (tuple 11:26 (wing 11:27 item) (wing 11:32 items.s)))))
799803:: (arm 12:5
800−:: (cell 12:5 (lit 12:6 %add) (bind 12:11 item))
804+:: (lit 12:5 %toggle)
801805:: (change 12:18 s
802−:: (edit 12:20 items
803−:: (tuple 12:26 (wing 12:27 item) (wing 12:32 items.s)))))
804−:: (arm 13:5
805−:: (lit 13:5 %toggle)
806−:: (change 13:18 s
807−:: (edit 13:20 open
808−:: (group 13:25
809−:: (call 13:26 (wing 13:26 not) (wing 13:30 open.s)))))))))))
806+:: (edit 12:20 open
807+:: (group 12:25
808+:: (call 12:26 (wing 12:26 not) (wing 12:30 open.s)))))))))))
810809::
811810:: 4.3 Errors (+show-error): "<file>:<line>:<col>: <message>", then the
812811:: source line, then a caret under the column (col - 1 spaces, then ^).
@@ -11341,22 +11340,6 @@
1134111340 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
1134211341 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
1134311342::
11344−:: In an API file or before main's kind is known, a lone `+$ poke`
11345−:: may be a declaration rather than a mold that shadows the prelude. Do not call
11346−:: that one collision definite, and do not hide unrelated scope errors.
11347−++ pending-declared-poke
11348− |= [at=path mod=module prelude-values=(list term) prelude-molds=(list term)]
11349− ^- ?
11350− ?. (lien prelude-molds |=(n=term =(%poke n))) |
11351− ?. |(?=([%ui %api @ %jibb ~] at) (lien defs.mod |=(d=def &(?=(%value -.d) =(%main name.d))))) |
11352− =/ pokes=(list def)
11353− (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
11354− ?~ pokes |
11355− ?^ t.pokes |
11356− =/ remaining=(list def)
11357− (skim defs.mod |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
11358− (module-scope-valid mod(defs remaining) prelude-values prelude-molds)
11359−::
1136011343:: A detailed failure is attached only to the first mold that actually
1136111344:: failed in this check, using that module's checked source mold table.
1136211345+$ imold-failure [message=@t overlap=(unit [name=term cases=upair])]
@@ -12003,7 +11986,8 @@
1200311986 ?> ?=(%mold -.decl)
1200411987 =/ paths=(unit (list iapi-path)) (api-path-declaration shape.decl declared)
1200511988 ?~ paths ~
12006− ?. (api-derived-names-valid u.paths u.poke-names mod prelude-values) ~
11989+ =/ derived-pokes=(list term) ?~(pokes ~ ~[%poke])
11990+ ?. (api-derived-names-valid u.paths derived-pokes mod prelude-values) ~
1200711991 (api-path-types u.paths externals declared)
1200811992::
1200911993:: Source/graph entry for path analysis only. The returned paths retain
@@ -12214,16 +12198,17 @@
1221412198:: Value watchability remains unproved even for a watchable declaration.
1221512199+$ ione-request-interface
1221612200 [support=iapi-support-evidence parts=iapi-request-parts iface=ifile]
12217−++ store-compatible-poke
12201+++ compatible-raw-poke
1221812202 |= prelude=iprelude
1221912203 ^- (unit ischeme)
1222012204 =/ public=ifile iface.prelude
1222112205 ?. =(at.public /lib/jibb/prelude/jibb) ~
12222− =/ poke=(unit ischeme) (find-jibb-mold %poke public)
12206+ =/ poke=(unit ischeme) (find-jibb-mold %raw-poke public)
1222312207 ?~ poke ~
12224− ?. ?=(%union -.typ.u.poke) ~
1222512208 ?^ vars.u.poke ~
12226− ?. =(origin.typ.u.poke `[/lib/jibb/internal/jibb %poke]) ~
12209+ ?. ?=(%union -.typ.u.poke) ~
12210+ ?^ args.typ.u.poke ~
12211+ ?. =(origin.typ.u.poke `[/lib/jibb/internal/jibb %raw-poke]) ~
1222712212 ?: (itype-has-tag typ.u.poke) ~
1222812213 =/ private=(list iwidth-dependency)
1222912214 (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
@@ -12407,7 +12392,7 @@
1240712392 ?^ (duplicate-defs defs.mod) ~
1240812393 ?~ prelude ~
1240912394 ?. =(at.u.prelude /lib/jibb/prelude/jibb) ~
12410− =/ poke=(unit ischeme) (find-jibb-mold %poke u.prelude)
12395+ =/ poke=(unit ischeme) (find-jibb-mold %raw-poke u.prelude)
1241112396 ?~ poke ~
1241212397 ?. ?=(%union -.typ.u.poke) ~
1241312398 ?^ vars.u.poke ~
@@ -12431,8 +12416,9 @@
1243112416 ?: |((lien prelude-values |=(x=term =(n x))) (lien prelude-molds |=(x=term =(n x)))) ~
1243212417 =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
1243312418 ?~ mark ~
12434− =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
12435− `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~ ~]
12419+ =/ sc=(unit ischeme) (derived-poke-command-scheme u.prelude u.mark)
12420+ ?~ sc ~
12421+ `[~[[%poke u.sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~ ~]
1243612422::
1243712423:: Source-proven ordinary helpers validate each selected /sur dependency.
1243812424:: Unused or less direct cores remain unsupported by this first interface.
@@ -12635,8 +12621,8 @@
1263512621 ?~ view ~
1263612622 `[u.load u.view]
1263712623::
12638−:: A store main is only the direct two-wing source call. The poke declaration
12639−:: is checked here, then removed before every ordinary mold/value inference pass.
12624+:: A store main is only the direct two-wing source call. Its local poke mold
12625+:: is checked here and remains in ordinary mold/value inference.
1264012626++ store-main-parts
1264112627 |= d=def
1264212628 ^- (unit [init=term update=term])
@@ -12671,18 +12657,10 @@
1267112657 =/ state=def i.states
1267212658 ?> &(?=(%mold -.poke) ?=(%mold -.state))
1267312659 ?: ?=(%generic -.shape.state) ~
12674− ?. ?=(%ref -.shape.poke) ~
12675− ?. ?=([@ ~] names.shape.poke) ~
12676− =/ action=term i.names.shape.poke
12677− =/ actions=(list def)
12678− (skim ds |=(d=def &(?=(%mold -.d) =(action name.d))))
12679− ?. ?=([* ~] actions) ~
12680− =/ action-def=def i.actions
12681− ?> ?=(%mold -.action-def)
12682− ?: ?=(%generic -.shape.action-def) ~
12683− =/ ordinary=(list def)
12684− (skim ds |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
12685− ?. (module-scope-valid mod(defs ordinary) prelude-values prelude-molds) ~
12660+ ?: ?=(%generic -.shape.poke) ~
12661+ =/ action=term %poke
12662+ =/ ordinary=(list def) ds
12663+ ?. (module-scope-valid mod prelude-values prelude-molds) ~
1268612664 =/ derived=(list term) ~[%state action]
1268712665 ?: (lien derived |=(n=term =(n %proj))) ~
1268812666 =/ outer=(list term)
@@ -13753,6 +13731,7 @@
1375313731 =? inferred ?=(%| -.inferred) (infer-recursive-gate init-def env init-state)
1375413732 ?: ?=(%| -.inferred) ~
1375513733 ?. ?=(%fn -.typ.p.inferred) ~
13734+ ?^ (itype-vars sample.typ.p.inferred) ~
1375613735 =/ data-fit=ifit
1375713736 (itype-fit sample.typ.p.inferred sample.expected sub.state.p.inferred next.state.p.inferred)
1375813737 ?. ?=(%ok -.data-fit) ~
@@ -13782,22 +13761,58 @@
1378213761 ?. ?=(~ (itype-vars typ.u.recovered)) ~
1378313762 `[env.u.added grouped.resolution artifacts.u.added]
1378413763::
13764+++ derived-poke-command-scheme
13765+ |= [prelude=ifile action=itype]
13766+ ^- (unit ischeme)
13767+ =/ prep=iprelude [prelude ~ ~]
13768+ =/ raw=(unit ischeme) (compatible-raw-poke prep)
13769+ ?~ raw ~
13770+ =/ command=(unit ischeme) (find-jibb-mold %cmd prelude)
13771+ =/ unit-template=(unit ischeme) (find-jibb-mold %unit prelude)
13772+ ?~ command ~
13773+ ?~ unit-template ~
13774+ ?. (standard-unit-template u.unit-template /lib/jibb/prelude/jibb) ~
13775+ ?. ?=([@ ~] vars.u.command) ~
13776+ ?. ?=(%union -.typ.u.command) ~
13777+ ?. =(origin.typ.u.command `[/lib/jibb/prelude/jibb %cmd]) ~
13778+ ?. (identity-union-parameters vars.u.command args.typ.u.command) ~
13779+ =/ m=@ud i.vars.u.command
13780+ ?: (itype-var-is-atom m typ.u.command) ~
13781+ ?. (levy (itype-vars typ.u.command) |=(n=@ud =(n m))) ~
13782+ ?: (itype-has-tag typ.u.command) ~
13783+ =/ error=(unit itype) (template-apply u.unit-template ~[[%atom %t]])
13784+ ?~ error ~
13785+ ?. ?=(%union -.typ.u.raw) ~
13786+ =/ poke-case=itype
13787+ [%cell [%const [%term %tas %poke '%poke']] [%cell [%face %p typ.u.raw(label `'raw-poke.internal')] [%face %reply [%fn u.error [%var m]]]]]
13788+ =/ go-case=itype
13789+ [%cell [%const [%term %tas %go '%go']] [%face %url [%atom %t]]]
13790+ =/ wait-case=itype
13791+ [%cell [%const [%term %tas %wait '%wait']] [%cell [%face %gap [%atom %dr]] [%face %msg [%var m]]]]
13792+ =/ now-case=itype
13793+ [%cell [%const [%term %tas %now '%now']] [%face %reply [%fn [%atom %da] [%var m]]]]
13794+ =/ who-case=itype
13795+ [%cell [%const [%term %tas %who '%who']] [%face %reply [%fn [%atom %p] [%var m]]]]
13796+ ?. =(cases.typ.u.command ~[poke-case go-case wait-case now-case who-case]) ~
13797+ =/ command-result=(unit itype) (template-apply u.command ~[[%var 0]])
13798+ ?~ command-result ~
13799+ `[[%fn [%cell action [%fn u.error [%var 0]]] u.command-result] ~[0]]
13800+::
1378513801++ store-derived-schemes
1378613802 |= [prelude=ifile values=(list term) molds=(list term) state=itype action=itype]
1378713803 ^- (unit [state=ischeme action=ischeme])
1378813804 =/ prep=iprelude [prelude values molds]
1378913805 =/ ask=(unit ischeme) (request-compatible-ask prep)
1379013806 ?~ ask ~
13791− =/ poke=(unit ischeme) (store-compatible-poke prep)
13792− ?~ poke ~
1379313807 ?^ (itype-vars state) ~
1379413808 ?^ (itype-vars action) ~
1379513809 ?: |((itype-has-tag state) (itype-has-tag action)) ~
1379613810 =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
1379713811 ?~ result ~
1379813812 =/ request=ischeme [[%fn [%fn state [%var 0]] u.result] ~[0]]
13799− =/ constructor=ischeme [[%fn action typ.u.poke] ~]
13800− `[request constructor]
13813+ =/ constructor=(unit ischeme) (derived-poke-command-scheme prelude action)
13814+ ?~ constructor ~
13815+ `[request u.constructor]
1380113816::
1380213817++ program-subs-watch
1380313818 |= [d=def imports=ijimports graph=irequest-graph prelude=ifile]
@@ -14029,8 +14044,8 @@
1402914044 =? tail ?=(%face -.tail) body.tail
1403014045 typ(sample [%cell head tail])
1403114046::
14032−:: The builder erases the action from main. Recover it only from the direct
14033−:: local poke declaration and check both ordinary components invariantly.
14047+:: The builder erases the action from main. Recover it only from the local
14048+:: poke mold and check both ordinary components invariantly.
1403414049++ store-main-closed
1403514050 |= [parts=[init=term update=term] action=term env=ienv molds=imold-types prelude=(unit ifile)]
1403614051 ^- (unit ischeme)
@@ -14138,8 +14153,6 @@
1413814153 =/ ds=(list def) ?~(declared defs.mod defs.u.declared)
1413914154 =/ checking=module mod(defs ds)
1414014155 ?. (module-scope-valid checking prelude-values prelude-molds)
14141− ?: (pending-declared-poke at mod prelude-values prelude-molds)
14142− [%| [(crip "module kind or scope needs unsupported inference: {(spud at)}") ~]]
1414314156 [%| [(crip "module has conflicting names: {(spud at)}") ~]]
1414414157 =/ vals=(list term) (global-value-names ds)
1414514158 =/ js=jimports-detailed-result (resolve-jibb-imports-detailed imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
@@ -14376,8 +14389,6 @@
1437614389 =/ prelude-molds=(list term) molds.u.prepared
1437714390 =/ iface=(unit ifile) `iface.u.prepared
1437814391 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
14379− ?: (pending-declared-poke file p.parsed prelude-values prelude-molds)
14380− 'partial inference; module not checked\0amodule kind or scope needs unsupported inference'
1438114392 'partial inference; module not checked\0amodule has conflicting names'
1438214393 =/ js=jimports-result
1438314394 (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)