package pfff

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tok = Parse_info.t
type 'a wrap = 'a * tok
type 'a bracket = tok * 'a * tok
type ident = string wrap
type name = qualifier * ident
and qualifier = ident list
type type_ =
  1. | TyName of name
  2. | TyVar of ident
  3. | TyFunction of type_ * type_
  4. | TyApp of type_ list * name
  5. | TyTuple of type_ list
type expr =
  1. | L of literal
  2. | Name of name
  3. | Constructor of name * expr option
  4. | Tuple of expr list
  5. | List of expr list bracket
  6. | Sequence of expr list
  7. | Prefix of string wrap * expr
  8. | Infix of expr * string wrap * expr
  9. | Call of expr * argument list
  10. | RefAccess of tok * expr
  11. | RefAssign of expr * tok * expr
  12. | FieldAccess of expr * tok * name
  13. | FieldAssign of expr * tok * name * tok * expr
  14. | Record of expr option * (name * expr) list bracket
  15. | New of tok * name
  16. | ObjAccess of expr * tok * ident
  17. | LetIn of let_binding list * expr * rec_opt
  18. | Fun of parameter list * expr
  19. | Nop
  20. | If of tok * expr * expr * expr
  21. | Match of expr * match_case list
  22. | Try of tok * expr * match_case list
  23. | While of tok * expr * expr
  24. | For of tok * ident * expr * for_direction * expr * expr
and literal =
  1. | Int of string wrap
  2. | Float of string wrap
  3. | Char of string wrap
  4. | String of string wrap
and argument =
  1. | Arg of expr
  2. | ArgKwd of ident * expr
  3. | ArgQuestion of ident * expr
and match_case = pattern * match_action
and match_action = expr * expr option
and for_direction =
  1. | To of tok
  2. | Downto of tok
and rec_opt = tok option
and pattern =
  1. | PatVar of ident
  2. | PatLiteral of literal
  3. | PatConstructor of name * pattern option
  4. | PatConsInfix of pattern * tok * pattern
  5. | PatTuple of pattern list
  6. | PatList of pattern list bracket
  7. | PatUnderscore of tok
  8. | PatRecord of (name * pattern) list bracket
  9. | PatAs of pattern * ident
  10. | PatDisj of pattern * pattern
  11. | PatTyped of pattern * type_
and let_binding =
  1. | LetClassic of let_def
  2. | LetPattern of pattern * expr
and let_def = {
  1. lname : ident;
  2. lparams : parameter list;
  3. lbody : expr;
}
and parameter = pattern
type type_declaration = {
  1. tname : ident;
  2. tparams : type_parameter list;
  3. tbody : type_def_kind;
}
and type_parameter = ident
and type_def_kind =
  1. | AbstractType
  2. | CoreType of type_
  3. | AlgebricType of (ident * type_ list) list
  4. | RecordType of (ident * type_ * tok option) list bracket
type module_declaration = {
  1. mname : ident;
  2. mbody : module_expr;
}
and module_expr =
  1. | ModuleName of name
  2. | ModuleStruct of item list
and item =
  1. | Type of type_declaration list
  2. | Exception of ident * type_ list
  3. | External of ident * type_ * string wrap list
  4. | Open of name
  5. | Val of ident * type_
  6. | Let of rec_opt * let_binding list
  7. | Module of module_declaration
type program = item list
type any =
  1. | T of type_
  2. | E of expr
  3. | P of pattern
  4. | I of item
  5. | Pr of program
val str_of_ident : ('a * 'b) -> 'a
val info_of_ident : ('a * 'b) -> 'b
val ident_of_name : ('a * 'b) -> 'b
val qualifier_of_name : ((string * 'a) list * 'b) -> string