File: type_equal.ml

package info (click to toggle)
typerep 111.17.00-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,076 kB
  • ctags: 3,093
  • sloc: ml: 18,181; makefile: 55
file content (12 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
type (_, _) t = T : ('a, 'a) t
type ('a, 'b) equal = ('a, 'b) t

let refl = T

let conv : type a b. (a, b) t -> a -> b = fun T x -> x

module Lift (X: sig
  type 'a t
end) = struct
  let lift (type a) (type b) (T : (a, b) t) = (T : (a X.t, b X.t) t)
end