[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
master
Josh Berdine 5 years ago committed by Facebook GitHub Bot
parent 1ae192dc0e
commit ec52259d31

@ -15,8 +15,6 @@ let pp fmt pp_elt fs = function
let cons xo xs = match xo with Some x -> x :: xs | None -> xs let cons xo xs = match xo with Some x -> x :: xs | None -> xs
module Monad_syntax = struct module Monad_syntax = struct
type nonrec 'a t = 'a t
let ( let+ ) x f = map ~f x let ( let+ ) x f = map ~f x
let ( and+ ) x y = both x y let ( and+ ) x y = both x y
let ( let* ) x f = bind ~f x let ( let* ) x f = bind ~f x

@ -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 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

Loading…
Cancel
Save