AcutisThis is the main API wrapper around the compiler internals (Acutis_internals).
type 'a compile_result := message list * 'a optionThe result of a compile computation. The first value is a list of warnings and error messages. If the second value is Some then the computation succeeded. If None, then it failed for the reasons in the messages. A successful computation may have warning messages.
A template component. Parameter 'a is the type of external components, which may either be a function or a js_import.
Convert a parsed Acutis template into a component. The string is the name the component is called in Acutis code.
Convert a function or a js_import into a template component. The string is the name the component is called in Acutis code.
val comps_compile : 'a comp Stdlib.Seq.t -> 'a comps_compiled compile_resultType-check, optimize, and link the components.
val comps_empty : 'a comps_compiledval parse : Stdlib.Lexing.lexbuf -> parsed compile_resultParse a component. This does not type-check, optimize, or link yet.
val compile : 'a comps_compiled -> parsed -> 'a compiled compile_resultType-check, optimize, and link the template with its components.
val compile_interface : Stdlib.Lexing.lexbuf -> interface compile_resultParse and type-check a type interface with no template.
module type DECODABLE = sig ... endA specification for decoding and encoding input data.
module type CONFIG = sig ... endA specification to configure the runtime instructions.
module Config_default : CONFIGConfiguration values that cover common needs.
module Of_decodable (_ : CONFIG) (D : DECODABLE) : sig ... endA functor that builds functions to render templates and construct type interfaces from decodable data.
val js_import : module_path:string -> function_path:string -> js_importA functor that builds functions to print JavaScript modules.
val pp_message : Stdlib.Format.formatter -> message -> unitPretty-print an error message.
val pp_interface : Stdlib.Format.formatter -> interface -> unitPretty-print a type interface in Acutis syntax.
val pp_ast : Stdlib.Format.formatter -> parsed -> unitPretty-print a template's abstract syntax tree in S-expression syntax.
val pp_compiled : Stdlib.Format.formatter -> _ compiled -> unitPretty-print a fully-compiled template in S-expression syntax.
val pp_instructions :
(module CONFIG) ->
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
'a compiled ->
unitPretty-print runtime instructions in S-expression syntax.
val pp_js_import : Stdlib.Format.formatter -> js_import -> unitPretty-print JavaScript import data in S-expression syntax.