Module Portable.Of_commit

A node implementation with hashes for keys is trivially portable:

Parameters

module S : S

Signature

include Commit_intf.S with type t = S.t with type hash = S.hash with module Info = S.Info
type hash = S.hash
val hash_t : hash Type.t

Commit values

type t = S.t

The type for commit values.

val t : t Type.t
val encoding : t Data_encoding.t

encoding is the data_encoding for t.

type node_key = hash

Type for node keys.

val node_key_t : node_key Type.t
val node_key_encoding : node_key Data_encoding.t

node_key_encoding is the data_encoding for node_key.

type commit_key = hash

Type for commit keys.

val commit_key_t : commit_key Type.t
val commit_key_encoding : commit_key Data_encoding.t

commit_key_encoding is the data_encoding for commit_key.

module Info = S.Info

The type for commit info.

val init : info:Info.t -> node:node_key -> parents:commit_key list -> t

init ~info ~node ~parents returns a new a commit.

val node : t -> node_key

The underlying node key.

val parents : t -> commit_key list

The commit parents.

val info : t -> Info.t

The commit info.

val of_commit : S.t -> t