From cf42208a74138a32393073fef574c24bd73a27fc Mon Sep 17 00:00:00 2001 From: Alasdair Date: Mon, 28 Sep 2020 15:01:04 +0100 Subject: Move the ast defs wrapper into it's own file This refactoring is intended to allow this type to have more than just a list of definitions in future. --- src/process_file.mli | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/process_file.mli') diff --git a/src/process_file.mli b/src/process_file.mli index ea00dd29..041026d5 100644 --- a/src/process_file.mli +++ b/src/process_file.mli @@ -48,6 +48,8 @@ (* SUCH DAMAGE. *) (**************************************************************************) +open Ast_defs + (** Parse a file. The optional loc argument is the location of the $include directive that is importing the file, if applicable. *) val parse_file : ?loc:Parse_ast.l -> string -> Lexer.comment list * Parse_ast.def list @@ -57,10 +59,10 @@ val have_symbol : string -> bool val add_symbol : string -> unit val preprocess : (Arg.key * Arg.spec * Arg.doc) list -> Parse_ast.def list -> Parse_ast.def list -val check_ast : Type_check.Env.t -> unit Ast.defs -> Type_check.tannot Ast.defs * Type_check.Env.t -val rewrite_ast_initial : Type_check.Env.t -> Type_check.tannot Ast.defs -> Type_check.tannot Ast.defs * Type_check.Env.t -val rewrite_ast_target : string -> Type_check.Env.t -> Type_check.tannot Ast.defs -> Type_check.tannot Ast.defs * Type_check.Env.t -val rewrite_ast_check : Type_check.Env.t -> Type_check.tannot Ast.defs -> Type_check.tannot Ast.defs * Type_check.Env.t +val check_ast : Type_check.Env.t -> unit defs -> Type_check.tannot defs * Type_check.Env.t +val rewrite_ast_initial : Type_check.Env.t -> Type_check.tannot defs -> Type_check.tannot defs * Type_check.Env.t +val rewrite_ast_target : string -> Type_check.Env.t -> Type_check.tannot defs -> Type_check.tannot defs * Type_check.Env.t +val rewrite_ast_check : Type_check.Env.t -> Type_check.tannot defs -> Type_check.tannot defs * Type_check.Env.t val opt_file_out : string option ref val opt_memo_z3 : bool ref @@ -84,7 +86,7 @@ type out_type = val output : string -> (* The path to the library *) out_type -> (* Backend kind *) - (string * Type_check.Env.t * Type_check.tannot Ast.defs) list -> (*File names paired with definitions *) + (string * Type_check.Env.t * Type_check.tannot Ast_defs.defs) list -> (*File names paired with definitions *) unit (** [always_replace_files] determines whether Sail only updates modified files. @@ -93,6 +95,6 @@ val output : the output file is only updated, if its content really changes. *) val always_replace_files : bool ref -val load_files : ?check:bool -> (Arg.key * Arg.spec * Arg.doc) list -> Type_check.Env.t -> string list -> (string * Type_check.tannot Ast.defs * Type_check.Env.t) +val load_files : ?check:bool -> (Arg.key * Arg.spec * Arg.doc) list -> Type_check.Env.t -> string list -> (string * Type_check.tannot defs * Type_check.Env.t) -val descatter : Type_check.Env.t -> Type_check.tannot Ast.defs -> Type_check.tannot Ast.defs * Type_check.Env.t +val descatter : Type_check.Env.t -> Type_check.tannot defs -> Type_check.tannot defs * Type_check.Env.t -- cgit v1.2.3