package lascar
A library for manipulating Labeled Transition Systems in OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
lascar-0.6.0.tbz
sha256=343190b9c765655e787758db86a82818404dda18b4d2806283b4bde3ced91d26
sha512=2b6534ac438d574228d127b3b4e2cfec17b8b95e95124297c8da351caf34de2bb4ec8a31028a1470ba7f42aa932257293d021140a5a1c2642d1a60a8123d00a0
doc/src/lascar.utils/orderedTypeExt.ml.html
Source file orderedTypeExt.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
(**********************************************************************) (* *) (* LASCAr *) (* *) (* Copyright (c) 2017-present, Jocelyn SEROT. All rights reserved. *) (* *) (* This source code is licensed under the license found in the *) (* LICENSE file in the root directory of this source tree. *) (* *) (**********************************************************************) module type T = sig include Set.OrderedType val to_string: t -> string end module Pair (M1: T) (M2: T) = struct type t = M1.t * M2.t let compare = compare let to_string (e1,e2) = M1.to_string e1 ^ "," ^ M2.to_string e2 let mk e1 e2 = e1,e2 end module Triplet (M1: T) (M2: T) (M3: T) = struct type t = M1.t * M2.t * M3.t let compare = compare let to_string (e1,e2,e3) = M1.to_string e1 ^ "," ^ M2.to_string e2 ^ "," ^ M3.to_string e3 let mk e1 e2 e3 = e1,e2,e3 end module Either (M1: T) (M2: T) = struct type t = M1.t option * M2.t option let compare = compare let to_string = function (None, None) -> "" | (Some e1, None) -> M1.to_string e1 | (None, Some e2) -> M2.to_string e2 | (Some e1, Some e2) -> M1.to_string e1 ^ "," ^ M2.to_string e2 let mk e1 e2 = e1,e2 end module Either3 (M1: T) (M2: T) (M3: T) = struct type t = M1.t option * M2.t option * M3.t option let compare = compare let to_string = function (None, None, None) -> "" | (Some e1, None, None) -> M1.to_string e1 | (None, Some e2, None) -> M2.to_string e2 | (None, None, Some e3) -> M3.to_string e3 | (Some e1, Some e2, None) -> M1.to_string e1 ^ "," ^ M2.to_string e2 | (Some e1, None, Some e3) -> M1.to_string e1 ^ "," ^ M3.to_string e3 | (None, Some e2, Some e3) -> M2.to_string e2 ^ "," ^ M3.to_string e3 | (Some e1, Some e2, Some e3) -> M1.to_string e1 ^ "," ^ M2.to_string e2 ^ "," ^ M3.to_string e3 let mk e1 e2 e3 = e1,e2,e3 end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>