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.)
>
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
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
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
;;
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)
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
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
7 matches
Mail list logo