Commit 27217276 authored by Philippe Veber's avatar Philippe Veber
Browse files

tk/Cpt: fixed bug

parent 8d3102fe
...@@ -23,7 +23,7 @@ let of_file fn = ...@@ -23,7 +23,7 @@ let of_file fn =
) )
|> Result.all |> Result.all
in in
let cols = List.filter cols ~f:(fun (label, _) -> not (String.equal label "Site")) in let cols = List.filter cols ~f:(fun (label, _) -> not (String.equal label "Sites")) in
let nrows = match cols with let nrows = match cols with
| [] -> assert false | [] -> assert false
| (_, h) :: _ -> Array.length h | (_, h) :: _ -> Array.length h
...@@ -55,6 +55,6 @@ let write_columns oc res = ...@@ -55,6 +55,6 @@ let write_columns oc res =
let to_file table ~output = let to_file table ~output =
Out_channel.with_file output ~f:(fun oc -> Out_channel.with_file output ~f:(fun oc ->
write_row oc ("Site" :: List.map table.cols ~f:fst) ; write_row oc ("Sites" :: List.map table.cols ~f:fst) ;
write_columns oc table write_columns oc table
) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment