
Adds the following: + dependent function Types + some existential object support when applying dependent functions + simplify linear arith support + add unsafe-require/typed/provide
9 lines
182 B
Racket
9 lines
182 B
Racket
#lang typed/racket/base
|
|
|
|
(struct: Foo ([fld : VectorTop]) #:transparent)
|
|
|
|
(: bar (Foo -> Index))
|
|
(define (bar p)
|
|
(define n (vector-length (Foo-fld p)))
|
|
(if (zero? n) 0 (- n 1)))
|