package sherlodoc

  1. Overview
  2. Docs

Source file storage_marshal.ml

1
2
3
4
5
6
7
8
9
type writer = out_channel

let open_out = open_out
let close_out = close_out
let save ~db t = Marshal.to_channel db t []

let load name =
  let file = open_in name in
  Fun.protect ~finally:(fun () -> close_in file) (fun () -> [ Marshal.from_channel file ])
OCaml

Innovation. Community. Security.