package pla
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=f4886e3fc2051f56f1bffe80a2687081
sha512=b8b1ee2dfcc06923ed44bccbaf72e74ebd49b4c0daddb194d999bfac397b574ef65ba7493a4e53670d6c6ca9b2dd75a298d5c735689df220a7cc340c1731e1c9
doc/pla/Pla/index.html
Module Pla
Builtin templates
val unit : tEmpty template
val newline : tTemplate for a new line
val comma : tTemplate for a comma ','
val commaspace : tTemplate for a comma followed by a space ', '
val semi : tTemplate for a semicolon ';'
val space : tTemplate for a white space ' '
Templates of basic types
val string : string -> tstring str makes a template from a string str
val int : int -> tint i makes a template from an integer value i
val float : float -> tfloat f makes a template from a float value
val bool : bool -> tbool b makes a template from a bool value that produces 'true' or 'false'
val string_quoted : string -> tstring_quoted str makes a template from a string str but the contents are quoted
Functions to wrap templates
wrap left right t makes new template wrapped by the left and right templates
Functions to append templates
append t1 t2 makes a new template with the contents of t1 followed by the contents of t2
join sep elems makes a new template by appending the list elems of templates separated by sep
join_sep_all sep elems similar to join_sep sep elems but also adds the separator after the last element
map_join f elems makes a new template by applying the function f to the list elems and appending them
map_sep sep f elems makes a new template by applying the function f to the list elems and appending them separated by the template sep
map_sep_all sep f elems similar to map_sep sep f elems but also adds the separator after the last element
Printing of templates
val print : t -> stringprint t returns the contents template t as a string
val write : string -> t -> unitwrite file t writes the contents of template t to file file
val buffer_newline : buffer -> unitval buffer_indent : buffer -> unitval buffer_outdent : buffer -> unitval buffer_append : buffer -> string -> unitval create : string -> compiled