package catala

  1. Overview
  2. Docs

This modules weaves the source code and the legislative text together into a document that law professionals can understand.

module Pos = Utils.Pos
module Cli = Utils.Cli
module Errors = Utils.Errors
module A = Surface.Ast
module P = Stdlib.Printf
module R = Re.Pcre
module C = Cli

Helpers

val pre_html : string -> string

Converts double lines into HTML newlines.

val raise_failed_pygments : string -> int -> 'a

Raise an error if pygments cannot be found

val wrap_html : string list -> string option -> Cli.backend_lang -> Stdlib.Format.formatter -> (Stdlib.Format.formatter -> unit) -> unit

Usage: wrap_html source_files custom_pygments language fmt wrapped

Prints an HTML complete page structure around the wrapped content.

val pygmentize_code : string Pos.marked -> C.backend_lang -> string option -> string

Performs syntax highlighting on a piece of code by using Pygments and the special Catala lexer.

Weaving

val law_article_item_to_html : string option -> C.backend_lang -> Stdlib.Format.formatter -> A.law_article_item -> unit
val law_structure_to_html : string option -> C.backend_lang -> Stdlib.Format.formatter -> A.law_structure -> unit
val program_item_to_html : string option -> C.backend_lang -> Stdlib.Format.formatter -> A.program_item -> unit

API

val ast_to_html : string option -> C.backend_lang -> Stdlib.Format.formatter -> A.program -> unit
OCaml

Innovation. Community. Security.