aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/check.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syntax/check.mli')
-rw-r--r--lib/syntax/check.mli36
1 files changed, 24 insertions, 12 deletions
diff --git a/lib/syntax/check.mli b/lib/syntax/check.mli
index 28ff49e..759a07a 100644
--- a/lib/syntax/check.mli
+++ b/lib/syntax/check.mli
@@ -1,3 +1,19 @@
+(** This module is a meta-checker. It will take many checkers and aggregate
+ their result together before providing an unified result.
+
+ The modules required to be declared before being used, using the [build]
+ method, and provided as an array :
+
+ {[
+ let _, e1 = build (module …)
+ let _, e2 = build (module …)
+
+ module Check = Make (struct
+ let t = [| e1; e2 |]
+ end)
+ ]}
+*)
+
module Id : sig
type 'a typeid
(** The type created on-the-fly. *)
@@ -19,20 +35,16 @@ val build :
Return the result type which hold the final result value, and checker
itself. *)
-module type App = sig
- val t : t array
-end
-
type result
val get : 'a Id.typeid -> result -> 'a option
-(** Retrieve the information with the given type *)
-
-module Make (A : App) : sig
- include
- S.Analyzer
- with type Location.t = result array
- and type Instruction.t' = result array
- and type Expression.t' = result array
+(** The method [get] can be used to get the internal value for one of the
+ checker used.
+ *)
+
+module Make (A : sig
+ val t : t array
+end) : sig
+ include S.Analyzer with type Location.t = result array
end
[@@warning "-67"]