package dolmen

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dolmen_std.TagSource

Tags

Type definitions

Sourcetype map

The type of immutable maps from tags to values.

Sourcetype 'a t

A tag containing values of type 'a.

Sourceval equal : _ t -> _ t -> bool

Are two tag keys equal ?

Creating and accessing tags

Sourceval empty : map

The empty map.

Sourceval create : unit -> 'a t

Create a new tag.

Sourceval get : map -> 'a t -> 'a option

Get the value associated to a tag.

Sourceval get_list : map -> 'a list t -> 'a list

Get all the values associated with a tag list, returning the empty list by default if the tag is not present.

Sourceval get_last : map -> 'a list t -> 'a option

Return the last value associated to a list tag (i.e. the head of the list returned by get_list if it exists).

Sourceval set : map -> 'a t -> 'a -> map

Set the value bound to a tag.

Sourceval set_opt : map -> 'a t -> 'a option -> map

Convenient shorthand for an optional set.

Sourceval add : map -> 'a list t -> 'a -> map

Add a value to a list tag in a map. The new value is enqueued at the head of the list of values bound.

Sourceval add_opt : map -> 'a list t -> 'a option -> map

Optionally add a value to a list tag in a map. The new value is enqueued at the head of the list of values bound.

Sourceval add_list : map -> 'a list t -> 'a list -> map

Add a list of values to a list tag in a map. The new values are enqueued at the head of the list of values bound, however it is not guaranteed that the first value of the given list is the new head of the list of bound values.

Sourceval unset : map -> _ t -> map

Remove any binding to the given key in the map.

OCaml

Innovation. Community. Security.