package catala

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Literate.HtmlSource

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

Sourcemodule Pos = Utils.Pos
Sourcemodule Cli = Utils.Cli
Sourcemodule Errors = Utils.Errors
Sourcemodule P = Printf
Sourcemodule R = Re.Pcre
Sourcemodule C = Cli

Helpers

Sourceval pre_html : string -> string

Converts double lines into HTML newlines.

Sourceval raise_failed_pygments : string -> int -> 'a

Raise an error if pygments cannot be found

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

Usage: wrap_html source_files custom_pygments language fmt wrapped

Prints an HTML complete page structure around the wrapped content.

Sourceval 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

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

API

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

Innovation. Community. Security.