ocaml-lsp icon indicating copy to clipboard operation
ocaml-lsp copied to clipboard

type aliases weird behavior

Open puitgfr opened this issue 2 years ago • 3 comments

Type aliases seem to be incorrectly displayed. Here is a short (working) example in codium with a type alias for natural numbers and a factorial function: defining nat type alias and factorial function So far, so good. Now, let's add an increment function on integers: nat_2 Maybe I'm missing something about type aliases, but I 'd like the type annotation of incr to show int -> int.

puitgfr avatar Jan 17 '24 16:01 puitgfr

Okay, I just tried to replicate the above. It seems to be an issue with int aliases. I changed the type to float and incr displays the "expected" type: image

PizieDust avatar Feb 01 '24 08:02 PizieDust

Okay, I just tried to replicate the above. It seems to be an issue with int aliases. I changed the type to float and incr displays the "expected" type: image

@PizieDust you have to replace occurences of int by float on line 6 too.

This is probably due to short-path and is a Merlin issue.

voodoos avatar Feb 01 '24 08:02 voodoos

@PizieDust you have to replace occurences of int by float on line 6 too.

Yes changing it to float, replicates the problem.

PizieDust avatar Feb 01 '24 09:02 PizieDust