blob: e4ba5b5ac30e03a3f7a7c3b22c1ed28f53920fb6 (
plain) (
tree)
|
|
class type implementation = object
method address : Concepts.Hash.hash
end
type Handle.protocol += Addressable of implementation
type t = implementation
let make impl = Addressable (impl :> implementation)
let from handle = Handle.into handle (function Addressable impl -> Some impl | _ -> None)
let address i = Handle.invoke i (fun o -> o#address)
|