CCFQueue.t must be covariant

This commit is contained in:
Calascibetta Romain 2019-01-21 18:41:53 +01:00 committed by Simon Cruanes
parent 23f759b984
commit 052e607c5c
2 changed files with 3 additions and 3 deletions

View file

@ -22,14 +22,14 @@ type one = zero succ
type two = zero succ succ type two = zero succ succ
type three = zero succ succ succ type three = zero succ succ succ
type ('a, 'l) digit = type (+'a, 'l) digit =
| Zero : ('a, zero) digit | Zero : ('a, zero) digit
| One : 'a -> ('a, one) digit | One : 'a -> ('a, one) digit
| Two : 'a * 'a -> ('a, two) digit | Two : 'a * 'a -> ('a, two) digit
| Three : 'a * 'a * 'a -> ('a, three) digit | Three : 'a * 'a * 'a -> ('a, three) digit
(* store the size in deep version *) (* store the size in deep version *)
type 'a t = type +'a t =
| Shallow : ('a, _) digit -> 'a t | Shallow : ('a, _) digit -> 'a t
| Deep : int * ('a, _ succ) digit * ('a * 'a) t lazy_t * ('a, _ succ) digit -> 'a t | Deep : int * ('a, _ succ) digit * ('a * 'a) t lazy_t * ('a, _ succ) digit -> 'a t

View file

@ -10,7 +10,7 @@ type 'a printer = Format.formatter -> 'a -> unit
(** {2 Basics} *) (** {2 Basics} *)
type 'a t type +'a t
(** Queue containing elements of type 'a *) (** Queue containing elements of type 'a *)
val empty : 'a t val empty : 'a t