package reactiveData

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

Module type ReactiveData.DATASource

Signature describing a raw data container ('a data).

Given an implementation of DATA, an incremental version of the container can be produced (via Make).

Sourcetype 'a data

Data container

Sourcetype 'a patch

Patch format for modifying the container

Sourceval merge : 'a patch -> 'a data -> 'a data

Applicative merge operation: merge p d is a new container produced by applying p on d. d does not change.

Sourceval map_patch : ('a -> 'b) -> 'a patch -> 'b patch

Transform a patch

Sourceval map_data : ('a -> 'b) -> 'a data -> 'b data

map f d applies f on all the elements of d, producing a new container in an applicative way

Sourceval empty : 'a data

Empty container

Sourceval equal : ('a -> 'a -> bool) -> 'a data -> 'a data -> bool

Lift an equality operator over atoms of type 'a to an equality operator over 'a data

Sourceval diff : eq:('a -> 'a -> bool) -> 'a data -> 'a data -> 'a patch

diff ?eq d1 d2 produces a patch describing the differences between d1 and d2.

The optional ?eq argument is used for comparing the atoms inside d1 and d2. (The default value for eq is (=).)