Below is typed scheme/path,<br>The typed version of normalize-path doesn't allow an optional argument.<br><br>; path.ss<br>; LGPL licensed<br><br>#lang typed-scheme<br><br>(define-type-alias Path/str (U Path String))<br>
(define-type-alias Path-string String)<br><br>(require/typed scheme/path<br> [explode-path (Path/str -> (Listof (U Path 'up 'same)))]<br> [find-relative-path (Path/str Path/str -> Path)]<br>
[simple-form-path (Path-string -> Path)]<br> [normalize-path (Path-string -> Path)] ; doesn't allow an optional argument<br> [filename-extension (Path/str -> (Option Bytes))]<br>
[file-name-from-path (Path/str -> (Option Path))]<br> [path-only (Path/str -> Path)]<br> [some-system-path->string (Path -> String)]<br> [string->some-system-path (String (U 'unix 'windows) -> Path)])<br>
<br>(provide find-relative-path<br> explode-path<br> simple-form-path<br> normalize-path<br> filename-extension<br> file-name-from-path<br> path-only<br> some-system-path->string<br>
string->some-system-path)<br>