[racket] function equality with contracts

From: Eric Tanter (etanter at dcc.uchile.cl)
Date: Mon Jan 24 16:35:49 EST 2011

Great, that's a much happier reply than your previous one, indeed :-)

Thanks!!

-- Éric


On Jan 24, 2011, at 6:33 PM, Robby Findler wrote:

> Ugh. Please excuse my previous reply. I completely forgot about a
> change to the contract system (that I helped with a little bit but
> that Stevie and Matthew did most of the work for).
> 
> If you change eqv? in your code to equal?, you should get #t back.
> You'll need the pre-release version, tho. This was no in 5.0.2.
> 
> Sorry,
> Robby
> 
> On Mon, Jan 24, 2011 at 3:15 PM, Eric Tanter <etanter at dcc.uchile.cl> wrote:
>> 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
>>> 
>>> 
>> 
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/users
> 



Posted on the users mailing list.