File: type_equal.mli

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 (17 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(** runtime witnes of type equality
    this is a reduced version of [Core.Std.Type_equal]. *)
type ('a, 'b) t = T : ('a, 'a) t
type ('a, 'b) equal = ('a, 'b) t

(** type-safe conversion between equal types *)
val conv : ('a, 'b) t -> 'a -> 'b

(** type equality is reflexive *)
val refl : ('a, 'a) t

(** needed in some cases even though t is exported and is a gadt *)
module Lift (X: sig
  type 'a t
end) : sig
  val lift : ('a, 'b) t -> ('a X.t, 'b X.t) t
end