aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/catalog.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syntax/catalog.ml')
-rw-r--r--lib/syntax/catalog.ml36
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/syntax/catalog.ml b/lib/syntax/catalog.ml
index b516976..5ad0bbd 100644
--- a/lib/syntax/catalog.ml
+++ b/lib/syntax/catalog.ml
@@ -18,31 +18,31 @@ type ex =
-> ex (** Type of check to apply *)
let build :
+ ?location_id:'a Type.Id.t ->
+ ?context_id:'b Type.Id.t ->
(module 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 Type.Id.t * ex =
- fun module_ ->
+ and type context = 'b) ->
+ ex =
+ fun ?location_id ?context_id module_ ->
let expr_witness = Type.Id.make ()
and expr' = Type.Id.make ()
and instr_witness = Type.Id.make ()
and instr' = Type.Id.make ()
- and location_witness = Type.Id.make ()
- and context = Type.Id.make () in
- let t =
- E
- {
- module_;
- expr_witness;
- expr';
- instr_witness;
- instr';
- location_witness;
- context;
- }
- in
- (location_witness, t)
+ and location_witness =
+ match location_id with Some v -> v | None -> Type.Id.make ()
+ and context = match context_id with Some v -> v | None -> Type.Id.make () in
+ E
+ {
+ module_;
+ expr_witness;
+ expr';
+ instr_witness;
+ instr';
+ location_witness;
+ context;
+ }