Module Gist.View

Views for gist processors.

type ('a, 'b) t

The type for types represented by another type.

val make : inject:('a -> 'b) -> project:('b -> 'a) -> 'b gist -> ('a, 'b) t

make ~inject ~project g is a view with given parameters.

val inject : ('a, 'b) t -> 'a -> 'b

inject v is the injection function of v.

val project : ('a, 'b) t -> 'b -> 'a

project v is the projection function of v.

val gist : ('a, 'b) t -> 'b gist

gist v is the gist for the range of v.