The signature for build-path/convention-type is:

(build-path/convention-type type
  base
  sub ...) → path-for-some-system?

type : (or/c 'unix 'windows)
base : (or/c path-string? path-for-some-system? 'up 'same)
sub : (or/c (and/c (or/c path-string? path-for-some-system?)
                            (not/c complete-path?))
                 (or/c 'up 'same))

I'm running on OSX 10.11.6 (El Capitan) and I don't understand the
results I'm getting:

-> (define p "C:\\foo\\bar")

-> (build-path p)
#<path:C:\foo\bar>  ; NB:  This is *not* a windows path, despite
looking like one

-> (build-path/convention-type 'windows 'up 'up)
#<windows-path:..\..>  ; NB: this is a Windows path

-> (build-path/convention-type 'windows p)
; build-path/convention-type: specified convention incompatible with string
;   path element
;   path element: "C:\\foo\\bar"
;   convention: 'windows
; [,bt for context]

-> (build-path/convention-type 'windows "/foo/bar")
(build-path/convention-type 'windows "/foo/bar")
; build-path/convention-type: specified convention incompatible with string
;   path element
;   path element: "/foo/bar"
;   convention: 'windows
; [,bt for context]

What gives?

Also, while we're at it, what do REL and RED stand for in the docs?
https://docs.racket-lang.org/reference/windowspaths.html

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to