[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 4.1.0.2-svn29aug2008 [3m].
Language: Module; memory limit: 128 megabytes.
 > key-event?
- : (Any -> Boolean : ((restrict KeyEvent)) ((remove KeyEvent)))
#<procedure:pred-cnt>
 > (key-event? 'left)
- : Boolean
#t
 > (: 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?

Thanks,
David


Posted on the users mailing list.