From 51ee2cd63fa5456e465fdc63be54b9332b62c3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Thu, 14 Mar 2019 18:31:59 +0100 Subject: [PATCH] Added stub (failwith) for type annotator --- ParserMain.ml | 8 +++++--- Typecheck2.ml | 5 ++++- Typecheck2.mli | 4 +++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ParserMain.ml b/ParserMain.ml index d6bff2efc..2c2fe2791 100644 --- a/ParserMain.ml +++ b/ParserMain.ml @@ -106,6 +106,8 @@ let () = (* Temporary: force dune to build AST2.ml *) let () = - let open Typecheck2 in - let _ = temporary_force_dune in - () + if false then + let _ = Typecheck2.annotate in + () + else + () diff --git a/Typecheck2.ml b/Typecheck2.ml index 726775164..8fdcd5770 100644 --- a/Typecheck2.ml +++ b/Typecheck2.ml @@ -2,6 +2,8 @@ module SMap = Map.Make(String) +module I = AST2.O + module O = struct type asttodo = [`TODO] (* occurrences of asttodo will point to some part of the original parser AST *) @@ -102,4 +104,5 @@ module O = struct } end -let temporary_force_dune = 123 +let annotate : I.ast -> O.ast = + failwith "type annotator is not implemented yet" diff --git a/Typecheck2.mli b/Typecheck2.mli index 6da40fa1e..b17e9016a 100644 --- a/Typecheck2.mli +++ b/Typecheck2.mli @@ -2,6 +2,8 @@ module SMap : Map.S with type key = string +module I = AST2.O + module O : sig type asttodo = [`TODO] (* occurrences of asttodo will point to some part of the original parser AST *) @@ -102,4 +104,4 @@ module O : sig } end -val temporary_force_dune : int +val annotate : I.ast -> O.ast