package omod

  1. Overview
  2. Docs
Lookup and load installed OCaml modules

Install

dune-project
 Dependency

Authors

Maintainers

Sources

omod-0.0.5.tbz
sha512=ba4922a3ff0c549a288908d0506ad8e53a0b256c3c564987a8026c6619f2ce5025d930671452caa250d2e23234b6aa29a5fb0b138ada37cb8a1d535c2968ba24

doc/omod.support/Omod_support/Codec/index.html

Module Omod_support.CodecSource

Value serializers.

The underlying implementation uses Marshal with magic numbers that depend on omod and OCaml's versions.

Sourcetype 'a t

The type for codec of values of type 'a.

Sourceval v : id:string -> 'a t

v ~id is a new codec with identifier id (part of the magic number).

Sourceval write : 'a t -> Omod.fpath -> 'a -> (unit, string) result

write c file v writes value v to file using codec c.

Sourceval read : 'a t -> Omod.fpath -> ('a, string) result

read c file reads a value from file using codec c.