Created
December 31, 2014 18:45
-
-
Save gsg/d0bca5e241fb2af590d5 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 _ t = I : int -> int t | F : float -> float t | |
module TEq = struct | |
type 'a key = 'a t | |
type 'a value = 'a t | |
let equal : type a b . a key -> b key -> (a, b) Eq.t option = | |
fun x y -> match x, y with | |
| I a, I b -> if a = b then Some Eq.Refl else None | |
| F a, F b -> if a = b then Some Eq.Refl else None | |
| _ -> None | |
end | |
module TAlist = Alist (TEq) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment