Module Tjr_lib_core

Interface to tjr_lib_core package functionality.

Prelude

include Tjr_lib_core__.Util
val dest_Some : 'a option -> 'a
val dest_Ok : ('a'b) Stdlib.result -> 'a

Misc

module Map_string = Tjr_lib_core__.Util.Map_string
module Set_string = Tjr_lib_core__.Util.Set_string
module Int_ : sig ... end
module List_ : sig ... end

Extra list functions; see also Core_kernel.List or even Base.List

module Iter : sig ... end

Various iteration operators

include Iter
val iter_opt : ('a -> 'a option) -> 'a -> 'a
type ('a, 'b) break_or_cont =
| Break of 'a
| Cont of 'b
val iter_break : ('a -> ('b'a) break_or_cont) -> 'a -> 'b

Iterate until reach break

val iter_k : (k:('a -> 'b) -> 'a -> 'b) -> 'a -> 'b

Essentially the Y combinator; useful for anonymous recursive functions. The k argument is the recursive callExample:

iter_k (fun ~k n -> 
    if n = 0 then 1 else n * k (n-1))
module String_ : sig ... end

Extras

module Tjr_map : sig ... end
module Exhaustive_testing : sig ... end

Exhaustive state-space exploration for testing

module Gensym : sig ... end
module Global : sig ... end

A global state manager which Keeps track of eg config, bool vars etc

module Tjr_store : sig ... end

A functional store.

type fstore = Tjr_store.fstore
module Args_ : sig ... end

Simple command line processing

module Singleton_type : sig ... end

The type of singleton types.

type ('a, 'b) sng = ('a'b) Singleton_type.sng
val dest_sng : ('a'b) Singleton_type.sng -> 'b
module Tjr_lru : sig ... end

LRU based on pqwy

type ('k, 'v, 't) lru_ops = ('k'v't) Tjr_lru.lru_ops
module Lru_two_gen = Lru_two_gen_v3
module Lru_two_gen_v3 : sig ... end
module Lru_two_gen_v3pure : sig ... end

Internal module

module Lru_with_slow_operations : sig ... end
module Intexable : sig ... end

Values indexed by int are quite common.

module Linear : sig ... end

Faking linear values

module Seq_obj : sig ... end

Sequences

val seq_f : < drop : int -> 'a Seq_obj.seq2 -> 'a Seq_obj.seq2; make : ('a -> 'a) -> 'a -> < get : 'a; next : 'b; > as 'b; map : ('a -> 'c) -> 'a Seq_obj.seq2 -> 'c Seq_obj.seq2; peek : int -> 'a Seq_obj.seq2 -> 'a list; peek_filter : int -> 'a option Seq_obj.seq2 -> 'a list; read : int -> 'a Seq_obj.seq2 -> 'a list * 'a Seq_obj.seq2; read_filter : int -> 'a option Seq_obj.seq2 -> 'a list * 'a option Seq_obj.seq2; >

Logging and test control

module Logger : sig ... end

A global logger.

module Log : sig ... end
module Test : sig ... end

Support for testing. Testing can be enabled/disabled.

module Tjr_show : sig ... end

Convert expressions to strings for debugging and logging, via sexps; uses ppx_sexp_message