[plt-scheme] provide/contract and inferred-name

From: Doug Orleans (dougorleans at gmail.com)
Date: Mon Apr 14 20:16:31 EDT 2008

The following module:

  #lang scheme

  (define foo1 (let ((bar1 (lambda (x) 0))) bar1))
  (provide foo1)

  (define foo2 (let ((bar2 (lambda (x) 0))) bar2))
  (provide/contract (foo2 (-> string? number?)))

produces the following behavior:

  > foo1
  #<procedure:bar1>
  > foo2
  #<procedure:foo2>

It seems that provide/contract overwrites the inferred name.  Is there
a way around this?

--dougorleans at gmail.com


Posted on the users mailing list.