package rotor

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

Module Module

Functions for manipulating module elements in the AST

type name_t = string

unwrap_expr me strips the module expression me of its module type constraints, and returns them along with the inner module expression.

unwind_expr me first strips the module expression me of its module type constraints, and then collects any module expressions that are used as arguments along with any module type constraints of the module expression that each is applied to, and then returns these with the inner module expression. For example, if me is of the following form:

(( ... ((me' : mtys_1) (me_1)) ... : mtys_n) (me_n)) : mtys_0

then unwind_expr me returns:

(me', (me_1, mtys_1); ...; (me_n, mtys_n), mtys_0).

module Binding : sig ... end