[racket] opt-lambda: does not type check when defaults are provided

From: Jeremiah Willcock (jewillco at osl.iu.edu)
Date: Sat Sep 24 15:02:44 EDT 2011

The following program:

#lang typed/racket
(opt-lambda: ((a : Symbol 'foo)) a)

does not type check with the current Git version of Racket, producing the 
following error:

opt-bug.rkt:2:0: Type Checker: Error in macro expansion -- insufficient 
type information to typecheck. please add more type annotations in: 
(opt-lambda: ((a : Symbol (quote foo))) a)

It would seem that the opt-lambda: expression should have a well-defined 
type.

On a similar note, the untyped syntax (lambda ((a 5)) ...) for defaults 
does not work in Typed Racket.

Is there something I'm doing incorrectly, or is this a bug?  Thank you for 
your help.

-- Jeremiah Willcock


Posted on the users mailing list.