package rotor

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Elements.Base

This module contains types denoting the various elements found in the language, e.g. values, modules, module types, classes, etc.

Each type consists of just a single nullary constructor - they are essentially type-level tags.

Types denoting the implementation/interface dichotomy.

type impl =
  1. | Impl
    (*

    Implementation level type tag.

    *)
type intf =
  1. | Intf
    (*

    Interface level type tag.

    *)
type _ sort =
  1. | Impl : impl sort
  2. | Intf : intf sort

Primary language constructs - these types are prefixed with an underscore in order to prevent their names clashing with keywords.

type _value =
  1. | Value
type _structure =
  1. | Structure
type _structure_type =
  1. | StructureType
type _functor =
  1. | Functor
type _functor_type =
  1. | FunctorType
type _parameter =
  1. | Parameter
type _ t =
  1. | Value : _value t
  2. | Parameter : _parameter t
  3. | Functor : _functor t
  4. | FunctorType : _functor_type t
  5. | Structure : _structure t
  6. | StructureType : _structure_type t
    (*

    The (generalised) abstract type of language elements.

    *)
type _t =
  1. | Ex : _ t -> _t
    (*

    The existentially quantified abstract type of language elements.

    *)
val equal : 'a t -> 'b t -> bool

Equality between two abstract language element values.

Pretty printer for element kinds.

Pretty printer for existential element kinds.

exception KindMismatch of string

Exception indicating that a value is not the right kind of element (value, module, etc.)

OCaml

Innovation. Community. Security.