Error in the exercise while testing your solution
val print_html : 'a -> 'b = <fun>
type tree = Leaf | Node of tree * tree
exception TODO
module Code : sig end
module Solution :
sig
val weight : tree -> int
val height : tree -> int
val naive_trees_of_weight : int -> int
val trees_of_weights : int -> int array
val fix : (('a -> 'b) -> 'a -> 'b) -> 'a -> 'b
val sigma : int -> int -> (int -> int) -> int
val split_weight : int -> (int -> int -> int) -> int
val trees_of_weight : int -> int
val tabulate : (int -> 'a) -> int -> int -> 'a list
val trees_of_weight_0_19 : int list
val split_wb_weight : int -> (int -> int -> int) -> int
val wb_trees_of_weight : int -> int
val wb_trees_of_weight_0_19 : int list
end
module Test_lib : Test_lib.S
module Report = Learnocaml_report
val iter : ('a -> unit) -> 'a list -> unit = <fun>
val map : ('a -> 'b) -> 'a list -> 'b list = <fun>
module T = Test_lib
module R = Report
type report = R.t
type requirement = int
val infinity : requirement = 2147483647
val ( ++ ) : requirement -> requirement -> requirement = <fun>
val ( <== ) : requirement -> int -> bool = <fun>
type document =
Empty
| FancyString of string * int * int * int
| Blank of int
| IfFlat of document * document
| HardLine
| Cat of requirement * document * document
| Nest of requirement * int * document
| Group of requirement * document
val requirement : document -> requirement = <fun>
val empty : document = Empty
val fancysubstring : string -> int -> int -> int -> document = <fun>
val fancystring : string -> int -> document = <fun>
val utf8_length : string -> int = <fun>
val utf8string : string -> document = <fun>
val utf8format : ('a, unit, string, document) format4 -> 'a = <fun>
val char : char -> document = <fun>
val space : document = FancyString (" ", 0, 1, 1)
val semicolon : document = FancyString (";", 0, 1, 1)
val hardline : document = HardLine
val blank : int -> document = <fun>
val ifflat : document -> document -> document = <fun>
val internal_break : int -> document = <fun>
val break0 : document = IfFlat (Empty, HardLine)
val break1 : document = IfFlat (FancyString (" ", 0, 1, 1), HardLine)
val break : int -> document = <fun>
val ( ^^ ) : document -> document -> document = <fun>
val nest : int -> document -> document = <fun>
val group : document -> document = <fun>
val blank_length : int = 80
val blank_buffer : string =
" "
val blanks : Buffer.t -> int -> unit = <fun>
type state = {
width : int;
mutable column : int;
mutable output : Buffer.t;
}
val pretty : state -> int -> bool -> document -> unit = <fun>
val pretty : int -> document -> string = <fun>
val concat : document list -> document = <fun>
val comma : document =
Cat (2, FancyString (",", 0, 1, 1),
IfFlat (FancyString (" ", 0, 1, 1), HardLine))
val pre_comma : document -> document = <fun>
val pre_commas : document list -> document = <fun>
val commas : document list -> document = <fun>
val int : int -> document = <fun>
val block : document -> document = <fun>
val parens : document -> document = <fun>
val ocaml_array_brackets : document -> document = <fun>
val tuple : document list -> document = <fun>
val construct : string -> document list -> document = <fun>
val wrap : ('a -> document) -> 'a -> string = <fun>
exception Fail of report
val section : string -> R.t -> report = <fun>
val fail : R.inline list -> 'a = <fun>
val fail_text : ('a, unit, string, 'b) format4 -> 'a = <fun>
val protect : (unit -> report) -> report = <fun>
val successful_status : R.status -> bool = <fun>
val successful_item : R.item -> bool = <fun>
val successful : R.t -> bool = <fun>
val ( -@> ) : report -> (unit -> report) -> report = <fun>
val grab :
'a Ty.ty -> string -> ('a -> Learnocaml_report.t) -> Learnocaml_report.t =
<fun>
val test_value_0 :
string -> 'a Ty.ty -> 'b -> ('a -> 'b -> bool) -> Learnocaml_report.t =
<fun>
val correct : string -> R.item list = <fun>
val mismatch :
string ->
'a -> 'b -> 'b -> int -> ('a -> R.inline list) -> ('b -> string) -> 'c =
<fun>
val codebreak : ('a -> string) -> 'a -> R.inline list = <fun>
val test_value_1 :
string ->
('a -> 'b) Ty.ty ->
('a -> 'b) ->
('a -> string) ->
('b -> string) -> ('b -> 'b -> bool) -> 'a list -> Learnocaml_report.t =
<fun>
val test_value_2 :
string ->
('a -> 'b -> 'c) Ty.ty ->
('a -> 'b -> 'c) ->
('a -> string) ->
('b -> string) ->
('c -> string) ->
('c -> 'c -> bool) -> ('a * 'b) list -> Learnocaml_report.t = <fun>
val test_value_3 :
string ->
('a -> 'b -> 'c -> 'd) Ty.ty ->
('a -> 'b -> 'c -> 'd) ->
('a -> string) ->
('b -> string) ->
('c -> string) ->
('d -> string) ->
('d -> 'd -> bool) -> ('a * 'b * 'c) list -> Learnocaml_report.t = <fun>
val flat_map : ('a -> 'b list) -> 'a list -> 'b list = <fun>
val upk : int -> int -> int list -> int list = <fun>
val up : int -> int -> int list = <fun>
val pairs : 'a list -> 'b list -> ('a * 'b) list = <fun>
val split : int -> (int -> int -> 'a list) -> 'a list = <fun>
val deepening : (int -> 'a list) -> int -> 'a list = <fun>
val show_string : string -> string = <fun>
val show_int : int -> string = <fun>
val show_char : char -> string = <fun>
val show_bool : bool -> string = <fun>
val print_option : ('a -> document) -> 'a option -> document = <fun>
val print_array : ('a -> document) -> 'a array -> document = <fun>
val list_trees_of_weight : int -> tree list = <fun>
val print_tree : tree -> document = <fun>
val show_tree : tree -> string = <fun>
val show_int_array : int array -> string = <fun>
Stack overflow during evaluation (looping recursion?).