Re: [racket-dev] 'case' using equal?

2012-11-26 Thread Jon Zeppieri
The 'case-check' branch of my github fork now implements Robby's suggestion. [https://github.com/97jaz/racket/tree/case-check] I ran the full build (including documentation), ran collects/tests/run-automated-tests.rkt, and started up and played around with DrRacket. The only logged messages were

Re: [racket-dev] 'case' using equal?

2012-11-26 Thread Robby Findler
I think we should change 'case'. I think we should also add a clear note to the documentation for case saying this is not the same as 'case' in Scheme because it uses equal?, not eqv? and giving a few examples to show the difference to head off any confusion. Robby On Monday, November 26, 2012,

Re: [racket-dev] 'case' using equal?

2012-11-26 Thread Matthias Felleisen
+1 On Nov 26, 2012, at 11:06 AM, Robby Findler wrote: I think we should change 'case'. I think we should also add a clear note to the documentation for case saying this is not the same as 'case' in Scheme because it uses equal?, not eqv? and giving a few examples to show the

[racket-dev] 'case' using equal?

2012-11-25 Thread Jon Zeppieri
As a follow-up to the discussion on the users list [http://lists.racket-lang.org/users/archive/2012-November/054973.html], I changed 'case' to use equal? comparison. The diff, including additional tests and a doc change, is at

Re: [racket-dev] 'case' using equal?

2012-11-25 Thread Robby Findler
Did you try to see if there were any case expressions in our test suites or while building docs or while starting up and fiddling with DrRacket that would behave differently with equal?? Robby On Sun, Nov 25, 2012 at 5:33 PM, Jon Zeppieri zeppi...@gmail.com wrote: As a follow-up to the

Re: [racket-dev] 'case' using equal?

2012-11-25 Thread Jon Zeppieri
Not in any systematic way, no. When I first implemented the triple-dispatch case, I did look through the racket sources to see how case was actually used there. It turned out that almost all of the uses were small, simple, and, for lack of a better word, monomorphic. Looking back at the users

Re: [racket-dev] 'case' using equal?

2012-11-25 Thread Robby Findler
I'm not sure what that error message means, but I think I was thinking of a different strategy. Something like this (but where you deal with 'else' properly and write in '#%kernel (so you have to use the expansion of log-info etc etc)), all staying in the same file. #lang racket (provide

Re: [racket-dev] 'case' using equal?

2012-11-25 Thread Jon Zeppieri
Thanks! With that approach, I can get it to build. -J On Sun, Nov 25, 2012 at 10:11 PM, Robby Findler ro...@eecs.northwestern.edu wrote: I'm not sure what that error message means, but I think I was thinking of a different strategy. Something like this (but where you deal with 'else' properly

Re: [racket-dev] 'case' using equal?

2012-11-25 Thread Jon Zeppieri
I spoke too soon. Now I get a lot of these: /Users/jaz/src/racket/collects/images/private/flomap-transform.rkt:106:2: Type Checker: untyped identifier check-em imported from module case.rkt in: (define-values (x-min y-min x-max y-max) (case bounded-by ((id) (values 0 0 w h)) ((corners)

Re: [racket-dev] 'case' using equal?

2012-11-25 Thread Sam Tobin-Hochstadt
On Sun, Nov 25, 2012 at 10:50 PM, Jon Zeppieri zeppi...@gmail.com wrote: Is there a way to give check-em a type for TR without breaking it for non-typed code? Yes, you should add an entry to typed-racket/base-env/base-special-env for `check-em`. Note that you'll have to specify which module

Re: [racket-dev] 'case' using equal?

2012-11-25 Thread Jon Zeppieri
Thanks! -J On Sun, Nov 25, 2012 at 10:59 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Sun, Nov 25, 2012 at 10:50 PM, Jon Zeppieri zeppi...@gmail.com wrote: Is there a way to give check-em a type for TR without breaking it for non-typed code? Yes, you should add an entry to