Source file generic.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
type 'a ty = ..

class type t = object
  method probe : 'a. 'a ty -> 'a option
end

let probe (t : #t) ty = t#probe ty

class type close = object
  method close : unit
end

let close (t : #close) = t#close