Fix prettyprinting of invalid curries and tuples
parent
600ae32e29
commit
7fa7ed962f
|
@ -182,9 +182,20 @@ M: tuple pprint-narrow? drop t ;
|
|||
>pprint-sequence pprint-elements
|
||||
block> r> pprint-word block>
|
||||
] check-recursion ;
|
||||
|
||||
|
||||
M: object pprint* pprint-object ;
|
||||
|
||||
M: curry pprint*
|
||||
dup curry-quot callable? [ pprint-object ] [
|
||||
"( invalid curry )" swap present-text
|
||||
] if ;
|
||||
|
||||
M: compose pprint*
|
||||
dup compose-first over compose-second [ callable? ] both?
|
||||
[ pprint-object ] [
|
||||
"( invalid compose )" swap present-text
|
||||
] if ;
|
||||
|
||||
M: wrapper pprint*
|
||||
dup wrapped word? [
|
||||
<block \ \ pprint-word wrapped pprint-word block>
|
||||
|
|
|
@ -321,3 +321,7 @@ unit-test
|
|||
[ [ 2 . ] ] [
|
||||
[ 2 \ break (step-into) . ] (remove-breakpoints)
|
||||
] unit-test
|
||||
|
||||
[ ] [ 1 \ + curry unparse drop ] unit-test
|
||||
|
||||
[ ] [ 1 \ + compose unparse drop ] unit-test
|
||||
|
|
Loading…
Reference in New Issue