package dolmen

  1. Overview
  2. Docs

A module for variables that occur in types.

type t

The type of variables the can occur in types

val compare : t -> t -> int

Comparison function on variables.

val print : Stdlib.Format.formatter -> t -> unit

Printing function.

val mk : string -> t

Create a new type variable with the given name.

val wildcard : unit -> t

Create a fresh type wildcard.

val is_wildcard : t -> bool

Is the variable a type wildcard ?

val set_tag : t -> 'a tag -> 'a -> unit

Set the value bound to a tag.

val get_tag : t -> 'a tag -> 'a option

Return the value bound to a tag (if any).

val add_tag : t -> 'a list tag -> 'a -> unit

Add a value to the list of values bound to a tag.

val get_tag_list : t -> 'a list tag -> 'a list

Returns all the values tagged on a variable.

val unset_tag : t -> _ tag -> unit

Remove the binding to a tag.

OCaml

Innovation. Community. Security.