package lrgrep

  1. Overview
  2. Docs
Detailed error messages for Menhir-generated parsers

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lrgrep-0.9.tbz
sha256=e53de12e4c5cbe6bca00643593266b4f9fa2e3f6a138195eeff7a4329f5c1c75
sha512=7fd7c4d11506fea7cc11c9bbf5aea9142d905643553c0c90e1bb16b794106b0c14a266acf89ae91b6929008dc0ba6515f788642873e2e4ba6c3d49bd45d25127

doc/fix/Fix/Indexing/Sum/index.html

Module Indexing.SumSource

Sum(L)(R) creates a new type-level set, which is the disjoint sums of the sets L and R. The functor application Sum(L)(R) involves a call to cardinal L.n, thereby fixing the cardinal of the set L, if it was an open-ended set. The cardinal of the set R is not fixed: if R is an open-ended set, then the new set is open-ended as well, and it is still permitted to add new elements to R by calling R.fresh(). Fixing the cardinal of the new set fixes the cardinal of R.

Sourcetype (_, _) n
Sourceval cardinal : 'l cardinal -> 'r cardinal -> ('l, 'r) n cardinal
Sourceval inj_l : 'l index -> ('l, 'r) n index
Sourceval inj_r : 'l cardinal -> 'r index -> ('l, 'r) n index
Sourceval prj : 'l cardinal -> ('l, 'r) n index -> ('l index, 'r index) either
Sourcemodule type S = sig ... end

The signature SUM extends CARDINAL with an explicit isomorphism between the set n and the disjoint sum l + r. The functions inj_l and inj_r convert an index into l or an index into r into an index into n. Conversely, the function prj converts an index into r into either an index into l or an index into r.

Sourcemodule Make (L : CARDINAL) (R : CARDINAL) : S with type l := L.n and type r := R.n
Sourceval make : 'l cardinal -> 'r cardinal -> (module S with type l = 'l and type r = 'r)

The function sum is a value-level analogue of the functor Sum.