Add more predefined types

This commit is contained in:
Asumu Takikawa 2016-06-21 15:10:24 -04:00
parent 0730c48000
commit c5ec933bb8
2 changed files with 5 additions and 5 deletions

View File

@ -273,7 +273,6 @@
(list ,@(convert augments))
,(and init-rest (type->sexp init-rest))))
class-type]
[(ClassTop:) `(make-ClassTop)]
[(Instance: ty) `(make-Instance ,(type->sexp ty))]
[(Signature: name extends mapping)
(define (serialize-mapping m)
@ -286,7 +285,6 @@
`(make-Signature (quote-syntax ,name)
,serialized-extends
(list ,@(serialize-mapping mapping)))]
[(UnitTop:) `(make-UnitTop)]
[(Unit: imports exports init-depends result)
`(make-Unit (list ,@(map type->sexp imports))
(list ,@(map type->sexp exports))
@ -354,10 +352,9 @@
(define (path-elem->sexp pe)
(match pe
[(In-Predefined-Table: id) id]
;; CarPE, CdrPE, SyntaxPE, ForcePE are in the table
;; CarPE, CdrPE, SyntaxPE, ForcePE, FieldPE are in the table
[(StructPE: ty idx)
`(make-StructPE ,(type->sexp ty) ,idx)]
[(FieldPE:) `(make-FieldPE)]))
`(make-StructPE ,(type->sexp ty) ,idx)]))
(define (bound-in-this-module id)
(let ([binding (identifier-binding id)])

View File

@ -198,6 +198,8 @@
(define/decl -Thread-CellTop (make-ThreadCellTop))
(define/decl -Prompt-TagTop (make-Prompt-TagTop))
(define/decl -Continuation-Mark-KeyTop (make-Continuation-Mark-KeyTop))
(define/decl -ClassTop (make-ClassTop))
(define/decl -UnitTop (make-UnitTop))
(define/decl -Port (Un -Output-Port -Input-Port))
(define/decl -SomeSystemPath (Un -Path -OtherSystemPath))
(define/decl -Pathlike (Un -String -Path))
@ -251,6 +253,7 @@
(define/decl -cdr (make-CdrPE))
(define/decl -syntax-e (make-SyntaxPE))
(define/decl -force (make-ForcePE))
(define/decl -field (make-FieldPE))
;; Type alias names
(define (-struct-name name)