From 6ceaf0176b2a61cd2ed7b358af1e34349a8041ce Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 19 May 2017 21:14:36 +0200 Subject: Moving "sym" on "eq" type to lib/util.ml. --- lib/util.ml | 2 ++ lib/util.mli | 2 ++ 2 files changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/util.ml b/lib/util.ml index 0d2425f271..36282b2dac 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -136,6 +136,8 @@ type ('a, 'b) union = ('a, 'b) CSig.union = Inl of 'a | Inr of 'b type 'a until = 'a CSig.until = Stop of 'a | Cont of 'a type ('a, 'b) eq = ('a, 'b) CSig.eq = Refl : ('a, 'a) eq +let sym : type a b. (a, b) eq -> (b, a) eq = fun Refl -> Refl + module Union = struct let map f g = function diff --git a/lib/util.mli b/lib/util.mli index cf8041a0d9..56ec5394eb 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -133,5 +133,7 @@ type 'a until = 'a CSig.until = Stop of 'a | Cont of 'a type ('a, 'b) eq = ('a, 'b) CSig.eq = Refl : ('a, 'a) eq +val sym : ('a, 'b) eq -> ('b, 'a) eq + val open_utf8_file_in : string -> in_channel (** Open an utf-8 encoded file and skip the byte-order mark if any. *) -- cgit v1.2.3