[racket] Typed Racket procedure wrapping?

From: Joe Gibbs Politz (joe at cs.brown.edu)
Date: Tue Feb 5 16:06:11 EST 2013

Question about a TR regression in 5.3.2

This worked in 5.3.1:

typed.rkt
=======
#lang typed/racket

(provide wrap)

(define: (wrap (p : Procedure)) : Procedure
  (λ (_) p))


untyped.rkt
===========
#lang racket

(require "typed.rkt")
(define f (λ (n) n))

((wrap f) 5) ;; returns f itself; f is eq? to ((wrap f) 5)


In 5.3.2, when running untyped.rkt, I get:

#<case-lambda-procedure>: arity mismatch;
 the expected number of arguments does not match the given number
  given: 1
  arguments...:
   5

It doesn't tell me how many arguments it actually expects... but if I just
apply

((wrap f))

It says:

~/scratch/typed.rkt:6:2: arity mismatch;
 the expected number of arguments does not match the given number
  expected: 1
  given: 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130205/a92ed506/attachment.html>

Posted on the users mailing list.