package merlin-lib

  1. Overview
  2. Docs
Merlin's libraries

Install

Dune Dependency

Authors

Maintainers

Sources

merlin-5.4.1-503.tbz
sha256=49b3b4c778c12125fc7405e73790b0b312d5d79749dd73d4838b6562a2533022
sha512=6350ff076ac61727c48bc098a05520c5d343f3323b2f3b6d7d69fdd568e51abca6945cbcbc3a6ae97fd198bd7bbdcae823fbd0f3f14a37972fe713da2ed14f2d

doc/merlin-lib.ocaml_typing/Ocaml_typing/Shape_reduce/Make/index.html

Module Shape_reduce.MakeSource

The Make functor is used to generate a reduction function for shapes.

It is parametrized by:

  • a function to load the shape of an external compilation unit
  • some fuel, which is used to bound recursion when dealing with recursive shapes introduced by recursive modules. (FTR: merlin currently uses a fuel of 10, which seems to be enough for most practical examples)

Usage warning: To ensure good performances, every reduction made with the same instance of that functor share the same ident-based memoization tables. Such an instance should only be used to perform reduction inside a unique compilation unit to prevent conflicting entries in these memoization tables.

Parameters

module _ : sig ... end

Signature

Sourceval reduce : Env.t -> Shape.t -> Shape.t
Sourceval reduce_for_uid : Env.t -> Shape.t -> result

Perform weak reduction and return the head's uid if any. If reduction was incomplete the partially reduced shape is returned.

OCaml

Innovation. Community. Security.