[sledge] Build: Promote `import` subdirectory to a toplevel `nonstdlib` library

Reviewed By: jvillard

Differential Revision: D21720977

fbshipit-source-id: 0b9001eea
master
Josh Berdine 5 years ago committed by Facebook GitHub Bot
parent 529f6c9ded
commit df3e6ded1d

@ -33,25 +33,14 @@
ppx_sexp_conv ppx_sexp_value)
(preprocess no_preprocessing))
(subdir
src/import
(library
(name import)
(public_name sledge.import)
(libraries core core_kernel.fheap zarith trace)
(flags (:standard))
(preprocess
(pps ppx_sledge ppx_trace))
(inline_tests)))
(subdir
src
(library
(name sledge)
(public_name sledge)
(libraries import)
(libraries nonstdlib)
(flags
(:standard -open Import))
(:standard -open NS))
(preprocess
(pps ppx_sledge ppx_trace))
(inline_tests)))
@ -85,9 +74,9 @@
(package sledge)
(libraries apron apron.boxMPQ ctypes ctypes.foreign dune-build-info llvm
llvm.irreader llvm.analysis llvm.scalar_opts llvm.target llvm.ipo
llvm.linker shexp.process yojson trace import sledge model)
llvm.linker shexp.process yojson trace nonstdlib sledge model)
(flags
(:standard -w -58 -open Import -open Sledge -open Model))
(:standard -w -58 -open NS -open Sledge -open Model))
(preprocess
(pps ppx_sledge ppx_trace))))

@ -1,5 +1,8 @@
(lang dune 2.5)
(package
(name nonstdlib))
(package
(name ppx_trace))

@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*)
(** Global namespace opened in each source file by the build system *)
(** Global namespace intended to be opened in each source file *)
include Import0
include NS0
(** Failures *)

@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*)
(** Global namespace opened in each source file by the build system *)
(** Global namespace intended to be opened in each source file *)
include module type of Import0
include module type of NS0
(** Function combinators *)

@ -0,0 +1,13 @@
; Copyright (c) Facebook, Inc. and its affiliates.
;
; This source code is licensed under the MIT license found in the
; LICENSE file in the root directory of this source tree.
(library
(name NS)
(public_name nonstdlib)
(libraries core core_kernel.fheap zarith trace)
(flags (:standard))
(preprocess
(pps ppx_sledge ppx_trace))
(inline_tests))

@ -7,7 +7,7 @@
(** IArray - Immutable view of an array *)
open Import0
open NS0
include (
Array.Permissioned :

@ -13,7 +13,7 @@
structure, it only attempts to make it inconvenient to unintentionally
mutate. *)
open Import0
open NS0
include
module type of Array.Permissioned

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*)
open Import0
open NS0
include Core.List
let rec pp ?pre ?suf sep pp_elt fs = function

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*)
open Import0
open NS0
include module type of Core.List
val pp :

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*)
open Import0
open NS0
include Map_intf
module Make (Key : sig

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*)
open Import0
open NS0
module type S = sig
type key

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*)
open! Import0
open! NS0
include Core.Option
let pp fmt pp_elt fs = function

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*)
open! Import0
open! NS0
include module type of Core.Option
val pp : ('a_pp -> 'a -> unit, unit) fmt -> 'a_pp -> 'a option pp

@ -7,7 +7,7 @@
(** Qset - Set with (signed) rational multiplicity for each element *)
open Import0
open NS0
include Qset_intf
module Make (Elt : sig

@ -7,7 +7,7 @@
(** Qset - Set with (signed) rational multiplicity for each element *)
open Import0
open NS0
module type S = sig
type elt

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*)
open Import0
open NS0
include Set_intf
module Make (Elt : sig

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*)
open Import0
open NS0
module type S = sig
type elt

@ -38,13 +38,13 @@ type op3 = Conditional | Extract [@@deriving compare, equal, hash, sexp]
type opN = Concat | Record [@@deriving compare, equal, hash, sexp]
module rec Set : sig
include Import.Set.S with type elt := T.t
include NS.Set.S with type elt := T.t
val hash : t -> int
val hash_fold_t : t Hash.folder
val t_of_sexp : Sexp.t -> t
end = struct
include Import.Set.Make (T)
include NS.Set.Make (T)
let hash_fold_t = hash_fold_t T.hash_fold_t
let hash = Hash.of_fold hash_fold_t
@ -53,13 +53,13 @@ end = struct
end
and Qset : sig
include Import.Qset.S with type elt := T.t
include NS.Qset.S with type elt := T.t
val hash : t -> int
val hash_fold_t : t Hash.folder
val t_of_sexp : Sexp.t -> t
end = struct
include Import.Qset.Make (T)
include NS.Qset.Make (T)
let hash_fold_t = hash_fold_t T.hash_fold_t
let hash = Hash.of_fold hash_fold_t

@ -58,14 +58,14 @@ type opN =
[@@deriving compare, equal, hash, sexp]
module rec Set : sig
include Import.Set.S with type elt := T.t
include NS.Set.S with type elt := T.t
val hash_fold_t : t Hash.folder
val t_of_sexp : Sexp.t -> t
end
and Qset : sig
include Import.Qset.S with type elt := T.t
include NS.Qset.S with type elt := T.t
val hash_fold_t : t Hash.folder
val t_of_sexp : Sexp.t -> t
@ -110,7 +110,7 @@ module Var : sig
module Map : Map.S with type key := t
module Set : sig
include Import.Set.S with type elt := t
include NS.Set.S with type elt := t
val hash_fold_t : t Hash.folder
val sexp_of_t : t -> Sexp.t

Loading…
Cancel
Save