sig
  type (_, _) eq = Eq : ('a, 'a) Structure.eq
  module type Key =
    sig
      type 'a k
      val create_key : string -> 'Structure.Key.k
      val eq_type :
        'Structure.Key.k ->
        'Structure.Key.k -> ('a, 'b) Structure.eq option
      val print : 'Structure.Key.k Pretty_utils.formatter
      val compare : 'Structure.Key.k -> 'Structure.Key.k -> int
      val equal : 'Structure.Key.k -> 'Structure.Key.k -> bool
      val hash : 'Structure.Key.k -> int
      val tag : 'Structure.Key.k -> int
    end
  module type Shape =
    sig
      type 'a k
      val create_key : string -> 'a k
      val eq_type : 'a k -> 'b k -> ('a, 'b) eq option
      val print : 'a k Pretty_utils.formatter
      val compare : 'a k -> 'b k -> int
      val equal : 'a k -> 'b k -> bool
      val hash : 'a k -> int
      val tag : 'a k -> int
      type 'a structure =
          Void : 'Structure.Shape.structure
        | Leaf : 'a k -> 'Structure.Shape.structure
        | Node : 'Structure.Shape.structure *
            'Structure.Shape.structure -> ('a * 'b)
                                            Structure.Shape.structure
    end
  module Make : functor (X : sig  end-> Shape
  module Key_Value : Shape
  module Key_Location : Shape
  module Key_Domain : Shape
  module type Internal =
    sig
      type t
      type 'a structure
      val structure : Structure.Internal.t Structure.Internal.structure
    end
  module type External =
    sig
      type t
      type 'a key
      val mem : 'Structure.External.key -> bool
      val get :
        'Structure.External.key -> (Structure.External.t -> 'a) option
      val set :
        'Structure.External.key ->
        '-> Structure.External.t -> Structure.External.t
    end
  module Open :
    functor
      (Shape : Shape) (Data : sig
                                type t
                                val structure : t Shape.structure
                              end->
      sig
        val mem : 'Shape.k -> bool
        val get : 'Shape.k -> (Data.t -> 'a) option
        val set : 'Shape.k -> '-> Data.t -> Data.t
      end
end