{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,8]],"date-time":"2026-02-08T16:05:39Z","timestamp":1770566739485,"version":"3.49.0"},"reference-count":9,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2018,7,30]],"date-time":"2018-07-30T00:00:00Z","timestamp":1532908800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2018,7,30]]},"abstract":"<jats:p>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.<\/jats:p>\n          <jats:p>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 frontends -- in any language.<\/jats:p>\n          <jats:p>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.<\/jats:p>\n          <jats:p>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.<\/jats:p>","DOI":"10.1145\/3236798","type":"journal-article","created":{"date-parts":[[2018,7,31]],"date-time":"2018-07-31T19:41:18Z","timestamp":1533066078000},"page":"1-15","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":14,"title":["Merlin: a language server for OCaml (experience report)"],"prefix":"10.1145","volume":"2","author":[{"given":"Fr\u00e9d\u00e9ric","family":"Bour","sequence":"first","affiliation":[{"name":"Facebook, France"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Thomas","family":"Refis","sequence":"additional","affiliation":[{"name":"Jane Street, UK"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Gabriel","family":"Scherer","sequence":"additional","affiliation":[{"name":"Inria, France"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2018,7,30]]},"reference":[{"key":"e_1_2_2_1_1","volume-title":"Eco: A language composition editor","author":"Diekmann Lukas","year":"2014","unstructured":"Lukas Diekmann and Laurence Tratt . 2014 . Eco: A language composition editor . In Software Language Engineering (SLE) . Lukas Diekmann and Laurence Tratt. 2014. Eco: A language composition editor. In Software Language Engineering (SLE)."},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/1596550.1596569"},{"key":"e_1_2_2_3_1","volume-title":"Having Fun With 31.521 Shell Scripts. (April","author":"Jeannerod Nicolas","year":"2017","unstructured":"Nicolas Jeannerod , Yann R\u00e9gis-Gianas , and Ralf Treinen . 2017. Having Fun With 31.521 Shell Scripts. (April 2017 ). https:\/\/hal.archives-ouvertes.fr\/hal-01513750 . Nicolas Jeannerod, Yann R\u00e9gis-Gianas, and Ralf Treinen. 2017. Having Fun With 31.521 Shell Scripts. (April 2017). https:\/\/hal.archives-ouvertes.fr\/hal-01513750 ."},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/937563.937566"},{"key":"e_1_2_2_5_1","volume-title":"Jonathan Aldrich, and Matthew A. Hammer.","author":"Omar Cyrus","year":"2017","unstructured":"Cyrus Omar , Ian Voysey , Michael Hilton , Joshua Sunshine , Claire Le Goues , Jonathan Aldrich, and Matthew A. Hammer. 2017 . Toward Semantic Foundations for Program Editors. In SNAPL. Cyrus Omar, Ian Voysey, Michael Hilton, Joshua Sunshine, Claire Le Goues, Jonathan Aldrich, and Matthew A. Hammer. 2017. Toward Semantic Foundations for Program Editors. In SNAPL."},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/2892208.2892224"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.entcs.2005.11.044"},{"key":"e_1_2_2_9_1","volume-title":"Graham","author":"Wagner Tim A.","year":"1997","unstructured":"Tim A. Wagner and Susan L . Graham . 1997 . History-Sensitive Error Recover. IEEE Trans. on Software Engineering ( 1997). Tim A. Wagner and Susan L. Graham. 1997. History-Sensitive Error Recover. IEEE Trans. on Software Engineering (1997)."},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/293677.293678"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3236798","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3236798","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T21:41:28Z","timestamp":1750282888000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3236798"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2018,7,30]]},"references-count":9,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2018,7,30]]}},"alternative-id":["10.1145\/3236798"],"URL":"https:\/\/doi.org\/10.1145\/3236798","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2018,7,30]]},"assertion":[{"value":"2018-07-30","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}