dprint: arms calling other arms dont steal doccord

i thought this would be a neat feature but ted called it too clever and
probably not what you really want. this code is atrocious though and
needs some serious cleanup
This commit is contained in:
drbeefsupreme 2022-06-08 15:39:40 -04:00
parent 6e02e35862
commit 0972c85e91

View File

@ -316,12 +316,25 @@
?~ doc-one ?~ doc-one
~? > debug %doc-one-empty ~? > debug %doc-one-empty
~ :: no need to look for a second doc if there is no first one ~ :: no need to look for a second doc if there is no first one
?: =(~ links.u.doc-one)
:: doc-one is a product-doc
[~ [~ `crib.u.doc-one]]
?: !=([%funk name] -.links.u.doc-one)
:: link on doc-one doesnt match arm name, so that means its calling a
:: different arm and trying to use its docs. don't let it
~
:: technically doc-two doesn't need to be a help, i could just grab the what :: technically doc-two doesn't need to be a help, i could just grab the what
:: directly since we aren't testing it to see if its an arm-doc, but it makes :: directly since we aren't testing it to see if its an arm-doc, but it makes
:: the code more confusing to use a different structure. :: the code more confusing to use a different structure.
~? > debug :- %doc-one doc-one
=/ doc-two=(unit help) =/ doc-two=(unit help)
?> ?=([%hint *] sut) ?+ sut ~
(help-from-hint q.sut) [%hint *]
(help-from-hint p.p.sut)
[%hold *]
~? > debug %doc-two-hold
~
==
?~ doc-two ?~ doc-two
~? > debug %doc-two-empty ~? > debug %doc-two-empty
?~ links.u.doc-one ?~ links.u.doc-one
@ -333,7 +346,7 @@
~? > debug %link-match ~? > debug %link-match
[~ [`crib.u.doc-one ~]] [~ [`crib.u.doc-one ~]]
~? > debug %link-doesnt-match-arm ~? > debug %link-doesnt-match-arm
:: this shouldn't happen at this point in time :: this can happen if +bar calls +foo which has doccords
[~ [`crib.u.doc-one ~]] [~ [`crib.u.doc-one ~]]
:: doc-two is non-empty. make sure that doc-one is an arm-doc :: doc-two is non-empty. make sure that doc-one is an arm-doc
?~ links.u.doc-one ?~ links.u.doc-one