When displaying long lists and other large values, utop wraps them at about 80 columns, even when my terminal window is wider. How can I change the output width?
The only thing that I have found that might have provided the solution is UTop.size
, which has type LTerm_geom.size React.signal
, and seems to correctly record the size of my terminal window. In this example my terminal window had dimensions 164x37:
# #require "react";;
# #require "lambda-term";;
# React.S.value UTop.size;;
- : LTerm_geom.size = {LTerm_geom.rows = 37; cols = 164}
However, the value of cols
doesn't seem to affect how values are displayed. For example, this is copied from the same session (with line breaks as they were displayed):
# List.hd algs;;
- : (int list * float) list =
[([2; 1; 0], 1.); ([2; 1], 0.54148398267); ([2; 0], 0.677137905076);
([2], 0.218621887745); ([1; 0], 0.781378112255); ([1], 0.322862094924);
([0], 0.45851601733); ([], 0.)]