File.Pimodule type READ = sig ... endmodule type WRITE = sig ... endtype Resource.pi += | Read : ('t, (module READ with type t = 't), [> ro_ty ]) Resource.pi| Write : ('t, (module WRITE with type t = 't), [> rw_ty ]) Resource.pival ro : (module READ with type t = 't) -> ('t, ro_ty) Resource.handlerval rw : (module WRITE with type t = 't) -> ('t, rw_ty) Resource.handler