-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype-check-Cvecof.rkt
37 lines (30 loc) · 998 Bytes
/
type-check-Cvecof.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#lang racket
(require "utilities.rkt")
(require "type-check-Cvar.rkt")
(require "type-check-Cif.rkt")
(require "type-check-Cvec.rkt")
(require "type-check-Cfun.rkt")
(require "type-check-Cany.rkt")
(require "type-check-Cwhile.rkt")
(require "type-check-Lvecof.rkt")
(provide type-check-Cvecof type-check-Cvecof-mixin type-check-Cvecof-class)
(define (type-check-Cvecof-mixin super-class)
(class super-class
(super-new)
(define/override (free-vars-exp e)
(define (recur e) (send this free-vars-exp e))
(match e
[(AllocateHom e-len ty) (recur e-len)]
[else (super free-vars-exp e)]))
))
(define type-check-Cvecof-class
(type-check-Cvecof-mixin
(type-check-Cwhile-mixin
(type-check-Cany-mixin
(type-check-Cfun-mixin
(type-check-Cvec-mixin
(type-check-Cif-mixin
(type-check-Cvar-mixin
type-check-Lvecof-class))))))))
(define (type-check-Cvecof p)
(send (new type-check-Cvecof-class) type-check-program p))