diff options
author | Chimrod <> | 2024-12-14 23:06:12 +0100 |
---|---|---|
committer | Chimrod <> | 2025-01-03 15:05:00 +0100 |
commit | 75f3eabb46eded01460f7700a75d094100047438 (patch) | |
tree | 4dcee7d2fc9310ff41776d9df8986f5efa0db229 /lib/syntax/catalog.ml | |
parent | 289dc576624d4233116806e566bb791fee1de178 (diff) |
Diffstat (limited to 'lib/syntax/catalog.ml')
-rw-r--r-- | lib/syntax/catalog.ml | 36 |
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; + } |