aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/check.mli
diff options
context:
space:
mode:
authorChimrod <>2023-10-14 18:36:46 +0200
committerChimrod <>2023-10-18 09:49:47 +0200
commit28981268a4eb93bba918eb29ecf57de64d4b0eff (patch)
tree97f0fd27d761e55abab1c8f923d6a7683bc75c4f /lib/syntax/check.mli
parentb38bcd572d6f827a1b639933c8cf0fbe3b832a8d (diff)
Applied this new way to check the errors in the main code
Diffstat (limited to 'lib/syntax/check.mli')
-rw-r--r--lib/syntax/check.mli37
1 files changed, 15 insertions, 22 deletions
diff --git a/lib/syntax/check.mli b/lib/syntax/check.mli
index 276e51f..c831b67 100644
--- a/lib/syntax/check.mli
+++ b/lib/syntax/check.mli
@@ -1,34 +1,27 @@
module Id : sig
type 'a typeid
(** The type created on-the-fly. *)
-
- val newtype : unit -> 'a typeid
- (** Create a new instance of a dynamic type *)
-
- type ('a, 'b) eq = Eq : ('a, 'a) eq
-
- val try_cast : 'a typeid -> 'b typeid -> ('a, 'b) eq option
- (** Compare two types using the Eq pattern *)
end
-type transform =
- | E : {
- module_ :
- (module S.Analyzer
- with type Expression.t = 'a
- and type Instruction.t = 'b
- and type Location.t = 'c);
- expr_witness : 'a Id.typeid;
- instr_witness : 'b Id.typeid;
- location_witness : 'c Id.typeid;
- }
- -> transform
+type t
+(** Type of check to apply *)
+
+val build :
+ (module S.Analyzer
+ with type Expression.t = 'a
+ and type Instruction.t = 'b
+ and type Location.t = 'c) ->
+ 'a Id.typeid * 'b Id.typeid * 'c Id.typeid * t
+(** Build a new check from a module following S.Analyzer signature *)
module type App = sig
- val t : transform array
+ val t : t array
end
-type result = R : { value : 'a; witness : 'a Id.typeid } -> result
+type result
+
+val get : 'a Id.typeid -> result -> 'a option
+(** Retrieve the information with the given type *)
module Make (A : App) : sig
include