Re: [racket] 3D Plot example doesn't work in Typed Racket

2014-05-31 Thread Eric Dobson
This should now be fixed at HEAD. On Fri, May 30, 2014 at 8:25 PM, Greg Hendershott wrote: > Thanks, Neil and Alexander! > > (At one point I actually did try `list` instead of `vector`, but that > uncovered an additional typecheck problem that I conflated with this. > All set now.) >

Re: [racket] 3D Plot example doesn't work in Typed Racket

2014-05-30 Thread Greg Hendershott
Thanks, Neil and Alexander! (At one point I actually did try `list` instead of `vector`, but that uncovered an additional typecheck problem that I conflated with this. All set now.) Racket Users list: http://lists.racket-lang.org/users

Re: [racket] 3D Plot example doesn't work in Typed Racket

2014-05-30 Thread Eric Dobson
I know what the bug is and it should be pretty simple to fix, but please file a bug for tracking purposes. On Fri, May 30, 2014 at 1:44 PM, Neil Toronto wrote: > This is one case in which Typed Racket could do better inference. I'm not > sure what the difference is between Listof and Sequenceof t

Re: [racket] 3D Plot example doesn't work in Typed Racket

2014-05-30 Thread Neil Toronto
This is one case in which Typed Racket could do better inference. I'm not sure what the difference is between Listof and Sequenceof that makes it treat them differently, but it does: #lang typed/racket ;; Typechecks (ann (list (vector 1 2 3)) (Listof (Vector Any Any (U Real False ;;

Re: [racket] 3D Plot example doesn't work in Typed Racket

2014-05-30 Thread Alexander D. Knauth
The problem isn’t with List vs. Sequenceof, the problem is that (Vector Symbol Symbol Integer) isn’t a subtype of (Vector Any Any (U Real False ivl)). #lang typed/racket (require plot/typed) (ann (cast 0 (Vector Symbol Symbol Integer)) (Vector Any Any (U Real False ivl))) Also (Vector Symbol)

Re: [racket] 3D Plot example doesn't work in Typed Racket

2014-05-30 Thread Greg Hendershott
p.s. I happened to paste the error message from 5.3.5. The TR error message format in recent versions of Racket is much nicer; kudos! ; /tmp/tr.rkt:4:8: Type Checker: type mismatch ; expected: (Sequenceof ; (U (Vector Any Any (U Real False ivl)) ; (List Any Any (U Re

[racket] 3D Plot example doesn't work in Typed Racket

2014-05-30 Thread Greg Hendershott
This example from the plot docs works great: #lang racket (require plot) (plot-new-window? #t) (plot3d (discrete-histogram3d '(#(a a 1) #(a b 2) #(b b 3)) #:label "Missing (b,a)" #:color 4 #:line-color 4)) But