Merge pull request #6872 from silnem2/dprint-fixes

lib/dprint: fix crashes with recursive types and =,
This commit is contained in:
Pyry Kovanen 2023-12-13 18:40:20 +02:00 committed by GitHub
commit 4576213e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,6 +77,7 @@
:: +hunt: door used for refining the type while searching for doccords
::
++ hunt
=| gil=(set type)
|_ [topics=(lest term) sut=type]
+* this .
::
@ -255,7 +256,8 @@
^- (unit item)
?> ?=([%face *] sut)
:: TODO: handle tune case
?> ?=(term p.sut)
?. ?=(term p.sut)
return-item:this(sut q.sut)
=* compiled-against return-item:this(sut q.sut)
`[%face (trip p.sut) *what compiled-against]
::
@ -318,7 +320,14 @@
[%face *] return-face
[%fork *] return-fork
[%hint *] return-hint
[%hold *] return-item:this(sut (~(play ut p.sut) q.sut))
[%hold *]
?: (~(has in gil) sut)
~
=< return-item
%= this
gil (~(put in gil) sut)
sut (~(play ut p.sut) q.sut)
==
==
::
++ return-hint-core