272 |
(printWithSharing ppstrm |
(printWithSharing ppstrm |
273 |
(obj,accu, |
(obj,accu, |
274 |
fn (obj,accu) => |
fn (obj,accu) => |
275 |
ppArray(Obj.toArray obj, hd argtys, membersOp, |
(case Obj.rep obj |
276 |
depth, |
of Obj.PolyArray => |
277 |
!Control.Print.printLength, accu)) |
ppArray(Obj.toArray obj, hd argtys, |
278 |
|
membersOp, depth, |
279 |
|
!Control.Print.printLength, accu) |
280 |
|
| Obj.RealArray => |
281 |
|
ppRealArray(Obj.toRealArray obj, |
282 |
|
!Control.Print.printLength))) |
283 |
handle Obj.Representation => |
handle Obj.Representation => |
284 |
add_string ppstrm "prim?") |
add_string ppstrm "prim?") |
285 |
else add_string ppstrm "prim?" |
else add_string ppstrm "prim?" |
572 |
printRest (",",fn () => add_break ppstrm (0,0), index + 1)) |
printRest (",",fn () => add_break ppstrm (0,0), index + 1)) |
573 |
in begin_block ppstrm INCONSISTENT 1; |
in begin_block ppstrm INCONSISTENT 1; |
574 |
add_string ppstrm "[|"; printRest("",fn () => (), 0); |
add_string ppstrm "[|"; printRest("",fn () => (), 0); |
575 |
|
end_block ppstrm |
576 |
|
end |
577 |
|
and ppRealArray (objs : Real64Array.array, length: int) = |
578 |
|
let val vectorLength = Real64Array.length objs |
579 |
|
val (len, closing) = |
580 |
|
if length >= vectorLength then |
581 |
|
(vectorLength,fn _ => add_string ppstrm "|]") |
582 |
|
else (length,fn sep => (add_string ppstrm sep; |
583 |
|
add_string ppstrm "...|]")) |
584 |
|
fun printRest(sep,breaker, index) = |
585 |
|
if index >= len then closing sep |
586 |
|
else (add_string ppstrm sep; breaker (); |
587 |
|
add_string ppstrm (Real.toString(Real64Array.sub(objs,index))); |
588 |
|
printRest (",",fn () => add_break ppstrm (0,0), index + 1)) |
589 |
|
in begin_block ppstrm INCONSISTENT 1; |
590 |
|
add_string ppstrm "[|"; printRest("",fn () => (), 0); |
591 |
end_block ppstrm |
end_block ppstrm |
592 |
end |
end |
593 |
in ppValue |
in ppValue |