aboutsummaryrefslogtreecommitdiffstats
path: root/lib/concepts/Mode.mli
blob: ba1a04acb5634721fed33d52632ae276e377854c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
type attributes = BatSet.String.t

(** given [bound], every matching tuple can be produced, and there are
    at most [yields]. *)
type mode = {bound: attributes; yields: Cardinality.t}

type t = mode list

val mode : string list -> Cardinality.t -> mode
val generation : t -> attributes -> Cardinality.t option
val exhaustible : t -> attributes -> bool

(** the modes still usable when only [attributes] can be bound. *)
val project : attributes -> t -> t

val given : attributes -> t -> t