sig
  module type Id_Datatype =
    sig
      type t
      val ty : t Type.t
      val name : string
      val descr : t Descr.t
      val packed_descr : Structural_descr.pack
      val reprs : t list
      val equal : t -> t -> bool
      val compare : t -> t -> int
      val hash : t -> int
      val pretty_code : Format.formatter -> t -> unit
      val internal_pretty_code :
        Type.precedence -> Format.formatter -> t -> unit
      val pretty : Format.formatter -> t -> unit
      val varname : t -> string
      val mem_project : (Project_skeleton.t -> bool) -> t -> bool
      val copy : t -> t
      val id : t -> int
    end
  module type S =
    sig
      type elt
      type t
      val ty : t Type.t
      val name : string
      val descr : t Descr.t
      val packed_descr : Structural_descr.pack
      val reprs : t list
      val equal : t -> t -> bool
      val compare : t -> t -> int
      val hash : t -> int
      val pretty_code : Format.formatter -> t -> unit
      val internal_pretty_code :
        Type.precedence -> Format.formatter -> t -> unit
      val pretty : Format.formatter -> t -> unit
      val varname : t -> string
      val mem_project : (Project_skeleton.t -> bool) -> t -> bool
      val copy : t -> t
      val empty : t
      val is_empty : t -> bool
      val mem : Hptset.S.elt -> t -> bool
      val add : Hptset.S.elt -> t -> t
      val singleton : Hptset.S.elt -> t
      val remove : Hptset.S.elt -> t -> t
      val elements : t -> Hptset.S.elt list
      val union : t -> t -> t
      val inter : t -> t -> t
      val diff : t -> t -> t
      val subset : t -> t -> bool
      val iter : (Hptset.S.elt -> unit) -> t -> unit
      val fold : (Hptset.S.elt -> '-> 'a) -> t -> '-> 'a
      val for_all : (Hptset.S.elt -> bool) -> t -> bool
      val exists : (Hptset.S.elt -> bool) -> t -> bool
      val filter : (Hptset.S.elt -> bool) -> t -> t
      val partition : (Hptset.S.elt -> bool) -> t -> t * t
      val cardinal : t -> int
      val min_elt : t -> Hptset.S.elt
      val max_elt : t -> Hptset.S.elt
      val contains_single_elt : t -> Hptset.S.elt option
      val choose : t -> Hptset.S.elt
      val split : Hptset.S.elt -> t -> t * bool * t
    end
  module Make :
    functor (X : Id_Datatype->
      functor (Initial_Values : sig val v : X.t list list end->
        functor (Datatype_deps : sig val l : State.t list end->
          sig
            type elt = X.t
            type t
            val ty : t Type.t
            val name : string
            val descr : t Descr.t
            val packed_descr : Structural_descr.pack
            val reprs : t list
            val equal : t -> t -> bool
            val compare : t -> t -> int
            val hash : t -> int
            val pretty_code : Format.formatter -> t -> unit
            val internal_pretty_code :
              Type.precedence -> Format.formatter -> t -> unit
            val pretty : Format.formatter -> t -> unit
            val varname : t -> string
            val mem_project : (Project_skeleton.t -> bool) -> t -> bool
            val copy : t -> t
            val empty : t
            val is_empty : t -> bool
            val mem : elt -> t -> bool
            val add : elt -> t -> t
            val singleton : elt -> t
            val remove : elt -> t -> t
            val elements : t -> elt list
            val union : t -> t -> t
            val inter : t -> t -> t
            val diff : t -> t -> t
            val subset : t -> t -> bool
            val iter : (elt -> unit) -> t -> unit
            val fold : (elt -> '-> 'a) -> t -> '-> 'a
            val for_all : (elt -> bool) -> t -> bool
            val exists : (elt -> bool) -> t -> bool
            val filter : (elt -> bool) -> t -> t
            val partition : (elt -> bool) -> t -> t * t
            val cardinal : t -> int
            val min_elt : t -> elt
            val max_elt : t -> elt
            val contains_single_elt : t -> elt option
            val choose : t -> elt
            val split : elt -> t -> t * bool * t
            val self : State.t
          end
end