Skip to content

Instrumentation breaks tail recursivity #359

@monate

Description

@monate

Hello,
On this example with Ocaml 4.11.1 and bisect_ppx 2.5.0 :

let rec g y = g y || (g [@tailcall]) y

the instrumentation causes the Warning 51 to be emitted:

$ ocamlfind opt -c bisect_bug2.ml
$ ocamlfind opt -package bisect_ppx -c bisect_bug2.ml
File "bisect_bug2.ml", line 1, characters 21-38:
1 | let rec g y = g y || (g [@tailcall]) y
                         ^^^^^^^^^^^^^^^^^
Warning 51: expected tailcall

Tail recursivity preservation looks like something desirable for the bisect_ppx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions