Infer scalar types with let generalization
This commit is contained in:
15 files changed
+980
-13
No files matched your search
+9
-6
@@ -89,24 +89,27 @@ let parse_source path = Parse.program (load_source path)
|
||||
|
||||
let resolve_source path = Resolve.program (parse_source path)
|
||||
|
||||
let infer_source path = Infer.program (resolve_source path)
|
||||
|
||||
let frontend_unavailable () =
|
||||
Diagnostic.error Location.none "the delta pipeline beyond parsing is not implemented in this revision"
|
||||
|
||||
let check path =
|
||||
ignore (resolve_source path)
|
||||
ignore (infer_source path)
|
||||
|
||||
let dump stage path =
|
||||
ignore (stage);
|
||||
ignore (resolve_source path);
|
||||
frontend_unavailable ()
|
||||
let program = infer_source path in
|
||||
match stage with
|
||||
| "typed" -> print_string (Typed.program_to_string program)
|
||||
| _ -> frontend_unavailable ()
|
||||
|
||||
let emit path output =
|
||||
ignore (resolve_source path);
|
||||
ignore (infer_source path);
|
||||
ignore output;
|
||||
frontend_unavailable ()
|
||||
|
||||
let build path output =
|
||||
ignore (resolve_source path);
|
||||
ignore (infer_source path);
|
||||
ignore output;
|
||||
frontend_unavailable ()
|
||||
|
||||
|
||||
Reference in new issue
Block a user