Is there a plan to support Merlin in Vim (or Emacs, though I don’t really care about that…) on Windows? With fairly minimal effort, I can compile ocamlmerlin but there appear to be a few little platform-related problems:

 

C:\>ocamlmerlin

Fatal error: exception Invalid_argument("Sys.signal: unavailable signal")

 

and if opening an ML source file in Vim, I get:

 

"DB.ml" [readonly] 2153L, 128685C

Error detected while processing function merlin#LoadProject:

line    1:

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "C:\Dev\OCaml\share\ocamlmerlin\vim\autoload\merlin.py", line 485, in load_project

    fnames = catch_and_print(lambda: send_command("project","find",directory))

  File "C:\Dev\OCaml\share\ocamlmerlin\vim\autoload\merlin.py", line 117, in catch_and_print

    return f()

  File "C:\Dev\OCaml\share\ocamlmerlin\vim\autoload\merlin.py", line 485, in <lambda>

    fnames = catch_and_print(lambda: send_command("project","find",directory))

  File "C:\Dev\OCaml\share\ocamlmerlin\vim\autoload\merlin.py", line 66, in send_command

    restart()

  File "C:\Dev\OCaml\share\ocamlmerlin\vim\autoload\merlin.py", line 56, in restart

    preexec_fn = (lambda: signal.signal(signal.SIGINT, signal.SIG_IGN))

  File "C:\Python27\Lib\subprocess.py", line 633, in __init__

    raise ValueError("preexec_fn is not supported on Windows "

ValueError: preexec_fn is not supported on Windows platforms

 

(using ActivePython 2.7.2.5 x64 with Vim 7.4.5 x64)

 

More than happy to help with testing, but I haven’t the first clue how to debug Python... though the errors on both ends give the impression that it’s “just” a case of rewriting the inter-process communication stuff?

 

 

David

 

 

From: caml-list-request@inria.fr [mailto:caml-list-request@inria.fr] On Behalf Of Gabriel Scherer
Sent: 16 August 2013 11:48
To: caml users
Subject: [Caml-list] ANN: Merlin 1.3 -- advanced Vim and Emacs editor modes

 

Ann: Merlin 1.3

 

Merlin is an editor-assistant for the OCaml programming language,

focusing on working incrementally on incomplete files that are being

edited.

It has both a Vim and an Emacs mode (we warmly welcome

additional frontends), and provides advanced compiler-aware features

such as type-aware completion, type information feedback, and

interactive warning and error feedback.

 

Merlin is available at:

 

Merlin 1.0 was released on April 11, and the last version, Merlin

1.2, on July 21. As a sign of improved stability, we have received no

bug reports between Merlin 1.2 and the tagging of this new release,

which therefore focused on new features -- so that we can get more

bugs to fix before 1.4...

 

You can find a detailed changelog at

highlights are:

 

- There is a new "locate" command, to find the definition location of

  the identifier under the cursor, much like the venerable ocamlspot

  project. It works out of the box for identifiers defined in the

  local buffer (this is where merlin shines), and relies on presence

  of .cmt files for external modules. It is bound to the :Locate

  command in vim, and merlin-locate, C-c C-l by default, in emacs.

 

- There is now specific support for OMake's polling mode: if you

  invoke OMake with our `omake-merlin` wrapper

    omake-merlin omake ...

  each recompilation will instruct merlin to reload the interfaces

  that changed.

 

- Merlin now accepts the "type nonrec", "with compare" and "with

  fields" syntax extensions -- but there are still a few glitches

  being ironed out

 

- The emacs mode now has "semantic movement" commands to move to the

  next or previous phrase (C-c C-p, C-c C-n)

 

- The vim mode's :TypeOf command now accept an optional argument, an

  OCaml expression or constructor name that will be type-checked in

  the environment at the cursor position.

 

This release was brought to you by Simon Castellan, Thomas Refis and

Frédéric Bour. Previous unannounced releases also received helpful feedback

and contributions from Rudy Grinberg, Anil Madhavapeddy, Andrew Noyes,

Gabriel Scherer and Marc Weber.

 

Merlin relies on its benevolent contributors, which you should not

hesitate to join. We warmly welcome any feedback, bugreport, and of

course documentation and code contributions.