Merlin's type inference is not working as well as it used to (in Emacs)

Since some months, when I’m using emacs and I do C-c C-t to get the type of something that is defined in the file I’m currently working on, it always says “no definition found”.

I’m not sure if this coincides with the removal of .merlin files from dune.

How can I get my types back?

Note that this is mainly a problem when writing executables with a lot of code which is not in a module.

I don’t think merlin ever says “no definition found”, are you sure you’re calling merlin?
I’d suggest calling merlin by hand, rather than through a binding, e.g. M-x merlin-type-enclosing RET and see what that says.

1 Like