[racket] function equality with contracts
Sorry, I don't get it. I'm not asking from a theoretical point of view, but from a very practical, racket point of view, of two functions being eqv.
Concretely:
;; tmp.rkt
#lang racket
(define f (λ (x) x))
(define ((pred f1) f2) (eqv? f1 f2))
(define eq-f (pred f))
(provide/contract [f (-> integer? integer?)])
(provide eq-f)
;;tmp2.rkt
#lang racket
(require "tmp.rkt")
(eq-f f)
-> is there a way to get that last call return #t?
-- Éric
On Jan 24, 2011, at 5:56 PM, Matthias Felleisen wrote:
> On Jan 24, 2011, at 2:41 PM, Eric Tanter wrote:
>> Hi all,
>>
>> From the DLS'10 paper of Stephen and Matthias, it says "the class system must determine that two classes are equal modulo contract wrapping".
>>
>> I'm interested in that exact property but for functions. Ie. how do we determine if two functions are "equal" modulo contract wrapping?
>
> eta-expansion? proxy-lambda?
>
>
>>
>> Thanks!
>>
>> -- Éric
>> _________________________________________________
>> For list-related administrative tasks:
>> http://lists.racket-lang.org/listinfo/users
>
>