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 ->
    ?docs:Docstrings.docs ->
    Parsetree.class_field_desc -> Parsetree.class_field
  val attr :
    Parsetree.class_field -> Parsetree.attribute -> Parsetree.class_field
  val inherit_ :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Asttypes.override_flag ->
    Parsetree.class_expr -> string option -> Parsetree.class_field
  val val_ :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Ast_helper.str ->
    Asttypes.mutable_flag ->
    Parsetree.class_field_kind -> Parsetree.class_field
  val method_ :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Ast_helper.str ->
    Asttypes.private_flag ->
    Parsetree.class_field_kind -> Parsetree.class_field
  val constraint_ :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs ->
    Parsetree.core_type -> Parsetree.core_type -> Parsetree.class_field
  val initializer_ :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs -> Parsetree.expression -> Parsetree.class_field
  val extension :
    ?loc:Ast_helper.loc ->
    ?attrs:Ast_helper.attrs -> Parsetree.extension -> Parsetree.class_field
  val attribute :
    ?loc:Ast_helper.loc -> Parsetree.attribute -> Parsetree.class_field
  val text : Docstrings.text -> Parsetree.class_field list
  val virtual_ : Parsetree.core_type -> Parsetree.class_field_kind
  val concrete :
    Asttypes.override_flag ->
    Parsetree.expression -> Parsetree.class_field_kind
end