fix stack effect
parent
adf5cfda59
commit
4f40f10b88
|
@ -1,5 +1,5 @@
|
|||
USING: io.backend ;
|
||||
IN: io.files.unique.backend
|
||||
|
||||
HOOK: (make-unique-file) io-backend ( prefix suffix -- stream path )
|
||||
HOOK: (make-unique-file) io-backend ( path -- stream )
|
||||
HOOK: temporary-path io-backend ( -- path )
|
||||
|
|
|
@ -22,11 +22,12 @@ IN: io.files.unique
|
|||
PRIVATE>
|
||||
|
||||
: make-unique-file ( prefix suffix -- path stream )
|
||||
break
|
||||
temporary-path -rot
|
||||
[
|
||||
unique-length random-name swap 3append path+
|
||||
dup (make-unique-file)
|
||||
] 3curry unique-retries retry ;
|
||||
] 3curry unique-retries retry break ;
|
||||
|
||||
: with-unique-file ( quot -- path )
|
||||
>r f f make-unique-file r> rot [ with-stream ] dip ; inline
|
||||
|
|
Loading…
Reference in New Issue