[racket] What am I doing wrong in this typed racket program?

From: Tony Garnock-Jones (tonyg at ccs.neu.edu)
Date: Tue Sep 18 17:44:44 EDT 2012

Hi all,

What could I be doing wrong here?

    #lang typed/racket
    (provide (struct-out foo))
    (struct: foo ([bar : (Setof Any)]))

Racket 5.3.0.24 complains about it ("racket problem.rkt"):

    set/c: contract violation
      expected: chaperone-contract?
      given: #<make-contract>
      context...:
       /Users/tonyg/src/racket-typed-matrix/problem.rkt: [running body]

The complaint vanishes if I comment out the provide, remove the bar
field, or change the bar field's type to Any/Integer/etc.

  Tony

Posted on the users mailing list.