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/Index/Unsafe/index.html

Module Index.UnsafeSource

To implement clever datastructures (for instance using bit-packing), it is useful to manipulate indices as integers. See IndexSet or IndexMap for usage examples. Refrain from using it if you are not sure of what you are doing since this can break some modular abstraction.

To be safe, the coerced module should never introduce new indices; that is, it should not return an index that it did not receive as argument.

Sourcemodule type T = sig ... end
Sourcemodule type F = functor (X : T) -> sig ... end
Sourcemodule Int : T with type 'a t = int
Sourcemodule Index : T with type 'a t = 'a index
Sourcemodule Coerce (F : F) (X : F(Int).S) : F(Index).S