From 7f3ecd6e09c9d1cda47581de22eb4fab09aaa775 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Tue, 25 Jun 2013 12:33:15 -0400 Subject: [PATCH] Fix types for new `racket/file` keyword arguments. --- .../typed-racket-lib/typed-racket/base-env/base-env.rkt | 8 ++++---- .../typed-racket/base-env/base-special-env.rkt | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt index 76579e12e0..b52eb4e93e 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt @@ -765,11 +765,11 @@ ;Section 14.2.5 ;racket/file -[copy-directory/files (-> -Pathlike -Pathlike -Void)] -[delete-directory/files (-> -Pathlike -Void)] +[copy-directory/files (->key -Pathlike -Pathlike #:keep-modify-seconds? Univ #f -Void)] +[delete-directory/files (->key -Pathlike #:must-exist? Univ #f -Void)] -[find-files (->opt (-> -Path Univ) [(-opt -Pathlike)] (-lst -Path))] -[pathlist-closure (-> (-lst -Pathlike) (-lst -Path))] +[find-files (->optkey (-> -Path Univ) [(-opt -Pathlike)] #:follow-links? Univ #f (-lst -Path))] +[pathlist-closure (->key (-lst -Pathlike) #:follow-links? Univ #f (-lst -Path))] [fold-files (-poly diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt index 9ed1915d76..5240a90da5 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt @@ -1,6 +1,7 @@ #lang racket/base -;; this file cheats to define types for unexported variables that are expanded into by Racket macros +;; this file cheats to define types for unexported variables +;; that are expanded into by Racket macros (require "../utils/utils.rkt" racket/promise @@ -12,7 +13,8 @@ (env init-envs) (except-in (rep filter-rep object-rep type-rep) make-arr) (rename-in (types abbrev numeric-tower union) [make-arr* make-arr]) - (for-syntax racket/base syntax/parse (only-in racket/syntax syntax-local-eval))) + (for-syntax racket/base syntax/parse + (only-in racket/syntax syntax-local-eval))) (define (make-template-identifier what where) (let ([name (module-path-index-resolve (module-path-index-join where #f))]) @@ -146,7 +148,8 @@ (-> (-Syntax Univ) (Un))] ;; from the expansion of `make-temp-file` [(make-template-identifier 'make-temporary-file/proc 'racket/file) - (->opt [-String (Un -Pathlike (-val 'directory) (-val #f)) (-opt -Pathlike)] -Path)] + (->opt [-String (Un -Pathlike (-val 'directory) (-val #f)) (-opt -Pathlike)] + -Path)] ;; from the (lifted) portion of the expansion of keyword lambdas [(make-template-identifier 'make-required 'racket/private/kw) (-> Univ Univ Univ Univ Univ)]