[plt-scheme] check-expect and Typed Scheme

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Wed Sep 3 16:12:13 EDT 2008

Matthias Felleisen wrote:
> No, not yet.

OK.  On a related note... this doesn't behave as I expected.

#lang typed-scheme
(require/opaque-type KeyEvent key-event? htdp/world)

Welcome to DrScheme, version [3m].
Language: Module; memory limit: 128 megabytes.
 > key-event?
- : (Any -> Boolean : ((restrict KeyEvent)) ((remove KeyEvent)))
 > (key-event? 'left)
- : Boolean
 > (: k KeyEvent)
 > (define k 'left)
typecheck: Expected KeyEvent, but got 'left in: (quote left)

Is this a bug in Typed Scheme, or am I doing something wrong?


Posted on the users mailing list.