mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-13 06:20:55 -05:00
51 lines
986 B
OCaml
51 lines
986 B
OCaml
open Types_
|
|
|
|
type select = Types_.select = {
|
|
select_id: ID.t;
|
|
select_cstor: cstor;
|
|
select_ty: ty lazy_t;
|
|
select_i: int;
|
|
}
|
|
|
|
type cstor = Types_.cstor = {
|
|
cstor_id: ID.t;
|
|
cstor_is_a: ID.t;
|
|
mutable cstor_arity: int;
|
|
cstor_args: select list lazy_t;
|
|
cstor_ty_as_data: data;
|
|
cstor_ty: ty lazy_t;
|
|
}
|
|
|
|
type t = data = {
|
|
data_id: ID.t;
|
|
data_cstors: cstor ID.Map.t lazy_t;
|
|
data_as_ty: ty lazy_t;
|
|
}
|
|
|
|
type Const.view +=
|
|
private
|
|
| Data of data
|
|
| Cstor of cstor
|
|
| Select of select
|
|
| Is_a of cstor
|
|
|
|
include Sidekick_sigs.EQ_HASH_PRINT with type t := t
|
|
|
|
module Select : sig
|
|
type t = select
|
|
|
|
include Sidekick_sigs.EQ_HASH_PRINT with type t := t
|
|
end
|
|
|
|
module Cstor : sig
|
|
type t = cstor
|
|
|
|
include Sidekick_sigs.EQ_HASH_PRINT with type t := t
|
|
end
|
|
|
|
val data : Term.store -> t -> Term.t
|
|
val cstor : Term.store -> cstor -> Term.t
|
|
val select : Term.store -> select -> Term.t
|
|
val is_a : Term.store -> cstor -> Term.t
|
|
|
|
(* TODO: select_ : store -> cstor -> int -> term *)
|