summaryrefslogtreecommitdiff
path: root/src/process_file.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/process_file.ml')
-rw-r--r--src/process_file.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/process_file.ml b/src/process_file.ml
index 9c105968..438666e6 100644
--- a/src/process_file.ml
+++ b/src/process_file.ml
@@ -81,10 +81,16 @@ let parse_file (f : string) : Parse_ast.defs =
| Lexer.LexError(s,p) ->
raise (Reporting_basic.Fatal_error (Reporting_basic.Err_lex (p, s)))
+
(*Should add a flag to say whether we want to consider Oinc or Odec the default order *)
let convert_ast (defs : Parse_ast.defs) : (Type_internal.tannot Ast.defs * kind Envmap.t * Ast.order)=
Initial_check.to_ast Nameset.empty Type_internal.initial_kind_env (Ast.Ord_aux(Ast.Ord_inc,Parse_ast.Unknown)) defs
+let load_file env f =
+ let ast = parse_file f in
+ let (ast, _, _) = convert_ast ast in
+ Type_check_new.check env ast
+
let opt_new_typecheck = ref false
let opt_just_check = ref false
let opt_ddump_tc_ast = ref false