Module Context

The modules defined below represent a local context as defined by Chapter 4 in the Reference Manual:

A local context is an ordered list of of local declarations of names that we call variables.

A local declaration of some variable can be either:

Local assumptions are denoted in the Reference Manual as (name : typ) and local definitions are there denoted as (name := value : typ).

type ('a, 'r) pbinder_annot = {
binder_name : 'a;
binder_relevance : 'r;
}
val eq_annot : ('a -> 'a -> bool) -> ('r -> 'r -> bool) -> ('a'r) pbinder_annot -> ('a'r) pbinder_annot -> bool
val hash_annot : ('a -> int) -> ('aSorts.relevance) pbinder_annot -> int
val map_annot : ('a -> 'b) -> ('a'r) pbinder_annot -> ('b'r) pbinder_annot
val map_annot_relevance : ('r1 -> 'r2) -> ('a'r1) pbinder_annot -> ('a'r2) pbinder_annot
val make_annot : 'a -> 'r -> ('a'r) pbinder_annot
val binder_name : ('a'r) pbinder_annot -> 'a
val binder_relevance : ('a'r) pbinder_annot -> 'r
val annotR : 'a -> ('aSorts.relevance) pbinder_annot

Always Relevant

Relevant + Name

Relevant + Anonymous

module Rel : sig ... end

Representation of contexts that can capture anonymous as well as non-anonymous variables. Individual declarations are then designated by de Bruijn indexes.

module Named : sig ... end

This module represents contexts that can capture non-anonymous variables. Individual declarations are then designated by the identifiers they bind.

module Compacted : sig ... end