[racket] Typed Racket - Recursive Types (Little help please)
#lang typed/racket/base
;; Inputs
(define-type (Stream D) (U (Datum D) 'Nothing 'EOS))
(struct: (D) Datum ([iota : D]))
;; Iteratee
(define-type (Iteratee D A) (U (Done D A) (Continuation D A)))
(struct: (D A) Done ([accum : A] [stream : (Stream D)]))
(struct: (D A) Continuation ([resume : ((Stream D) -> (Iteratee D A))]))
1. How can I get the recursive nature of Iteratee and Continuation to type
check?
2. Ideally, but not necessary, like to define Continuation as a
define-struct/exec:
Thanks,
Ray
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120719/77fa0ce3/attachment.html>