mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 11:09:30 +03:00
Fixed formatting again
This commit is contained in:
parent
8b208451bd
commit
529ead91a3
@ -13,13 +13,13 @@
|
|||||||
-.closed-patch
|
-.closed-patch
|
||||||
++ apply
|
++ apply
|
||||||
|= [patch=_id noun=*]
|
|= [patch=_id noun=*]
|
||||||
?- -.patch
|
?- -.patch
|
||||||
%diff
|
%diff
|
||||||
=/ var-map (del del.patch noun)
|
=/ var-map (del del.patch noun)
|
||||||
(ins ins.patch var-map)
|
(ins ins.patch var-map)
|
||||||
%cell
|
%cell
|
||||||
?> ?=(^ noun)
|
?> ?=(^ noun)
|
||||||
[$(patch lhs.patch, noun -.noun) $(patch rhs.patch, noun +.noun)]
|
[$(patch lhs.patch, noun -.noun) $(patch rhs.patch, noun +.noun)]
|
||||||
==
|
==
|
||||||
++ id
|
++ id
|
||||||
^- patch
|
^- patch
|
||||||
@ -65,8 +65,7 @@
|
|||||||
^- (set @)
|
^- (set @)
|
||||||
?- -.diff
|
?- -.diff
|
||||||
%hole (silt ~[+.diff])
|
%hole (silt ~[+.diff])
|
||||||
%cell
|
%cell (~(uni in $(diff lhs.diff)) $(diff rhs.diff))
|
||||||
(~(uni in $(diff lhs.diff)) $(diff rhs.diff))
|
|
||||||
%ignore empty-set
|
%ignore empty-set
|
||||||
==
|
==
|
||||||
++ find-final-ins-holes
|
++ find-final-ins-holes
|
||||||
@ -75,8 +74,7 @@
|
|||||||
^- (set @)
|
^- (set @)
|
||||||
?- -.diff
|
?- -.diff
|
||||||
%hole (silt ~[+.diff])
|
%hole (silt ~[+.diff])
|
||||||
%cell
|
%cell (~(uni in $(diff lhs.diff)) $(diff rhs.diff))
|
||||||
(~(uni in $(diff lhs.diff)) $(diff rhs.diff))
|
|
||||||
%atom empty-set
|
%atom empty-set
|
||||||
==
|
==
|
||||||
++ find-ins-holes
|
++ find-ins-holes
|
||||||
@ -85,8 +83,7 @@
|
|||||||
^- (set @)
|
^- (set @)
|
||||||
?- -.diff
|
?- -.diff
|
||||||
%hole (silt ~[+<.diff])
|
%hole (silt ~[+<.diff])
|
||||||
%cell
|
%cell (~(uni in $(diff lhs.diff)) $(diff rhs.diff))
|
||||||
(~(uni in $(diff lhs.diff)) $(diff rhs.diff))
|
|
||||||
%atom empty-set
|
%atom empty-set
|
||||||
==
|
==
|
||||||
++ filter-del-holes
|
++ filter-del-holes
|
||||||
@ -102,53 +99,56 @@
|
|||||||
++ filter-ins-holes
|
++ filter-ins-holes
|
||||||
|= [allowed-holes=(set @) diff=ins-diff]
|
|= [allowed-holes=(set @) diff=ins-diff]
|
||||||
^- final-ins-diff
|
^- final-ins-diff
|
||||||
?- -.diff
|
?- -.diff
|
||||||
%hole
|
%hole
|
||||||
?: (~(has in allowed-holes) +<.diff) [%hole +<.diff]
|
?: (~(has in allowed-holes) +<.diff) [%hole +<.diff]
|
||||||
(insify-noun original:diff)
|
(insify-noun original:diff)
|
||||||
%cell [%cell $(diff +<.diff) $(diff +>.diff)]
|
%cell
|
||||||
%atom diff
|
[%cell $(diff +<.diff) $(diff +>.diff)]
|
||||||
|
%atom
|
||||||
|
diff
|
||||||
==
|
==
|
||||||
++ gcp
|
++ gcp
|
||||||
|= diff=diff
|
|= diff=diff
|
||||||
^- patch
|
^- patch
|
||||||
?- -.ins.diff
|
?- -.ins.diff
|
||||||
%atom
|
%atom
|
||||||
[%diff diff]
|
[%diff diff]
|
||||||
%cell
|
%cell
|
||||||
?: ?=(%cell -.del.diff)
|
?: ?=(%cell -.del.diff)
|
||||||
[%cell $(diff [+<.del.diff +<.ins.diff]) $(diff [+>.del.diff +>.ins.diff])]
|
[%cell $(diff [+<.del.diff +<.ins.diff]) $(diff [+>.del.diff +>.ins.diff])]
|
||||||
[%diff diff]
|
[%diff diff]
|
||||||
%hole
|
%hole
|
||||||
[%diff diff]
|
[%diff diff]
|
||||||
==
|
==
|
||||||
++ closure
|
++ closure
|
||||||
|= =patch
|
|= =patch
|
||||||
^- [^patch ?]
|
^- [^patch ?]
|
||||||
?- -.patch
|
?- -.patch
|
||||||
%diff
|
%diff
|
||||||
=/ del-holes (find-del-holes del:patch)
|
=/ del-holes (find-del-holes del:patch)
|
||||||
=/ ins-holes (find-final-ins-holes ins:patch)
|
=/ ins-holes (find-final-ins-holes ins:patch)
|
||||||
=/ difference (~(dif in ins-holes) del-holes)
|
=/ difference (~(dif in ins-holes) del-holes)
|
||||||
[patch =(difference empty-set)]
|
[patch =(difference empty-set)]
|
||||||
%cell
|
%cell
|
||||||
=/ lhs $(patch lhs:patch)
|
=/ lhs $(patch lhs:patch)
|
||||||
=/ rhs $(patch rhs:patch)
|
=/ rhs $(patch rhs:patch)
|
||||||
?: ?&(+.lhs +.rhs) [[%cell -.lhs -.rhs] &]
|
?: ?&(+.lhs +.rhs) [[%cell -.lhs -.rhs] &]
|
||||||
$(patch (pull-diff [%cell -.lhs -.rhs]))
|
$(patch (pull-diff [%cell -.lhs -.rhs]))
|
||||||
==
|
==
|
||||||
++ pull-diff
|
++ pull-diff
|
||||||
|= =patch
|
|= =patch
|
||||||
^- [%diff del=del-diff ins=final-ins-diff]
|
^- [%diff del=del-diff ins=final-ins-diff]
|
||||||
?- -.patch
|
?- -.patch
|
||||||
%diff patch
|
%diff
|
||||||
%cell
|
patch
|
||||||
=/ pulled-lhs $(patch lhs:patch)
|
%cell
|
||||||
=/ pulled-rhs $(patch rhs:patch)
|
=/ pulled-lhs $(patch lhs:patch)
|
||||||
:+
|
=/ pulled-rhs $(patch rhs:patch)
|
||||||
%diff
|
:+
|
||||||
[%cell del:pulled-lhs del:pulled-rhs]
|
%diff
|
||||||
[%cell ins:pulled-lhs ins:pulled-rhs]
|
[%cell del:pulled-lhs del:pulled-rhs]
|
||||||
|
[%cell ins:pulled-lhs ins:pulled-rhs]
|
||||||
==
|
==
|
||||||
++ is-subtree
|
++ is-subtree
|
||||||
|= [tree=* subtree=*]
|
|= [tree=* subtree=*]
|
||||||
|
Loading…
Reference in New Issue
Block a user