package ocamlformat-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Infix_op_arg : sig ... end
val wrap : Conf.t -> ?disambiguate:Ocamlformat_stdlib.bool -> ?fits_breaks:Ocamlformat_stdlib.bool -> ?offset_closing_paren:Ocamlformat_stdlib.int -> parens:Ocamlformat_stdlib.bool -> Fmt.t -> Fmt.t
val box_fun_decl_args : ctx:Ast.t -> ctx0:Ast.t -> ?last_arg:Ocamlformat_stdlib.bool -> ?epi:Fmt.t -> Conf.t -> parens:Ocamlformat_stdlib.bool -> kw:Fmt.t -> args:Fmt.t -> annot:Fmt.t Ocamlformat_stdlib.option -> Fmt.t

Box and assemble the parts kw (up to the arguments), args and annot.

val break_fun_kw : Conf_t.t -> ctx:Ast.t -> ctx0:Ast.t -> last_arg:Ocamlformat_stdlib.bool -> Fmt.t
val box_fun_expr : Conf.t -> source:Source.t -> ctx0:Ast.t -> ctx:Ast.t -> (Fmt.t -> Fmt.t) * Ocamlformat_stdlib.int

return a box with an indent and minus the value of the indent to be used for a closing parenthesis

val box_function_cases : Conf.t -> ?indent:Ocamlformat_stdlib.int -> ctx:Ast.t -> ctx0:Ast.t -> parens:Ocamlformat_stdlib.bool -> Fmt.t -> Fmt.t
val function_attrs_sp : Conf.t -> ctx0:Ast.t -> ctx:Ast.t -> Ocamlformat_stdlib.bool

Whether a space should be added between the function keyword and the attributes.

val break_fun_decl_args : Conf.t -> ctx:Ast.t -> last_arg:Ocamlformat_stdlib.bool -> Fmt.t
val single_line_function : ctx:Ast.t -> ctx0:Ast.t -> args:'a Ocamlformat_stdlib.list -> Ocamlformat_stdlib.bool
val box_fun_decl : ctx0:Ast.t -> Conf.t -> Fmt.t -> Fmt.t

Box a function decl from the label to the arrow.

OCaml

Innovation. Community. Security.