Skip to content
OCaml support for Flycheck using Merlin
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

flycheck-ocaml — Flycheck for OCaml

License GPL 3 MELPA MELPA Stable Build Status

Add OCaml support to Flycheck:

  • Add a ocaml-merlin syntax checker using Merlin


As usual, from MELPA or MELPA Stable.

In your Cask file:

(source gnu)
(source melpa)

(depends-on "flycheck-ocaml")

In your init.el:

(with-eval-after-load 'merlin
  ;; Disable Merlin's own error checking
  (setq merlin-error-after-save nil)

  ;; Enable Flycheck checker

(add-hook 'tuareg-mode-hook #'merlin-mode)


Just use Flycheck as usual in Tuareg Mode buffers. Flycheck will automatically use the new ocaml-merlin syntax checker if Merlin Mode is enabled and Merlin's own error checking (merlin-error-after-save) is disabled.

If you enable Merlin's error checking with M-x merlin-toggle-view-errors Flycheck will not use the ocaml-merlin syntax checker anymore, to avoid duplicate and redundant error reporting.


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

See COPYING for details.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.