[racket-dev] Release Announcement for v5.0.1 -- final version

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Aug 2 08:22:52 EDT 2010

Just to make sure: 

  Signatures are included because they were merged into the trunk before the branch was done. 

For example, 

(define int (signature Real))
(: x int)
(define x 3)

works in Beginner. It turns out however that even the German docs are broken. I should have explored more when Mike merged this in. Then again, I doubt we will have many Americans reading these docs. 

;; --- 

Pragmatics: While I am sure one can get very close to define-datatype, the docs don't suggest it's easy. Here is how you equip structures with signatures: 

(define-struct S (x y))

(define int (signature Integer))

(: make-S (int int -> S))
(: S-x (S -> int))
(: S-y (S -> int))

And that seems to be the simplest way. I doubt Shriram will be happy with this. What am I overlooking, Mike? 

-- Matthias

Posted on the dev mailing list.