aboutsummaryrefslogtreecommitdiff
path: root/lib/checks/check.mli
diff options
context:
space:
mode:
authorChimrod <>2024-12-09 10:13:50 +0100
committerChimrod <>2024-12-09 10:13:50 +0100
commit65164f2ebe61a566d96119c2cde23eee6771007b (patch)
tree35ce714acce0da7bf172c8d7161b1be953af6f72 /lib/checks/check.mli
parent53c02501935b3cb2db78e79deb4d38c997505a95 (diff)
Splitted the code and declare the test catalog in it’s own module
Diffstat (limited to 'lib/checks/check.mli')
-rw-r--r--lib/checks/check.mli64
1 files changed, 12 insertions, 52 deletions
diff --git a/lib/checks/check.mli b/lib/checks/check.mli
index 321b67b..8502753 100644
--- a/lib/checks/check.mli
+++ b/lib/checks/check.mli
@@ -1,68 +1,28 @@
(** This module is a meta-checker. It will take many checkers and aggregate
- their result together before providing an unified result.
+ 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)
- ]}
-*)
+ {[
+ let _, e1 = build (module …)
+ let _, e2 = build (module …)
-module Id : sig
- type 'a t
- (** The type created on-the-fly. *)
-end
-
-type t =
- | E : {
- module_ :
- (module Qsp_syntax.S.Analyzer
- with type Expression.t = 'a
- and type Expression.t' = 'b
- and type Instruction.t = 'c
- and type Instruction.t' = 'd
- and type Location.t = 'e
- and type context = 'f);
- expr_witness : 'a Id.t;
- expr' : 'b Id.t;
- instr_witness : 'c Id.t;
- instr' : 'd Id.t;
- location_witness : 'e Id.t;
- context : 'f Id.t;
- }
- -> t (** Type of check to apply *)
-
-val build :
- (module Qsp_syntax.S.Analyzer
- with type Expression.t = _
- and type Expression.t' = _
- and type Instruction.t = _
- and type Instruction.t' = _
- and type Location.t = 'a
- and type context = _) ->
- 'a Id.t * t
-(** Build a new check from a module following S.Analyzer signature.
-ypeid
- Return the result type which hold the final result value, and checker
- itself. *)
+ module Check = Make (struct
+ let t = [| e1; e2 |]
+ end)
+ ]} *)
-val get_module : t -> (module Qsp_syntax.S.Analyzer)
+val get_module : Qsp_syntax.Catalog.ex -> (module Qsp_syntax.S.Analyzer)
type result
-val get : 'a Id.t -> result -> 'a option
+val get : 'a Type.Id.t -> result -> 'a option
(** The method [get] can be used to get the internal value for one of the
- checker used.
- *)
+ checker used. *)
module Make (A : sig
- val t : t array
+ val t : Qsp_syntax.Catalog.ex array
end) : sig
include Qsp_syntax.S.Analyzer with type Location.t = result array
end