Module Merlin_kernel.MpipelineSource
val make_with_parsetree :
state:Mocaml.typer_state ->
Mconfig.t ->
Msource.t ->
Mreader.parsetree ->
tCreate a pipeline with a pre-provided parsetree, bypassing reader and ppx phases.
The parsetree is used directly for type checking. The source is still needed for position resolution (e.g., get_lexing_pos).
This is used for fast-path completion: the caller gets the ppx parsetree from a normal pipeline, strips uninteresting parts, then creates a new pipeline with the stripped parsetree for cheaper type checking.
The config should have a modified filename (e.g., append "__for_completion") to avoid cache collisions with the normal pipeline.
The state parameter allows reusing the typer state from an existing pipeline, which is necessary when called from within with_pipeline (where Local_store is already bound and creating a new state would fail). Use the state from the normal pipeline that provided the parsetree.