modern: Fix arity for paths.

locals-and-roots
Doug Coleman 2016-06-27 20:23:28 -07:00
parent b7c82eed0c
commit 0ad2c54f55
2 changed files with 12 additions and 5 deletions

View File

@ -233,10 +233,6 @@ M: compound-sequence-literal write-literal
call
] if ; inline recursive
: rewrite-path ( path quot -- )
! dup print
$[ [ path>literals [ _ map-literals ] map ] [ ] bi write-modern-path ]
[ drop . ] recover ; inline
GENERIC: split-arity ( obj -- seq ) ;
@ -254,6 +250,17 @@ M: less-than-literal split-arity
M: object split-arity ;
: rewrite-path ( path quot -- )
! dup print
$[
[
path>literals
[ _ map-literals ] map
[ split-arity ] map
] [ ] bi write-modern-path ]
[ drop . ] recover ; inline
: rewrite-string ( string quot -- )
! dup print
[ string>literals ] dip $[ _ map-literals ] map