let of_file = fun ~filename ->
  let chan = Pervasives.open_in filename in
    of_channel ~close:true chan