Last active
February 23, 2022 12:54
-
-
Save Octachron/89e7f1d99fbd9bc79da89f6fb029ab5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type _ data_cstr = .. | |
| module type t = sig | |
| type a | |
| type _ data_cstr += Fmt: a data_cstr | |
| end | |
| type 'a data_format = (module t with type a = 'a) | |
| let mk_data_format : type a. unit -> a data_format = fun () -> | |
| (module struct type nonrec a = a type _ data_cstr += Fmt : a data_cstr end) | |
| let data_format_iseq : type a b. a data_format -> b data_format -> (a, b) eq option = | |
| fun (module M) (module N) -> | |
| match M.Fmt, N.Fmt with | |
| | M.Fmt, M.Fmt -> Some Eq | |
| | _ -> None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment