[{"name":"ORDT.Weft","comment":" Wefts are like vector clocks - they offer causality information across different events in a\ndistributed system. A new weft is `empty`. Each site is then associated with an index, indicating\nthe index of the last operation received for that particular site.\n\nFor any two instances of `Weft`, an upper bound as well as a lower bound can be found. The lower\nbound is the last known state to both wefts. The upper bound is the minimal state that could know\nboth wefts. This ability to find upper or/and a lower bound is often referred to as a\n[semi-lattice](https://en.wikipedia.org/wiki/Semilattice).\n\nUsually, these clocks are associated with some operations. There is, in general, no guarantee that\na specific instance of weft is associated to a operation.\n\n\n# Types\n\n@docs Weft\n\n\n# Primitives\n\n@docs empty\n\n\n# Contents\n\n@docs getSiteIndex\n@docs insertSiteIndex\n\n\n# Semi-lattice\n\n@docs joinLower\n@docs joinUpper\n\n","unions":[{"name":"Weft","comment":" Represents a weft in a distributed system. So `Weft (Int)` means that each site is identified by\nan `Int`, and `Weft (String)` that each site is identified by a `String`.\n","args":["comparable"],"cases":[]}],"aliases":[],"values":[{"name":"empty","comment":" Create a baseline that will always act as a proper lower bound for all the possible instances\nof an `EchoWeft`.\n\n    joinLower clock empty == empty\n\n    joinUpper clock empty == clock\n\n","type":"ORDT.Weft.Weft comparable"},{"name":"getSiteIndex","comment":" Get the last operation index for a certain site.\n","type":"comparable -> ORDT.Weft.Weft comparable -> Maybe.Maybe Basics.Int"},{"name":"insertSiteIndex","comment":" Set the last operation index for a certain site.\n","type":"comparable -> Basics.Int -> ORDT.Weft.Weft comparable -> ORDT.Weft.Weft comparable"},{"name":"joinLower","comment":" Perform a semi-lattice join on the lower bound of the two wefts.\n","type":"ORDT.Weft.Weft comparable -> ORDT.Weft.Weft comparable -> ORDT.Weft.Weft comparable"},{"name":"joinUpper","comment":" Perform a semi-lattice join on the upper bound of the two wefts.\n","type":"ORDT.Weft.Weft comparable -> ORDT.Weft.Weft comparable -> ORDT.Weft.Weft comparable"}],"binops":[]}]