From 025f3109bd0aeb576a451a30845ac0a7a8517b58 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 30 Jan 2018 03:15:53 -0800 Subject: [PATCH] [toplevel] add support for `ppx_compare` to the infer repl Summary: Useful for testing stuff with ppx. Opening `IStd` is needed to open `Core`, which pulls stuff like `compare_option` into the global namespace, and is generally useful anyway as it's the excpected development environment for infer. Reviewed By: mbouaziz Differential Revision: D6834071 fbshipit-source-id: 26a1304 --- scripts/toplevel_init | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/toplevel_init b/scripts/toplevel_init index cacd70abd..994c85980 100644 --- a/scripts/toplevel_init +++ b/scripts/toplevel_init @@ -3,16 +3,24 @@ (* load dependencies *) #use "topfind";; #thread;; +#require "ANSITerminal";; +#require "atdgen";; #require "cmdliner";; #require "core.top";; #require "ctypes";; #require "ctypes.stubs";; +#require "ppx_compare";; #require "sawja";; #require "sqlite3";; -#require "atdgen";; #require "xmlm";; -#require "ANSITerminal";; open InferStdlib;; open InferGenerated;; open InferModules;; + +(* Most of infer uses this, useful for copy/pasting. Can be (partially) countered by typing `open +Caml.Pervasives`. *) +open IStd;; + +module L = Logging;; +module F = Format;;