Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Type

module Type : sig..end

type name = string
type qname = name list
module NameMap : Map.Swith type key = string
module NameSet : Set.Swith type elt = string
type param = name * [ `Minus | `Plus ] option
type decl = name * param list * rhs * constraint_ list * bool
type rhs = 
  [ `Expr of expr
  | `Fresh of expr option * repr * [ `Private | `Public ]
  | `Nothing
  | `Variant of variant * [ `Private | `Public ] ]
type repr =  | Sum of summand list | GSum of name * gsummand list | Record of field list
type field = name * poly_expr * [ `Immutable | `Mutable ]
type summand = name * expr list
type gsummand = name * expr list * expr list
type constraint_ = expr * expr
type expr = 
  [ `Class of [ `NYI ]
  | `Constr of qname * expr list
  | `Function of expr * expr
  | `GParam of param * expr
  | `Label of [ `NonOptional | `Optional ] * name * expr * expr
  | `Object of [ `NYI ]
  | `Param of param
  | `Tuple of expr list ]
type poly_expr = param list * expr
type variant = [ `Eq | `Gt | `Lt ] * tagspec list
type tagspec =  | Tag of name * expr list | Extends of expr
module ParamSet : Set.Swith type elt = param
module ParamMap : Map.Swith type key = param
module ExprSet : Set.Swith type elt = expr
module ExprMap : Map.Swith type key = expr
module ESet : Set.Swith type elt = name * expr list
module EMap : Map.Swith type key = name * expr list
val free_tvars : expr -> ParamSet.t
val contains_tvars : expr -> bool
val contains_tvars_decl : decl -> bool
type subst = expr NameMap.t
val build_subst : (name * expr) list -> subst
val substitute_decl : subst -> decl -> decl
val substitute_expr : subst -> expr -> expr
val substitute_rhs : subst -> rhs -> rhs
val substitute_constraint : subst -> constraint_ -> constraint_
val rename_rhs : name NameMap.t -> rhs -> rhs
val rename_constraint : name NameMap.t -> constraint_ -> constraint_
class virtual ['a] fold :  object..end
class transform :  object..end
module Translate : sig..end
module type Untranslate = sig..end
module Untranslate : functor (C : sig      val _loc : Camlp4.PreCast.Ast.Loc.tend) -> 
  Untranslate
val print_expr : expr -> string
val print_rhs : rhs -> string