File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- let printExpr typ =
1
+ let printExpr ?( lineWidth = 60 ) typ =
2
2
Printtyp. reset_names () ;
3
- Res_doc. toString ~width: 60
3
+ Res_doc. toString ~width: lineWidth
4
4
(Res_outcome_printer. printOutTypeDoc (Printtyp. tree_of_typexp false typ))
5
5
6
6
let printDecl ~recStatus name decl =
Original file line number Diff line number Diff line change @@ -49,12 +49,12 @@ let declToString ?(recStatus = Types.Trec_not) name t =
49
49
let cacheTypeToString = ref false
50
50
let typeTbl = Hashtbl. create 1
51
51
52
- let typeToString (t : Types.type_expr ) =
52
+ let typeToString ?( lineWidth = 60 ) (t : Types.type_expr ) =
53
53
match
54
54
if ! cacheTypeToString then Hashtbl. find_opt typeTbl (t.id, t) else None
55
55
with
56
56
| None ->
57
- let s = PrintType. printExpr t in
57
+ let s = PrintType. printExpr ~line Width t in
58
58
Hashtbl. replace typeTbl (t.id, t) s;
59
59
s
60
60
| Some s -> s
You can’t perform that action at this time.
0 commit comments