Skip to content

Instantly share code, notes, and snippets.

@phongphan
Last active August 29, 2015 14:12
Show Gist options
  • Save phongphan/4e270f12d485de9b0b97 to your computer and use it in GitHub Desktop.
Save phongphan/4e270f12d485de9b0b97 to your computer and use it in GitHub Desktop.
Use Std.Core in merlin and tuareg's toplevel within emacs
Using Core.Std in Emacs
=======================
merlin
------
When you want to use external libraries installed with opam (findlib?).
You could do it by using `merlin-use` command, it will prompt you for a package name.
For example, we need to use Std.Core:
M-x merlin-use
Package to use: Core
toplevel
--------
This is the same as running OCaml's toplevel (ocaml). We need to use `topfind` module
which provide 'require' directive to load external libraries to the current toplevel.
For example:
#use "topfind";;
#camlp4o;;
#thread;;
#require "core.top";;
open Core.Std;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment