From ec52259d31a9872aacba7815e15b5c62f95d9da0 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Thu, 16 Apr 2020 03:36:58 -0700 Subject: [PATCH] [sledge] Substitute out alias of option when including Monad_syntax Summary: Otherwise there is an alias `'a t` for `'a option` polluting the global namespace, which causes e.g. merlin to produce confusing types. Reviewed By: jvillard Differential Revision: D20831349 fbshipit-source-id: dff7b4f15 --- sledge/lib/import/option.ml | 2 -- sledge/lib/import/option.mli | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sledge/lib/import/option.ml b/sledge/lib/import/option.ml index ae9809664..b58e5d40b 100644 --- a/sledge/lib/import/option.ml +++ b/sledge/lib/import/option.ml @@ -15,8 +15,6 @@ let pp fmt pp_elt fs = function let cons xo xs = match xo with Some x -> x :: xs | None -> xs module Monad_syntax = struct - type nonrec 'a t = 'a t - let ( let+ ) x f = map ~f x let ( and+ ) x y = both x y let ( let* ) x f = bind ~f x diff --git a/sledge/lib/import/option.mli b/sledge/lib/import/option.mli index f26895a0c..0730f4df7 100644 --- a/sledge/lib/import/option.mli +++ b/sledge/lib/import/option.mli @@ -13,4 +13,4 @@ val pp : ('a_pp -> 'a -> unit, unit) fmt -> 'a_pp -> 'a option pp val cons : 'a t -> 'a list -> 'a list -module Monad_syntax : Monad_syntax with type 'a t = 'a option +module Monad_syntax : Monad_syntax with type 'a t := 'a option