package omod

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

Install

Dune Dependency

Authors

Maintainers

Sources

omod-0.0.4.tbz
sha512=cab9e8ab6ca6e836fdaa3dcf9552d31e4de2bf069fcab096c1565d204ff91fc3516cd017a13702d749580bd3563c462db3277ab036cfc5d3cb9703a08ddbb927

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

Module Omod_support.Codec

Value serializers.

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

type 'a t

The type for codec of values of type 'a.

val v : id:string -> 'a t

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

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

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

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

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

OCaml

Innovation. Community. Security.