Write a Blog >>
ICFP 2018
Sun 23 - Sat 29 September 2018 St. Louis, Missouri, United States
Mon 24 Sep 2018 11:15 - 11:37 at Stifel Theatre - Environments and Tools Chair(s): Alejandro Russo

We report on the experience of developing Merlin, a language server for the OCaml programming language in development since 2013. Merlin is a daemon that connects to your favourite text editor and provides services that require a fine-grained understanding of the programming language syntax and static semantics: instant feedback on warnings and errors, autocompletion, type of the code under the cursor'',go to definition'', etc.

Language servers need to handle incomplete and partially-incorrect programs, and try to be incremental to minimize recomputation after small editing actions. Merlin was built by carefully adapting the existing tools (the OCamllex lexer and Menhir parser generators) to better support incrementality, incompleteness and error handling. These extensions are elegant and general, as demonstrated by the interesting, unplanned uses that the OCaml community found for them. They could be adapted to other parsing tools – in any programming language.

Besides incrementality, we discuss the way Merlin communicates with editors, describe the design decisions that went into some demanding features and report on some of the non-apparent difficulties in building good editor support, emerging from expressive programming languages or frustrating tooling ecosystems.

We expect this experience report to be of interest to authors of interactive language tooling for any programming language; many design choices may be reused, and some hard-won lessons can serve as warnings.

Mon 24 Sep

Displayed time zone: Guadalajara, Mexico City, Monterrey change

10:30 - 12:00
Environments and ToolsResearch Papers at Stifel Theatre
Chair(s): Alejandro Russo Chalmers University of Technology, Sweden
10:30
22m
Talk
Build Systems à la CarteDistinguished Paper
Research Papers
Andrey Mokhov Newcastle University, UK, Neil Mitchell , Simon Peyton Jones Microsoft, UK
DOI
10:52
22m
Talk
Keep Your Laziness in Check
Research Papers
Kenneth Foner , Hengchu Zhang University of Pennsylvania, Leonidas Lampropoulos University of Pennsylvania
DOI
11:15
22m
Talk
Merlin: A Language Server for OCaml (Experience Report)
Research Papers
Frédéric Bour Facebook Paris, Thomas Réfis , Gabriel Scherer INRIA Saclay
DOI
11:37
22m
Talk
Functional Programming for Compiling and Decompiling Computer-Aided Design
Research Papers
Chandrakana Nandi University of Washington, USA, James R. Wilcox University of Washington, Taylor Blau University of Washington, Dan Grossman University of Washington, Zachary Tatlock University of Washington, Seattle
DOI