package ppxlib

  1. Overview
  2. Docs

Some helpers to annotate the AST so merlin can decide which branches to look at and which branches to ignore.

Annotations merlin understand

val hide_attribute : string Location.loc * Migrate_parsetree.Ast_407.Parsetree.payload

Adding this [@merlin.hide] attribute on a piece of AST "hides" it from merlin: it tells merlin not to consider that branch if another piece of AST with the same location exist.

val focus_attribute : string Location.loc * Migrate_parsetree.Ast_407.Parsetree.payload

Adding this [@merlin.focus] attribute on a piece of AST tells merlin to prefer it to any other piece of AST when several have the same location.

Helpers

The following functions add the corresponding attribute (defined above) to specific pieces of AST.

OCaml

Innovation. Community. Security.