[plt-scheme] Case lambda in typed scheme

From: Sam TH (samth at ccs.neu.edu)
Date: Wed Mar 18 22:45:21 EDT 2009

On Wed, Mar 18, 2009 at 8:54 PM, Paulo J. Matos <pocmatos at gmail.com> wrote:
> While on an adventure to use typed-scheme I faced this issue:
> #lang typed-scheme
> (: foo (case-lambda [-> Symbol]
>                    [Symbol -> Symbol]))
> (define foo
>  (case-lambda [() 'foo]
>               [(s) s]))
> I can't see what might be wrong here. Still I get in 4.1.4:
> typecheck: untyped var: s in: s

Unfortunately, doing something intelligent here with `case-lambda' is
trickier, and that's why this doesn't work yet. Carl and Anthony's
solutions are right, but can you file this as a bug so I remember to
fix it in the future?

sam th
samth at ccs.neu.edu

Posted on the users mailing list.