typed-racket icon indicating copy to clipboard operation
typed-racket copied to clipboard

math/matrix printing exposes internal representation

Open samth opened this issue 10 years ago • 3 comments

[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.

samth avatar Nov 22 '15 15:11 samth

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

samth avatar Nov 22 '15 15:11 samth

DrDr failure fixed by ab4514b, but the underlying issue is still there.

samth avatar Dec 01 '15 17:12 samth

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

sorawee avatar Sep 04 '23 06:09 sorawee