[racket-dev] seeing compile-time error for Whalesong on HEAD

From: Danny Yoo (dyoo at hashcollision.org)
Date: Mon Apr 29 20:26:42 EDT 2013

Ah, ok, I've reduced the test case to something more managable: two
files, promise.rkt and test-promise.rkt, with the following content:


;; promise.rkt
#lang typed/racket/base
(require (for-syntax racket/base))
(provide MyPromise)
(define-struct: (a) MyPromise ([thunk : (-> a)])
  #:mutable)


;; test-promise.rkt
#lang racket/base
(require "promise.rkt")


The untyped code just requires the typed module, forcing the type
contract code to generate.  It looks like #:mutable is necessary here:
if I take that out of the type, then I don't see the error.

Posted on the dev mailing list.