2016-12-02 13:54:32 +00:00
|
|
|
(** [Ordered_set_lang.t] is a sexp-based representation for an ordered list of strings,
|
|
|
|
with some set like operations. *)
|
|
|
|
|
|
|
|
open Import
|
|
|
|
|
|
|
|
type t
|
2017-02-25 17:53:39 +00:00
|
|
|
val t : t Sexp.Of_sexp.t
|
2016-12-02 13:54:32 +00:00
|
|
|
|
|
|
|
val eval_with_standard : t -> standard:string list -> string list
|
|
|
|
val standard : t
|
|
|
|
val is_standard : t -> bool
|
2017-02-23 10:43:51 +00:00
|
|
|
val append : t -> t -> t
|
2016-12-02 13:54:32 +00:00
|
|
|
|
|
|
|
(** Map non-variable atoms *)
|
|
|
|
val map : t -> f:(string -> string) -> t
|
|
|
|
|
|
|
|
module Unexpanded : sig
|
|
|
|
type expanded = t
|
|
|
|
type t
|
2017-02-25 17:53:39 +00:00
|
|
|
val t : t Sexp.Of_sexp.t
|
2016-12-02 13:54:32 +00:00
|
|
|
val standard : t
|
|
|
|
|
2017-01-06 17:17:38 +00:00
|
|
|
val append : t -> t -> t
|
|
|
|
|
2016-12-02 13:54:32 +00:00
|
|
|
(** List of files needed to expand this set *)
|
|
|
|
val files : t -> String_set.t
|
|
|
|
|
|
|
|
(** Expand [t] using with the given file contents. [file_contents] is a map from
|
2016-12-23 15:32:23 +00:00
|
|
|
filenames to their parsed contents. Every [(:include fn)] in [t] is replaced by
|
|
|
|
[Map.find files_contents fn]. *)
|
2017-02-25 17:53:39 +00:00
|
|
|
val expand : t -> files_contents:Sexp.Ast.t String_map.t -> expanded
|
2016-12-02 13:54:32 +00:00
|
|
|
end with type expanded := t
|