package acgtk

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

This module provides some useful modules or functions

module StringSet : Stdlib.Set.S with type elt = Stdlib.String.t

StringSet is a module for sets of strings

module StringMap : Stdlib.Map.S with type key = Stdlib.String.t

StringMap is module for maps from strings to type 'a

module IntMap : Stdlib.Map.S with type key = int

IntMap is a module for maps from int to type 'a

module IntSet : Stdlib.Set.S with type elt = int

IntSet is a module for sets of int

val string_of_list : string -> ('a -> string) -> 'a list -> string

string_of_list sep to_string [a_1;...;a_n] returns a string made of the strings to_string a_1 ... to_string a_n concatenated with the separator sep between each of the elements (if the list is of length greater than 2)

val pp_list : ?sep:(unit, Stdlib.Format.formatter, unit, unit, unit, unit) Stdlib.format6 -> ?terminal: (unit, Stdlib.Format.formatter, unit, unit, unit, unit) Stdlib.format6 -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a list -> unit

pp_list ~sep ppf fmt l pretty prints on the formater fmt the items of the list l, each of them being pretty-printed by ppf. Example usage: pp_list ~sep:",@\n" Format.pp_print_int Format.std_formatter [1;2;3]

val pp_list_i : ?sep:(unit, Stdlib.Format.formatter, unit, unit, unit, unit) Stdlib.format6 -> ?terminal: (unit, Stdlib.Format.formatter, unit, unit, unit, unit) Stdlib.format6 -> (Stdlib.Format.formatter -> (int * 'a) -> unit) -> Stdlib.Format.formatter -> 'a list -> unit

pp_list_i ~sep ppf fmt l pretty prints on the formater fmt the items of the list l, each of them, together with its position (starting at 1) being pretty-printed by ppf.

val pp_text : Stdlib.Format.formatter -> string -> unit

pp_text fmt t pretty prints on the formater fmt the text of of the string t.

val intersperse : 'a -> 'a list -> 'a list

intersperse sep [a_1;...;a_n] returns a list where elements of the input list are interspersed with sep as in a_1; sep; a_2; sep; ...; sep; a_n.

val cycle : int -> 'a list -> 'a list

cycle n xs returns the first n elements of the infinite list formed by cyclically repeating the elements of xs. Returns the empty list if xs is empty.

val fold_left1 : ('a -> 'a -> 'a) -> 'a list -> 'a

fold_left1 plus elems sums up the elements in elems using plus. A generalization of List.fold_left from monoids to semigroups, where we don't have any neutral element. Assumes elems is non-empty.

val term_set_size : unit -> unit
val sterm_set_size : unit -> unit
val fterm_set_size : Stdlib.Format.formatter -> unit
val no_pp : unit -> unit
val fformat : Stdlib.Format.formatter -> ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a
val format : ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a
val sformat : ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a
val format_of_list : Stdlib.Format.formatter -> string -> ('a -> string) -> 'a list -> unit
val bold_pp : Stdlib.Format.formatter -> string -> unit
val blue_pp : Stdlib.Format.formatter -> string -> unit
val red_pp : Stdlib.Format.formatter -> string -> unit
val green_pp : Stdlib.Format.formatter -> string -> unit
val magenta_pp : Stdlib.Format.formatter -> string -> unit
val yellow_pp : Stdlib.Format.formatter -> string -> unit
val fun_pp : Stdlib.Format.formatter -> string -> unit
val sig_pp : Stdlib.Format.formatter -> string -> unit
val lex_pp : Stdlib.Format.formatter -> string -> unit
val terms_pp : Stdlib.Format.formatter -> string -> unit
val binary_pp : Stdlib.Format.formatter -> string -> unit
val string_of_list_rev : string -> ('a -> string) -> 'a list -> string

string_of_list_rev sep to_string [a_1;...;a_n] returns a string made of the strings to_string a_n ... to_string a_1 concatenated with the separator sep between each of the elements (if the list is of length greater than 2)

val find_file : string -> string list -> Error.pos -> string

find_file f dirs tries to find a file with the name f in the directories listed in dirs. If it finds it in dir, it returns the full name Filename.concat dir f. To check in the current directory, add "" to the list. It tries in the directories of dirs in this order and stops when it finds such a file. If it can't find any such file, raise the exception No_file(f,msg) where msg contains a string describing where the file f was looked for.

val (>>) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c

This function is useless when Bolt log level is NONE

val decompose : input:int -> base:int -> int list

decompose ~input:i ~base:b returns the decomposition of i in the base b as a list of integers (between 0 and b).

OCaml

Innovation. Community. Security.