typed-racket
typed-racket copied to clipboard
math/matrix printing exposes internal representation
[samth@hermes:~/work/papers/trpp-pldi-2016 (master) plt] r
Welcome to Racket v6.3.0.4.
-> (require typed/racket)
-> (require math)
-> (define-values (L U)
(matrix-lu (matrix [[4 3] [6 3]])))
-> (values L U)
- : (values (Array Real) (Array Real))
(mutable-array #[#[1 0] #[3/2 1]])
(mutable-array #[#[4 3] #[0 -3/2]])
-> (matrix* L U)
- : #(struct:#<syntax:/home/samth/sw/plt/racket/share/pkgs/math-lib/math/private/array/typed-array-struct.rkt:49:13 Array>
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Real)))
(array #[#[4 3] #[6 3]])
Something is getting overly-resolved in the type prior to printing.
This happens in 6.2.1 as well, but doesn't include the path (probably because some source location gets lost). Currently, it's causing a DrDr failure here: http://drdr.racket-lang.org/32675/pkgs/racket-test/tests/zo-path.rkt
DrDr failure fixed by ab4514b, but the underlying issue is still there.
This specific problem is fixed:
> (matrix* L U)
- : (Array Real)
(array #[#[4 3] #[6 3]])
But the general problem still persists. See https://docs.racket-lang.org/math/array_quick.html and https://github.com/racket/racket/issues/3878