Quick StartTryGuideAPICommunityBlogGitHub

Standard Library

Below is the API for the OCaml standard library. It's directly copied over from the OCaml Manual, formatted to the Reason syntax and styled accordingly. The API docs are work-in-progress; we'll be polishing these gradually!

If you're targeting JavaScript, the API docs for BuckleScript includes all of below, plus JS-specific APIs.

sig

  val mk :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Parsetree.class_expr_desc -> Parsetree.class_expr
  val attr :
    Parsetree.class_expr -> Parsetree.attribute -> Parsetree.class_expr
  val constr :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Ast_helper.lid -> Parsetree.core_type list -> Parsetree.class_expr
  val structure :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Parsetree.class_structure -> Parsetree.class_expr
  val fun_ :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Asttypes.label ->
    Parsetree.expression option ->
    Parsetree.pattern -> Parsetree.class_expr -> Parsetree.class_expr
  val apply :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Parsetree.class_expr ->
    (Asttypes.label * Parsetree.expression) list -> Parsetree.class_expr
  val let_ :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Asttypes.rec_flag ->
    Parsetree.value_binding list ->
    Parsetree.class_expr -> Parsetree.class_expr
  val constraint_ :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Parsetree.class_expr -> Parsetree.class_type -> Parsetree.class_expr
  val extension :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs -> Parsetree.extension -> Parsetree.class_expr
end