Make Path a subtype of Module-Path

Closes #20.
This commit is contained in:
Alexis King 2015-01-30 15:31:41 -08:00 committed by Sam Tobin-Hochstadt
parent 8c471bb2a3
commit 7122d93de8
2 changed files with 7 additions and 2 deletions

View File

@ -115,8 +115,9 @@
(define/decl -Pattern (Un -Bytes -Regexp -Byte-Regexp -String))
(define/decl -Keyword (make-Base 'Keyword #'keyword? keyword?))
(define/decl -Thread (make-Base 'Thread #'thread? thread?))
(define/decl -Path (make-Base 'Path #'path? path?))
(define/decl -Module-Path
(Un -Symbol -String
(Un -Symbol -String -Path
(-lst* (-val 'quote) -Symbol)
(-lst* (-val 'lib) -String)
(-lst* (-val 'file) -String)
@ -139,7 +140,6 @@
(conjoin compiled-expression? (negate compiled-module-expression?))))
(define/decl -Compiled-Expression (Un -Compiled-Module-Expression -Compiled-Non-Module-Expression))
(define/decl -Cont-Mark-Set (make-Base 'Continuation-Mark-Set #'continuation-mark-set? continuation-mark-set?))
(define/decl -Path (make-Base 'Path #'path? path?))
(define/decl -OtherSystemPath
(make-Base 'OtherSystemPath
#'(and/c path-for-some-system? (not/c path?))

View File

@ -1730,6 +1730,11 @@
#:ret (ret -Boolean -true-filter))
(tc-e (let: ((e : Compiled-Expression (compile #'(module + racket 2))))
(compiled-module-expression? e)) -Boolean)
;Dynamic Require
(tc-e (dynamic-require "module/path" #f) -Void)
(tc-e (dynamic-require 'module/path #f) -Void)
(tc-e (dynamic-require (string->path "module/path") #f) -Void)
;Impersonator Property
(tc-e (make-impersonator-property 'prop)