[racket-dev] [plt] Push #26158: master branch updated

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sat Jan 26 12:06:47 EST 2013

Sam, this seems to be a subtle change in semantics concerning interoperability that we understood but didn't think important. For the sake of making it all "real", I think you should collect such examples. [I guess Robby and I understood this in the context of contracts and it could all have happened if we had slapped contracts on these borders.]







On Jan 26, 2013, at 11:48 AM, robby at racket-lang.org wrote:

> robby has updated `master' from aaf4a2e16d to 2d2b3bee2f.
>  http://git.racket-lang.org/plt/aaf4a2e16d..2d2b3bee2f
> 
> =====[ One Commit ]=====================================================
> Directory summary:
> 100.0% collects/drracket/private/
> 
> ~~~~~~~~~~
> 
> 2d2b3be Robby Findler <robby at racket-lang.org> 2013-01-26 10:45
> :
> | fix a bug in executable creation
> |
> | The code used eq? to check to see if a given language was in
> | an list of allowed-to-create-executables languages. But the
> | language object was passing thru TR and so eq? didn't hold and
> | thus the check was buggy.
> :
>  M collects/drracket/private/language-configuration.rkt | 8 +++++---
> 
> =====[ Overall Diff ]===================================================
> 
> collects/drracket/private/language-configuration.rkt
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/collects/drracket/private/language-configuration.rkt
> +++ NEW/collects/drracket/private/language-configuration.rkt
> @@ -85,9 +85,11 @@
>     (define languages null)
> 
>     (define languages-allowing-executable-creation '())
> -    (define (language-allows-executable-creation? lang)
> -      (and (memq lang languages-allowing-executable-creation)
> -           #t))
> +    (define (language-allows-executable-creation? candidate-lang)
> +      (define candidates-positions (send candidate-lang get-language-position))
> +      (for/or ([allowed-lang (in-list languages-allowing-executable-creation)])
> +        (equal? (send allowed-lang get-language-position)
> +                candidates-positions)))
> 
>     ;; add-language : (instanceof language%) -> void
>     ;; only allows addition on phase2



Posted on the dev mailing list.