Add one-sided contract for ClassTop types

Closes PR 14486

original commit: 8b245240ea41630905b5a66eb76485a15c113b7a
This commit is contained in:
Asumu Takikawa 2014-05-18 17:02:01 -04:00
parent 094678c666
commit dc30b8be30
3 changed files with 6 additions and 1 deletions

View File

@ -335,6 +335,7 @@
[(ThreadCellTop:) (only-untyped thread-cell?/sc)]
[(Prompt-TagTop:) (only-untyped prompt-tag?/sc)]
[(Continuation-Mark-KeyTop:) (only-untyped continuation-mark-key?/sc)]
[(ClassTop:) (only-untyped class?/sc)]
;; TODO Figure out how this should work
;[(StructTop: s) (struct-top/sc s)]

View File

@ -5,7 +5,8 @@
;; Ex: (listof/sc any/sc) => list?/sc
(require "simple.rkt" "structural.rkt"
(for-template racket/base racket/list racket/set racket/promise racket/mpair))
(for-template racket/base racket/list racket/set racket/promise racket/mpair
racket/class))
(provide (all-defined-out))
(define identifier?/sc (flat/sc #'identifier?))
@ -30,3 +31,5 @@
(define thread-cell?/sc (flat/sc #'thread-cell?))
(define prompt-tag?/sc (flat/sc #'continuation-prompt-tag?))
(define continuation-mark-key?/sc (flat/sc #'continuation-mark-key?))
(define class?/sc (flat/sc #'class?))

View File

@ -8,6 +8,7 @@
(make-predicate Thread-CellTop)
(make-predicate Prompt-TagTop)
(make-predicate Continuation-Mark-KeyTop)
(make-predicate ClassTop)