realworldocaml / book

V2 of Real World OCaml
https://dev.realworldocaml.org
Other
1.19k stars 175 forks source link

New comment on block [block-idm181619469824] #2602

Open jordancurve opened 10 years ago

jordancurve commented 10 years ago

When I cut & paste this code, I get:

Error: The function applied to this argument has type ?run_config:Core_bench.Std.Bench.Run_config.t -> ?analysis_configs:Core_bench.Std.Bench.Analysis_config.t list -> ?display_config:Core_bench.Std.Bench.Display_config.t -> ?save_to_file:(Core_bench.Std.Bench.Measurement.t -> string) -> unit This argument cannot be applied with label ~ascii_table

avsm commented 10 years ago

There's been a minor change in APIs here; just remove the ~ascii_table argument. Will be fixed in next errata.

jordancurve commented 10 years ago

I tried that, but then I got this error:

let run_bench tests = Bench.bench ~display:Textutils.Ascii_table.Display.column_titles tests;; ;; Error: The function applied to this argument has type ?run_config:Core_bench.Std.Bench.Run_config.t -> ?analysis_configs:Core_bench.Std.Bench.Analysis_config.t list -> ?display_config:Core_bench.Std.Bench.Display_config.t -> ?save_to_file:(Core_bench.Std.Bench.Measurement.t -> string) -> unit This argument cannot be applied with label ~display

jordancurve commented 10 years ago

If I also remove the ~display argument it works fine.