Module Named.Declaration
Representation of local declarations.
type ('constr, 'types) pt=|LocalAssum of Names.Id.t binder_annot * 'typesidentifier, type
|LocalDef of Names.Id.t binder_annot * 'constr * 'typesidentifier, value, type
val get_annot : (_, _) pt -> Names.Id.t binder_annotval get_id : ('c, 't) pt -> Names.Id.tReturn the identifier bound by a given declaration.
val get_value : ('c, 't) pt -> 'c optionReturn
Some valuefor local-declarations andNonefor local-assumptions.
val get_type : ('c, 't) pt -> 'tReturn the type of the name bound by a given declaration.
val get_relevance : ('c, 't) pt -> Sorts.relevanceval set_id : Names.Id.t -> ('c, 't) pt -> ('c, 't) ptSet the identifier that is bound by a given declaration.
val set_type : 't -> ('c, 't) pt -> ('c, 't) ptSet the type of the bound variable in a given declaration.
val is_local_assum : ('c, 't) pt -> boolReturn
trueiff a given declaration is a local assumption.
val is_local_def : ('c, 't) pt -> boolReturn
trueiff a given declaration is a local definition.
val exists : ('c -> bool) -> ('c, 'c) pt -> boolCheck whether any term in a given declaration satisfies a given predicate.
val for_all : ('c -> bool) -> ('c, 'c) pt -> boolCheck whether all terms in a given declaration satisfy a given predicate.
val equal : ('c -> 'c -> bool) -> ('c, 'c) pt -> ('c, 'c) pt -> boolCheck whether the two given declarations are equal.
val map_id : (Names.Id.t -> Names.Id.t) -> ('c, 't) pt -> ('c, 't) ptMap the identifier bound by a given declaration.
val map_value : ('c -> 'c) -> ('c, 't) pt -> ('c, 't) ptFor local assumptions, this function returns the original local assumptions. For local definitions, this function maps the value in the local definition.
val map_type : ('t -> 't) -> ('c, 't) pt -> ('c, 't) ptMap the type of the name bound by a given declaration.
val iter_constr : ('c -> unit) -> ('c, 'c) pt -> unitPerform a given action on all terms in a given declaration.
val fold_constr : ('c -> 'a -> 'a) -> ('c, 'c) pt -> 'a -> 'aReduce all terms in a given declaration to a single value.
val to_tuple : ('c, 't) pt -> Names.Id.t binder_annot * 'c option * 'tval of_tuple : (Names.Id.t binder_annot * 'c option * 't) -> ('c, 't) ptval drop_body : ('c, 't) pt -> ('c, 't) ptTurn
LocalDefintoLocalAssum, identity otherwise.
val of_rel_decl : (Names.Name.t -> Names.Id.t) -> ('c, 't) Rel.Declaration.pt -> ('c, 't) ptConvert
Rel.Declaration.tvalue to the correspondingNamed.Declaration.tvalue. The function provided as the first parameter determines how to translate "names" to "ids".
val to_rel_decl : ('c, 't) pt -> ('c, 't) Rel.Declaration.ptConvert
Named.Declaration.tvalue to the correspondingRel.Declaration.tvalue.