aboutsummaryrefslogtreecommitdiffstats
path: root/lib/protocols/Schematics.mli
blob: d8533bf894eb36daaaec69dcce4d3f104973f914 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(** Instantiate once and share the protocol with schema providers and evaluators. *)
module type S = sig
  module Schema : Abstract.Schematics.SCHEMA
  type t

  class type implementation = object
    method schema : (Schema.t, Concepts.Condition.condition) result
  end

  val make : #implementation -> Handle.protocol
  val from : Handle.t -> t Handle.interface option
  val schema : t Handle.interface -> (Schema.t, Concepts.Condition.condition) result
  val attributes :
    t Handle.interface ->
    ((string * Schema.attribute) BatFingerTree.t, Concepts.Condition.condition) result
end

module Make (Schema : Abstract.Schematics.SCHEMA) : S with module Schema = Schema