From e4fad4f7b1dea80fee7ae694e6d29886640eff02 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Fri, 10 Sep 2021 14:37:17 +1000 Subject: [PATCH] various: fix packaging --- pkg/garden-dev/lib/mip.hoon | 55 ++++++++++++++++++++++++++++++++++++ pkg/garden/lib/mip.hoon | 56 +------------------------------------ pkg/landscape/lib/mip.hoon | 1 + 3 files changed, 57 insertions(+), 55 deletions(-) create mode 100644 pkg/garden-dev/lib/mip.hoon mode change 100644 => 120000 pkg/garden/lib/mip.hoon create mode 120000 pkg/landscape/lib/mip.hoon diff --git a/pkg/garden-dev/lib/mip.hoon b/pkg/garden-dev/lib/mip.hoon new file mode 100644 index 000000000..322a4c85f --- /dev/null +++ b/pkg/garden-dev/lib/mip.hoon @@ -0,0 +1,55 @@ +|% +++ mip :: map of maps + |$ [kex key value] + (map kex (map key value)) +:: +++ bi :: mip engine + =| a=(map * (map)) + |@ + ++ del + |* [b=* c=*] + =+ d=(~(gut by a) b ~) + =+ e=(~(del by d) c) + ?~ e + (~(del by a) b) + (~(put by a) b e) + :: + ++ get + |* [b=* c=*] + => .(b `_?>(?=(^ a) p.n.a)`b, c `_?>(?=(^ a) ?>(?=(^ q.n.a) p.n.q.n.a))`c) + ^- (unit _?>(?=(^ a) ?>(?=(^ q.n.a) q.n.q.n.a))) + (~(get by (~(gut by a) b ~)) c) + :: + ++ got + |* [b=* c=*] + (need (get b c)) + :: + ++ gut + |* [b=* c=* d=*] + (~(gut by (~(gut by a) b ~)) c d) + :: + ++ has + |* [b=* c=*] + !=(~ (get b c)) + :: + ++ key + |* b=* + ~(key by (~(gut by a) b ~)) + :: + ++ put + |* [b=* c=* d=*] + %+ ~(put by a) b + %. [c d] + %~ put by + (~(gut by a) b ~) + :: + ++ tap + ::NOTE naive turn-based implementation find-errors ): + =< $ + =+ b=`_?>(?=(^ a) *(list [x=_p.n.a _?>(?=(^ q.n.a) [y=p v=q]:n.q.n.a)]))`~ + |. ^+ b + ?~ a + b + $(a r.a, b (welp (turn ~(tap by q.n.a) (lead p.n.a)) $(a l.a))) + -- +-- diff --git a/pkg/garden/lib/mip.hoon b/pkg/garden/lib/mip.hoon deleted file mode 100644 index 322a4c85f..000000000 --- a/pkg/garden/lib/mip.hoon +++ /dev/null @@ -1,55 +0,0 @@ -|% -++ mip :: map of maps - |$ [kex key value] - (map kex (map key value)) -:: -++ bi :: mip engine - =| a=(map * (map)) - |@ - ++ del - |* [b=* c=*] - =+ d=(~(gut by a) b ~) - =+ e=(~(del by d) c) - ?~ e - (~(del by a) b) - (~(put by a) b e) - :: - ++ get - |* [b=* c=*] - => .(b `_?>(?=(^ a) p.n.a)`b, c `_?>(?=(^ a) ?>(?=(^ q.n.a) p.n.q.n.a))`c) - ^- (unit _?>(?=(^ a) ?>(?=(^ q.n.a) q.n.q.n.a))) - (~(get by (~(gut by a) b ~)) c) - :: - ++ got - |* [b=* c=*] - (need (get b c)) - :: - ++ gut - |* [b=* c=* d=*] - (~(gut by (~(gut by a) b ~)) c d) - :: - ++ has - |* [b=* c=*] - !=(~ (get b c)) - :: - ++ key - |* b=* - ~(key by (~(gut by a) b ~)) - :: - ++ put - |* [b=* c=* d=*] - %+ ~(put by a) b - %. [c d] - %~ put by - (~(gut by a) b ~) - :: - ++ tap - ::NOTE naive turn-based implementation find-errors ): - =< $ - =+ b=`_?>(?=(^ a) *(list [x=_p.n.a _?>(?=(^ q.n.a) [y=p v=q]:n.q.n.a)]))`~ - |. ^+ b - ?~ a - b - $(a r.a, b (welp (turn ~(tap by q.n.a) (lead p.n.a)) $(a l.a))) - -- --- diff --git a/pkg/garden/lib/mip.hoon b/pkg/garden/lib/mip.hoon new file mode 120000 index 000000000..47b46482a --- /dev/null +++ b/pkg/garden/lib/mip.hoon @@ -0,0 +1 @@ +../../garden-dev/lib/mip.hoon \ No newline at end of file diff --git a/pkg/landscape/lib/mip.hoon b/pkg/landscape/lib/mip.hoon new file mode 120000 index 000000000..47b46482a --- /dev/null +++ b/pkg/landscape/lib/mip.hoon @@ -0,0 +1 @@ +../../garden-dev/lib/mip.hoon \ No newline at end of file