package dolmen_type

  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.t -> 'a -> unit

Set the value bound to a tag.

val get_tag : t -> 'a Tag.t -> 'a option

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

val add_tag : t -> 'a list Tag.t -> 'a -> unit

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

val get_tag_list : t -> 'a list Tag.t -> 'a list

Returns all the values tagged on a variable.

val unset_tag : t -> _ Tag.t -> unit

Remove the binding to a tag.

OCaml

Innovation. Community. Security.