Skip to content

Type error when instrumenting #447

@7h3kk1d

Description

@7h3kk1d

Hi, we're using bisect_ppx 2.8.3 in Hazel for Reason code. We had a weird issue where our code stopped compiling when running with --instrument-with bisect_ppx as the analyzed type seems incorrect. The code still runs without it. Adding a type annotation fixed the issue.

Failing build: https://github.com/hazelgrove/hazel/actions/runs/14561798665/job/40904394222#step:15:62
Added signature that solved the problem: hazelgrove/hazel@283e54b#diff-a9ca0d4f53786cf399607e94bf000affdf51e7b47a00d546c73eae08205ba70aR505

The compilation error:

 File "src/haz3lweb/view/ExerciseMode.re", lines 510-515, characters 8-49:
510 | ........CellEditor.Selection.handle_key_event(
511 |           ~selection=s,
512 |           ~event,
513 |           cell_editor,
514 |         )
515 |         |> Option.map(a => Update.Editor(pos, a))
Error: This expression has type Update.t option
       but an expression was expected of type Node.t

I'm still working on minimizing a test case for this but any help in how to view the instrumented code would be valued. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions