[sledge] Refactor: Add Option.Import including Monad_infix and Monad_syntax

Summary:
The convention is for modules that are intended to be `open`ed, that
define syntax and infix operations, are named `Import`. This diff
combines the `Option.Monad_infix` and `Option.Monad_syntax` modules
into `Option.Import` to follow this convention.

Reviewed By: ngorogiannis

Differential Revision: D22170507

fbshipit-source-id: 44378fd56
master
Josh Berdine 5 years ago committed by Facebook GitHub Bot
parent c7556364b7
commit 33d59b8642

@ -76,8 +76,7 @@ end
(** Containers *)
module Option = Option
include Option.Monad_infix
include Option.Monad_syntax
include Option.Import
module List = List
module Array = struct

@ -73,8 +73,7 @@ module Invariant : module type of Core.Invariant
(** Containers *)
module Option = Option
include module type of Option.Monad_infix
include module type of Option.Monad_syntax
include module type of Option.Import
module List = List
module Array : sig

@ -21,3 +21,8 @@ module Monad_syntax = struct
let ( let* ) x f = bind ~f x
let ( and* ) x y = both x y
end
module Import = struct
include Monad_infix
include Monad_syntax
end

@ -16,4 +16,7 @@ val or_else : f:(unit -> 'a option) -> 'a option -> 'a option
val cons : 'a t -> 'a list -> 'a list
module Monad_syntax : Monad_syntax with type 'a t := 'a option
module Import : sig
include Monad_syntax with type 'a t := 'a option
include module type of Monad_infix
end

@ -637,7 +637,7 @@ let strlen_spec reg ptr =
* Symbolic Execution
*)
open Option.Monad_syntax
open Option.Import
let check_preserve_us (q0 : Sh.t) (q1 : Sh.t) =
let gain_us = Var.Set.diff q1.us q0.us in

Loading…
Cancel
Save