[plt-scheme] Typed Scheme issues

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Wed Mar 25 07:32:43 EDT 2009

Hi all,

I have been messing around a lot with typed scheme and besides the
issues I have reported before here are some more. Either they are
bugs, or I am just not designing the system the correct way. Either
way I appreciate suggestions / workarounds [v. 4.1.5]

1. remove-duplicates not available:
#lang typed-scheme

(require scheme/list)


fails with:  typecheck: unbound identifier remove-duplicates in:

2. make-hasheq generates error
I have the following functions and structure for an environment that
maps Symbols to Integers:
#lang typed-scheme

(define-struct: Environment
  ((parent : (Option Environment))
   (bindings : (HashTable Symbol Integer)))

(: make-empty-env (case-lambda [-> Environment]
                               [Environment -> Environment]))
(define make-empty-env
  (case-lambda: [() (make-Environment #f (make-hasheq))]
                [((parent : Environment)) (make-Environment parent

I get twice:
typecheck: Could not infer types for applying polymorphic function make-hasheq
 in: (make-hasheq)

Any workaround for these? Are they bugs or am I doing something wrong?

Paulo Jorge Matos - pocmatos at gmail.com
Webpage: http://www.personal.soton.ac.uk/pocm

Posted on the users mailing list.