package merlin-lib

  1. Overview
  2. Docs
Merlin's libraries

Install

dune-project
 Dependency

Authors

Maintainers

Sources

merlin-5.8-505.tbz
sha256=5642cde8486a84aad98fa5c590b70e8dcc6074d7fbdb3b9b8c46b2c5b42f653b
sha512=1d7a7751157e393d3ae248ef5ae24a6b4e81430666c61cc51a3d0ec35804523317036f3d7a3c7f18a7554337f4e5f5989fb677865b261ece3fd2b317903570ba

doc/merlin-lib.kernel/Merlin_kernel/Mbrowse/Tie_breaker/index.html

Module Mbrowse.Tie_breakerSource

Some nodes in the typedtree may share the same, non-ghost, location, while being different. One example of this is let-punning:

let+ x in

Both x as an expression and as a pattern share the exact same location.

This module is about tie-breaking those cases to select the node that we want.

Sourcetype tie_break =
  1. | Prefer_first
  2. | Prefer_second
Sourcetype t = node -> node -> tie_break option

If f : t, then f node1 node2 answers:

  • Some Prefer_first to select node1
  • Some Prefer_second to select node2
  • None to let the default disambiguation mechanism break the tie.
Sourceval prefer_expression : t

Tie-break by preferring expression over other nodes