File: table.mli

package info (click to toggle)
coq-doc 8.20.0-2
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 46,708 kB
  • sloc: ml: 234,429; sh: 4,686; python: 3,359; ansic: 2,644; makefile: 842; lisp: 172; javascript: 87; xml: 24; sed: 2
file content (49 lines) | stat: -rw-r--r-- 1,368 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
module Align : sig
  type t =
    | Left
    | MidLeft
    | Middle
    | MidRight
    | Right
  (** Type of Alignments. During the justification phase of printing, the
    alignment decides how much space should be left on the left and right of the
    data. *)
end

type sized_string = { str : string; size : int }
(** String with a display size. [size] is usually but not always
    [String.length str] (or rather unicode length but currently no unicode support). *)

type header = sized_string
type row = sized_string list list

(** Print the table with optional alignment parameters. The alignment parametrs
    must have the same shape as the corresponding data. Due to a limitation of
    OCaml, the entire thing has to be thunked in order for optional arguments to
    come at the end. *)
val print : header list
  -> row
  -> row list
  -> ?align_headers:Align.t list
  -> ?align_top:Align.t list list
  -> ?align_rows:Align.t list list
  -> unit
  -> string

type raw_header = string
type raw_row = string list list

val raw_str : string -> sized_string
(** string which displays as itself *)

val raw_row : raw_row -> row

val raw_print : raw_header list
  -> raw_row
  -> raw_row list
  -> ?align_headers:Align.t list
  -> ?align_top:Align.t list list
  -> ?align_rows:Align.t list list
  -> unit
  -> string
(** Print with display size = string length *)