[racket] Fwd: interaction between (require racket) and check-expect

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Nov 5 10:11:49 EDT 2011

They might even be able to see this with check syntax, as the require
for redex will point to define-struct (I believe).

FWIW, the plan is to have modules declare that they work with the
teaching languages (or a subset of them) and then racket wouldn't make
that declaration and then this would be a syntax error.

But we haven't gotten to that yet.

Robby

On Sat, Nov 5, 2011 at 9:09 AM, Adam Shaw <adamshaw at cs.uchicago.edu> wrote:
> My students have found it on their own, and they're using it for things like "last". I have no problem slapping them on the wrist for that, but that's a separate issue. I just wanted to be able to explain to them why struct comparisons are suddenly broken.
>
> - Adam
>
>> On Nov 5, 2011, at 9:03 AM, Robby Findler wrote:
>>
>>> (require racket) generally doesn't work in the teaching languages. It
>>> shadows define-struct, in this case, and you get the wrong version (so
>>> you get generative structs).
>>>
>>> Why are you doing (require racket)? There's probably some smaller
>>> library you could use that would not shadow core things...
>>>
>>> Robby
>>>
>>> On Sat, Nov 5, 2011 at 8:54 AM, Adam Shaw <adamshaw at cs.uchicago.edu> wrote:
>>>> Hi --
>>>> My students noticed that certain check-expect tests stop working in the
>>>> presence of (require racket). For example, the check-expect in this
>>>> three-line file fails under ISλ:
>>>> (require racket)
>>>> (define-struct foo (x))
>>>> (check-expect (make-foo 0) (make-foo 0))
>>>> Why is this happening?
>>>> Thanks -- Adam
>>>> _________________________________________________
>>>> 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.