landmarks icon indicating copy to clipboard operation
landmarks copied to clipboard

Bugs with polymorphism contraints in let-bindings

Open mlasson opened this issue 9 years ago • 0 comments

We have problem with polymorphism constraints:

let[@landmark] f : type t. t -> t = fun x -> x`

will trigger a clean but disapointing error message:

ppx_landmark: this landmark annotation requires a name argument

whereas exlicititly providing the name

let[@landmark "f"] f : type t. t -> t = fun x -> x

generates an unlocated type error after the ppx:

File "none", line 1: Error: This definition has type 't -> 't which is less general than 't0. 't0 -> 't0

mlasson avatar Dec 08 '16 09:12 mlasson