diff options
author | Chimrod <> | 2024-12-09 10:13:50 +0100 |
---|---|---|
committer | Chimrod <> | 2024-12-09 10:13:50 +0100 |
commit | 65164f2ebe61a566d96119c2cde23eee6771007b (patch) | |
tree | 35ce714acce0da7bf172c8d7161b1be953af6f72 /lib/syntax/catalog.ml | |
parent | 53c02501935b3cb2db78e79deb4d38c997505a95 (diff) |
Splitted the code and declare the test catalog in it’s own module
Diffstat (limited to 'lib/syntax/catalog.ml')
-rw-r--r-- | lib/syntax/catalog.ml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/syntax/catalog.ml b/lib/syntax/catalog.ml new file mode 100644 index 0000000..b516976 --- /dev/null +++ b/lib/syntax/catalog.ml @@ -0,0 +1,48 @@ +type ex = + | E : { + module_ : + (module 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 Type.Id.t; + expr' : 'b Type.Id.t; + instr_witness : 'c Type.Id.t; + instr' : 'd Type.Id.t; + location_witness : 'e Type.Id.t; + context : 'f Type.Id.t; + } + -> ex (** Type of check to apply *) + +let build : + (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_ -> + 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) |