Make relative directory argument for resolve-module-path-* have a default to #f

The resolve-module-path-* functions effectively already had a default argument,
which is #f, this allows you to just directly call it with one argument.
This commit is contained in:
Leif Andersen 2016-05-19 19:17:10 -04:00
parent 5e43c190be
commit c3313b13dc
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@
@defmodule[syntax/modresolve]
@defproc[(resolve-module-path [module-path-v module-path?]
[rel-to-path-v (or/c path-string? (-> any) false/c)])
[rel-to-path-v (or/c #f path-string? (-> any)) #f])
(or/c path? symbol?
(cons/c 'submod (cons/c (or/c path? symbol?) (listof symbol?))))]{
@ -16,7 +16,7 @@ be for a file), to the directory result of calling the thunk if it is
a thunk, or to the current directory otherwise.}
@defproc[(resolve-module-path-index [module-path-index module-path-index?]
[rel-to-path-v (or/c path-string? (-> any) false/c)])
[rel-to-path-v (or/c #f path-string? (-> any)) #f])
(or/c path? symbol?
(cons/c 'submod (cons/c (or/c path? symbol?) (listof symbol?))))]{

View File

@ -106,7 +106,7 @@
(if (equal? (cadr s) "..") (cdr s) (cddr s))))]
[else #f]))
(define (resolve-module-path-index mpi relto)
(define (resolve-module-path-index mpi [relto #f])
;; relto must be a complete path
(let-values ([(path base) (module-path-index-split mpi)])
(if path
@ -118,7 +118,7 @@
(append submod sm)
(or sm submod)))))))
(define (resolve-possible-module-path-index base relto)
(define (resolve-possible-module-path-index base [relto #f])
(cond [(module-path-index? base)
(resolve-module-path-index base relto)]
[(and (resolved-module-path? base)