diff options
author | Chimrod <> | 2023-10-13 14:26:26 +0200 |
---|---|---|
committer | Chimrod <> | 2023-10-18 09:49:47 +0200 |
commit | b38bcd572d6f827a1b639933c8cf0fbe3b832a8d (patch) | |
tree | 3dcf9bddd89abb64d75458465b101920d04f1a79 /lib/syntax/check.mli | |
parent | f85abcb996b8d189a646e6aeea8aa4ce068f7570 (diff) |
New checker which operate accumulate differents other checkers
Diffstat (limited to 'lib/syntax/check.mli')
-rw-r--r-- | lib/syntax/check.mli | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/syntax/check.mli b/lib/syntax/check.mli new file mode 100644 index 0000000..276e51f --- /dev/null +++ b/lib/syntax/check.mli @@ -0,0 +1,40 @@ +module Id : sig + type 'a typeid + (** The type created on-the-fly. *) + + val newtype : unit -> 'a typeid + (** Create a new instance of a dynamic type *) + + type ('a, 'b) eq = Eq : ('a, 'a) eq + + val try_cast : 'a typeid -> 'b typeid -> ('a, 'b) eq option + (** Compare two types using the Eq pattern *) +end + +type transform = + | E : { + module_ : + (module S.Analyzer + with type Expression.t = 'a + and type Instruction.t = 'b + and type Location.t = 'c); + expr_witness : 'a Id.typeid; + instr_witness : 'b Id.typeid; + location_witness : 'c Id.typeid; + } + -> transform + +module type App = sig + val t : transform array +end + +type result = R : { value : 'a; witness : 'a Id.typeid } -> result + +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 +end +[@@warning "-67"] |