Skip to content

Commit f0eba8f

Browse files
committed
Handle keyword variants of file operations.
1 parent b6d7fd5 commit f0eba8f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

typed-racket-lib/typed-racket/base-env/base-env.rkt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,7 +2877,11 @@
28772877
[file-or-directory-identity (->opt -Pathlike [Univ] -PosInt)]
28782878
[file-size (-> -Pathlike -Nat)]
28792879

2880-
[copy-file (-> -Pathlike -Pathlike -Void)]
2880+
[copy-file (->optkey -Pathlike -Pathlike [(-lst -Symbol)]
2881+
#:exists-ok? Univ #f
2882+
#:permissions Univ #f
2883+
#:replace-permissions Univ #f
2884+
-Void)]
28812885
[make-file-or-directory-link (-> -Pathlike -Pathlike -Void)]
28822886

28832887
;; Section 15.2.3
@@ -2922,7 +2926,6 @@
29222926

29232927
[make-directory* (-> -Pathlike -Void)]
29242928
[make-parent-directory* (-> -Pathlike -Void)]
2925-
#;[make-temporary-file (->opt [-String (Un -Pathlike (-val 'directory) (-val #f)) (-opt -Pathlike)] -Path)]
29262929

29272930
[put-preferences (->opt (-lst -Symbol) (-lst Univ) [(-> -Path Univ) (-opt -Pathlike)] -Void)]
29282931
[preferences-lock-file-mode (-> (one-of/c 'exists 'file-lock))]

typed-racket-lib/typed-racket/base-env/base-special-env.rkt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,13 @@
331331
;; ... or a Guide is ...
332332
[(make-template-identifier 'check-same-length 'racket/private/template)
333333
(-> (Un (-val #f) (-Syntax Univ)) (Un (-val #f) (-Syntax Univ)) (-lst Univ) -Void)]
334-
;; from the expansion of `make-temp-file`
335-
[(make-template-identifier 'make-temporary-file/proc 'racket/file)
334+
;; from the expansion of `make-temporary-file`
335+
[(make-template-identifier 'make-temporary-file 'racket/file)
336+
(->optkey [-String (Un -Pathlike (-val 'directory) (-val #f)) (-opt -Pathlike)]
337+
#:copy-from (Un -Pathlike (-val 'directory) (-val #f)) #f
338+
#:base-dir (-opt -Pathlike) #f
339+
-Path)
340+
#;
336341
(->opt [-String (Un -Pathlike (-val 'directory) (-val #f)) (-opt -Pathlike)]
337342
-Path)]
338343
;; from the (lifted) portion of the expansion of keyword lambdas

0 commit comments

Comments
 (0)