| (&&.) [Generic_util_fun] | (f &&. g) x = f x && g x
|
| (-<) [Generic_util_fun] | (g -< f) x = g (f x)
|
| (-<) [Generic_util_list] | |
| (>-) [Generic_util_fun] | (f >- g) x = g (f x)
|
| (>>.) [Generic_util_fun] | (f >>. g) x = f x ; g x
|
A | |
| add_con [Generic_core_desc.Ext] | add_con ext c adds c to the constructors of
extensible type described by ext
|
| all [Generic_util_monoid] |
Boolean monoid under conjunction.
|
| anti_unify [Generic_core_antiunify] |
Anti-unification for type patterns.
|
| any [Generic_core_ty] |
any == Any
|
| any [Generic_util_monoid] |
Boolean monoid under disjunction.
|
| app_of_mon [Generic_util_monad] | |
| append_plate [Generic_fun_multiplate] | |
| arity [Generic_core_desc.Con] |
The arity of a constructor is the number of its arguments.
|
| array [Generic_core_ty] |
array == Array Any
|
| ask [Generic_util_monad.Reader] | |
C | |
| c0 [Generic_core_desc.Con] |
Builds a constant constructor.
|
| children [Generic_fun_multiplate] | |
| children [Generic_fun_uniplate] |
The list of children of type
a of a value of type a
|
| children_d [Generic_fun_multiplate] | children is a generic function that computes a list of
dynamic values which are the immediate children of the given
value.
|
| coerce [Generic_core_equal] |
Coerces a value between two intensionally equal types.
|
| compose [Generic_fun_multiplate] | |
| compose_left_id [Generic_fun_multiplate] | |
| compose_monad [Generic_fun_multiplate] | |
| compose_right_id [Generic_fun_multiplate] | |
| con [Generic_core_desc.Ext] | con ext x
|
| con [Generic_core_desc.Con] | |
| con [Generic_core_ty_desc] | con x is the constructor of x.
|
| con_id [Generic_util_obj] |
Discriminates each constructor of a variant datatype by
returning a distinct pair of (bool,int) for each of them.
|
| con_list [Generic_core_desc.Ext] |
returns the current list of constructors
|
| con_list [Generic_core_desc.Variant] | |
| conap [Generic_view_conlist] | |
| conap [Generic_core_desc.Poly] |
Deconstructs a value of a polymorphic variant into the pair of its constructor and its arguments.
|
| conap [Generic_core_desc.Ext] |
Deconstructs a value into a pair of a constructor and its arguments.
|
| conap [Generic_core_desc.Variant] |
O(1).
|
| conap [Generic_core_desc.Con] | |
| conap [Generic_core_ty_desc] |
Constructor application: the pair of a constructor and its list of arguments.
|
| concat_map [Generic_util_list] |
concat_map is the flipped bind operator of the list monad
|
| conpat [Generic_core_ty] | conpat computes a constructor pattern:
|
| conpat' [Generic_core_ty] | conpat' is the ty' version of conpat, working on index-less type codes.
|
| cons [Generic_core_desc.Variant] |
Builds a
'v cons from a list of constructor descriptions.
|
| cons [Generic_util_list] | cons is useful when we want partial application of the list constructor.
|
| const [Generic_util_applicative] | |
| const [Generic_util_functor] | |
| const [Generic_util_fun] |
Constant function, ignore the second argument.
|
| cp0 [Generic_core_desc.Con.Build] | |
| cp1 [Generic_core_desc.Con.Build] | |
| cp2 [Generic_core_desc.Con.Build] | |
| cp3 [Generic_core_desc.Con.Build] | |
| cp4 [Generic_core_desc.Con.Build] | |
| cp5 [Generic_core_desc.Con.Build] | |
| cp6 [Generic_core_desc.Con.Build] | |
| cp7 [Generic_core_desc.Con.Build] | |
| cp8 [Generic_core_desc.Con.Build] | |
| cp9 [Generic_core_desc.Con.Build] | |
| create [Generic_core_consumer] | create name, creates a new closure initially empty:
calling f will raise
Type_pattern_match_failure.
|
| create [Generic_core_extensible] | create name, creates a new closure initially empty:
calling f will raise
Type_pattern_match_failure.
|
| create [Generic_core_desc.Ext] |
Initialises the collection of constructors for an extensible type
|
| cst [Generic_core_desc.Variant] | cst cs returns the list of the constant constructors in cs.
|
| cst_get [Generic_core_desc.Variant] |
O(1).
|
| cst_len [Generic_core_desc.Variant] |
O(1).
|
| curry [Generic_util_fun] | |
| custom_identifier [Generic_util_obj] |
Returns the identifier of a custom block,
or the empty string if the block isn't a custom one.
|
D | |
| decuple [Generic_core_ty] | |
| deepfix [Generic_fun_deepfix] | |
| default [Generic_fun_multiplate] |
the default open-recursive transformation applies its openrec argument to
all the children of a value.
|
| drop_while [Generic_util_list] | |
| dup_if_block [Generic_util_obj] |
Duplicate a block.
|
| dynprod_of_list [Generic_core_product] | |
E | |
| either [Generic_util_sum] | |
| embed_io [Generic_util_monad.IO] |
Embed an effectful computation in the IO monad
|
| empty_elim [Generic_util_sum] |
Empty elimination: anything can be proved from a
falsehood.
|
| eq [Generic_core_ty] |
eq x y == E x = E y
|
| equal [Generic_fun_equal.Equal] | |
| equal [Generic_core_equal] | |
| erase [Generic_util_misc] | erase x is used when only the side effects of a computation are needed, not its value.
|
| ext [Generic_core_equal] |
extends
equal with a new case.
|
| ext [Generic_core_repr] | ext t f extends function repr with a new case for type t defined by f.
|
| ext [Generic_core_desc_fun] | ext pattern new_case extends desc with a new_case corresponding to the types that match pattern.
|
| ext [Generic_core_ty_desc] |
Generic view for
Generic_core_ty.ty: low level description of the type ty itself.
|
| ext_add_con [Generic_core_desc_fun] |
Adds a constructor to an extensible variant.
|
| ext_con [Generic_util_obj] |
Extracts the constructor of an extensible variant
(the from a value which may be a constructor application.
|
| ext_con_id [Generic_util_obj] |
Returns the unique object identifier associated with an extensible constructor.
|
| ext_con_name [Generic_util_obj] |
Returns the constructor name of an extensible variant.
|
| ext_conap [Generic_core_desc_fun] |
Computes the constructor application view for a value of an extensible variant.
|
| ext_fold [Generic_core_desc_fun] | ext_fold t is similar to List.fold_right executed on the list of constructors of the extensible variant witnessed by t.
|
| ext_iter [Generic_core_desc_fun] | ext_iter t f executes f on each constructor registered with the extensible variant witnessed by t.
|
| ext_register [Generic_core_desc_fun] |
Extensible variants are declared with this function.
|
F | |
| family [Generic_fun_multiplate] | |
| family [Generic_fun_uniplate] |
A family is a list of descendents.
|
| family_d [Generic_fun_multiplate] | family is a generic function that computes a list of
dynamic values which are the descendent of a given value, that is:
the value itself and the descendents of its immediate children
|
| fields_all2 [Generic_util_obj] | fields_all p x y holds iff x and y are both be block of the same size,
and the binary predicate p holds for all their fields:
|
| filter_some [Generic_util_list] | |
| find [Generic_core_desc.Poly] | |
| find_index [Generic_util_list] | find_index p xs is the index of the first element of xs for which the predicate p is true:
p (List.nth xs (find_index p xs)) == true
and (n < find_index p xs ==> p (List.nth xs n) == false
|
| find_opt [Generic_util_list] | findOpt p xs returns Some x if x is the first
element of the list xs verifying the predicate p.
|
| find_some [Generic_util_list] | |
| first [Generic_util_monoid] |
Option monoid returning the leftmost non-Nothing value.
|
| fix [Generic_core_desc.Ext] |
Serialising/Deserializing an extensible value (including
exceptions) doesn't preserve structural equality:
|
| flip [Generic_util_fun] |
flip the arguments of a function
|
| float_prod [Generic_util_monoid] |
Multiplicative monoid.
|
| float_sum [Generic_util_monoid] |
Additive monoid.
|
| fold [Generic_core_product] |
Corresponds to
List.fold_right
|
| fold [Generic_core_desc.Ext] | fold ext computes List.foldr on the constructor list.
|
| fold_children [Generic_fun_multiplate] |
Use the plate on each child to get an element of the
monoid, and use the monoid to reduce them to a single
value.
|
| fold_children_d [Generic_fun_multiplate] | |
| fold_children_p [Generic_fun_multiplate] | |
| foldr [Generic_util_list] | foldr c n l = List.fold_right c l n
|
| for_all_in [Generic_util_iter] | for_all_in a b f is the imperative equivalent of
fun a b f -> List.for_all f (from_to a b)
|
| from_bytes [Generic_fun_marshal] | |
| from_channel [Generic_fun_marshal] | |
| from_repr [Generic_fun_marshal] | |
| from_string [Generic_fun_marshal] | |
| from_to [Generic_util_list] | from_to a b = [a; a+1; ... ; b]
|
| fun_of_app [Generic_util_applicative] | |
| fun_of_mon [Generic_util_monad] | |
| functorial [Generic_util_option] | |
G | |
| get [Generic_core_desc.Array.intf] | get a n returns the element at index n of array a.
|
| get [Generic_util_monad.State] | |
| get_array [Generic_util_app] | |
| get_comp [Generic_util_app] | |
| get_const [Generic_util_app] |
Get the argument of the
Const constructor
|
| get_exponential [Generic_util_app] |
Get the argument of the
Exponential constructor
|
| get_id [Generic_util_app] | |
| get_list [Generic_util_app] | |
| get_option [Generic_util_app] | |
| get_some [Generic_util_option] |
Partial function
|
| gsize [Generic_util_obj] |
Either the size of a block
(the number of its fields) or
0 for an immediate
value.
|
| guard [Generic_util_exn] | |
H | |
| hash [Generic_core_desc.Poly] | |
I | |
| id [Generic_util_monad] | |
| id [Generic_util_applicative] | |
| id [Generic_util_functor] | |
| id [Generic_util_fun] |
Identity function
|
| in_range [Generic_util_fun] |
|
| index [Generic_util_list] | index x xs is the index of the first element of xs equal to x.
|
| init [Generic_core_desc.Array.intf] | init n f returns a fresh array of length n,
with element number i initialized to the result of f i.
|
| int_prod [Generic_util_monoid] |
Multiplicative monoid.
|
| int_sum [Generic_util_monoid] |
Additive monoid.
|
| io [Generic_util_monad.IO] |
The IO monad operations
|
| is_con [Generic_util_obj] |
True if the value could be a value of a non-polymorphic
variant type: the value must be either an immediate value or
a block whose tag is within the range of constructor tags.
|
| is_ext_con [Generic_util_obj] |
Returns whether the object is a constructor of an extensible variant.
|
| is_mutable [Generic_core_desc.Field] | |
| iso_id [Generic_util_fun] |
The identity isomorphism
|
| iter [Generic_core_desc.Ext] |
Executes an effectful function on each of the (known)
constructors of an extensible datatype.
|
J | |
| join [Generic_util_monad] | |
L | |
| last [Generic_util_monoid] |
Option monoid returning the rightmost non-Nothing value.
|
| left [Generic_util_sum] | |
| leftist_plus [Generic_util_option] |
Monadic plus, the left argument has priority on the right
in case both options have a value.
|
| length [Generic_core_product] |
Corresponds to
List.length
|
| length [Generic_core_desc.Array.intf] | |
| leq [Generic_core_patterns] |
Partial lexical order on type patterns used to implement
extensible functions allowing nested patterns of any depths.
|
| liftA [Generic_util_applicative] | |
| liftA2 [Generic_util_applicative] | |
| liftA3 [Generic_util_applicative] | |
| liftA4 [Generic_util_applicative] | |
| liftM [Generic_util_monad] | |
| liftM2 [Generic_util_monad] | |
| liftM3 [Generic_util_monad] | |
| liftM4 [Generic_util_monad] | |
| list [Generic_core_ty] |
list == List Any
|
| list [Generic_util_monad] | |
| list [Generic_util_applicative] | |
| list [Generic_util_functor] | |
| list [Generic_util_monoid] |
List monoid
|
| list_of_dynprod [Generic_core_product] |
Dynamic products are isomorphic to lists of dynamic values
|
| list_of_prod [Generic_core_product] |
Forgetting the type index
'a, we obtain a list of unindexed type codes Generic_core_ty.ty'
|
| listify [Generic_util_obj] |
Given a obj of type
(x0,...xn),
computes a nested product (x0, (x1, (..., xn) ...))
|
| local [Generic_util_monad.Reader] | |
M | |
| make [Generic_core_desc.Con] |
Builds a
con using the corresponding field values
|
| map [Generic_fun_multiplate] |
Mapping a function on each component of a product.
|
| map [Generic_util_option] | |
| map_children [Generic_fun_multiplate] |
Specialisation of
fmap_children with the identity functor.
|
| map_children [Generic_fun_uniplate] |
Replace the children of a value using the given function.
|
| map_children_p [Generic_fun_multiplate] | |
| map_family [Generic_fun_multiplate] |
Specialisation of
fmap_family with the identity monad.
|
| map_family [Generic_fun_uniplate] |
Bottom up (Depth-first, post-order) traversal of a value of a recursive type.
|
| map_family_p [Generic_fun_multiplate] | |
| match_list [Generic_util_list] | match_list tries to apply a function to the first
element of a list.
|
| max_length [Generic_core_desc.Array.intf] |
The maximum length that can be allocated for an array of type
t, using the function init.
|
| monad [Generic_util_list] | |
| monoid [Generic_util_list] | |
| mreduce_family [Generic_fun_uniplate] |
monadic variant of
Generic_fun_uniplate.reduce_family
|
N | |
| name [Generic_core_desc.Con] | |
| ncst [Generic_core_desc.Variant] | ncst cs returns the list of the non-constant constructors in cs.
|
| ncst_get [Generic_core_desc.Variant] |
O(1).
|
| ncst_len [Generic_core_desc.Variant] |
O(1).
|
| neq [Generic_core_ty] |
neq x y == not (eq x y)
|
| no_free_var [Generic_core_patterns] | true iff the pattern doesn't contain Any, and thus determines a specific type
|
| no_free_var' [Generic_core_patterns] | no_free_var' (E t) == no_free_var' t
|
| nonuple [Generic_core_ty] | |
O | |
| octuple [Generic_core_ty] | |
| one_of [Generic_util_exn] | one_of xs tries each action of the list xs
in turn until one succeeds (meaning that it does not raise any exception).
|
| only_if [Generic_util_exn] | only_if f x returns x only if f x is true.
|
| opon [Generic_util_fun] | opon (^) f x y = f x ^ f y
|
| opres [Generic_util_fun] | opres (^) f g x = f x ^ g x
|
| opt_try [Generic_util_option] | opt_try x forces the lazy value x.
|
| option [Generic_core_ty] |
option == Option Any
|
| option [Generic_util_monad] | |
| option [Generic_util_applicative] | |
| option [Generic_util_functor] | |
| option [Generic_util_option] | option f is the functorial action of the functor 'a option:
|
P | |
| p0 [Generic_core_product.Build] | |
| p0 [Generic_core_product] | |
| p1 [Generic_core_product.Build] | |
| p1 [Generic_core_product] | |
| p10 [Generic_core_product.Build] | |
| p2 [Generic_core_product.Build] | |
| p2 [Generic_core_product] | |
| p3 [Generic_core_product.Build] | |
| p3 [Generic_core_product] | |
| p4 [Generic_core_product.Build] | |
| p4 [Generic_core_product] | |
| p5 [Generic_core_product.Build] | |
| p5 [Generic_core_product] | |
| p6 [Generic_core_product.Build] | |
| p6 [Generic_core_product] | |
| p7 [Generic_core_product.Build] | |
| p8 [Generic_core_product.Build] | |
| p9 [Generic_core_product.Build] | |
| pair [Generic_core_ty] |
pair == Pair (Any,Any)
|
| para [Generic_fun_multiplate] | |
| para [Generic_fun_uniplate] |
Paramorphism.
|
| para_d [Generic_fun_multiplate] | |
| para_p [Generic_fun_multiplate] | |
| poly_hash [Generic_util_obj] |
Returns the hash value associated with a constructor of a polymorphic variant
|
| poly_variant [Generic_core_desc.Poly] | |
| post_family [Generic_fun_uniplate] | Generic_fun_uniplate.post_family lists the descendents in post-order: the leaves are first and the root is last
|
| post_fold [Generic_fun_multiplate] |
folds a family in post-order
|
| post_fold_d [Generic_fun_multiplate] | |
| post_fold_p [Generic_fun_multiplate] | |
| pre_fold [Generic_fun_multiplate] |
Folds a family in pre-order.
|
| pre_fold_d [Generic_fun_multiplate] | |
| pre_fold_p [Generic_fun_multiplate] | |
| print_obj [Generic_util_obj_inspect] |
Print the representation to standard output.
|
| product [Generic_core_desc.Con] | |
| product [Generic_core_desc.Record] | |
| product [Generic_core_desc.Fields] | |
| pure_const_plate [Generic_fun_multiplate] |
Specialisation of
pure_plate to the constant functor.
|
| pure_id_plate [Generic_fun_multiplate] |
Specialisation of
pure_plate to the identity functor.
|
| pure_plate [Generic_fun_multiplate] |
A plate that lift all values into the applicative functor.
|
| put [Generic_util_monad.State] | |
Q | |
| quadruple [Generic_core_ty] | |
| quintuple [Generic_core_ty] | |
R | |
| reader [Generic_util_monad.Reader] | |
| rebuild [Generic_view_spine] |
Builds back a value from it's spine view.
|
| reduce_family [Generic_fun_uniplate] |
given a function that may optionally transform a value,
reduce_family returns a function that exhaustively
transforms the family of the input.
|
| replace_children [Generic_fun_uniplate] |
Replacing the children of a value with new children.
|
| replicate [Generic_util_list] | replicate n x = [x; x; ...; x] with x repeated n times.
|
| repr [Generic_core_repr] | |
| repr_name [Generic_core_repr] | |
| res0 [Generic_util_fun] | |
| res1 [Generic_util_fun] | |
| res2 [Generic_util_fun] | |
| res3 [Generic_util_fun] | |
| res4 [Generic_util_fun] | |
| res5 [Generic_util_fun] | |
| res6 [Generic_util_fun] | |
| res7 [Generic_util_fun] | |
| res8 [Generic_util_fun] | |
| res9 [Generic_util_fun] | |
| resolve_synonym [Generic_core_antiunify] |
Recursively replace every occurence of type synonyms with their base type
|
| right [Generic_util_sum] | |
| run_io [Generic_util_monad.IO] |
Run the computation with side effects to obtain a result
|
| run_reader [Generic_util_monad.Reader] | |
| run_state [Generic_util_monad.State] | |
S | |
| safe_find [Generic_util_hash] | safe_find, catches the Not_found exception with a
default value:
|
| scrap [Generic_fun_multiplate] | scrap is a generic function that deconstruct a value in
a tuple children with a function to rebuild the value given
the children.
|
| scrap [Generic_fun_uniplate] | Scrap a returns the list of children of type a of a value of type a
and a function to replace the children.
|
| septuple [Generic_core_ty] | |
| sequence [Generic_util_applicative] | |
| sequence [Generic_util_list] | |
| sequenceM [Generic_util_monad] | |
| set [Generic_core_desc.Array.intf] | set a n x modifies array a in place, replacing
element number n with x.
|
| set [Generic_util_list] | set i x xs computes a new list where the i-th element
of xs is x, the rest of the list is unchanged.
|
| sextuple [Generic_core_ty] | |
| show [Generic_fun_show] |
An extensible function whose default behaviour is given by
Generic_fun_show.show_default
|
| show_default [Generic_fun_show] |
Generic function
|
| show_ext [Generic_fun_show] |
Add a ad-hoc case for
Generic_fun_show.show.
|
| show_obj [Generic_util_obj_inspect] | |
| sl_insert [Generic_util_list] | sl_insert leq x xs inserts the new element x in the sorted list xs using the pre-order <=.
|
| some_if [Generic_util_option] | some_if f x = Some x if f x is true, None otherwise
|
| spine [Generic_view_spine] | |
| state [Generic_util_monad.State] | |
| subterms [Generic_core_desc.Con] | |
| subterms [Generic_core_ty_desc] |
Arguments of the constructor.
|
| subterms_prod [Generic_core_desc.Con] | |
| sum [Generic_util_sum] | |
| sumprod [Generic_view_sumprod] | |
T | |
| tag_view [Generic_util_obj] |
Converts the result of
Obj.tag to a more descriptive type.
|
| take_while [Generic_util_list] | |
| to_bytes [Generic_fun_marshal] | |
| to_channel [Generic_fun_marshal] | |
| to_list [Generic_util_option] | |
| to_repr [Generic_fun_marshal] |
Low level functions
|
| to_string [Generic_fun_marshal] | |
| traverse [Generic_fun_multiplate] |
Traversing a product type with effects
|
| traverse [Generic_util_applicative] | |
| traverse [Generic_util_list] | |
| traverseM [Generic_util_monad] | |
| traverse_children [Generic_fun_multiplate] |
Replace each child using the plate.
|
| traverse_children [Generic_fun_uniplate] |
applicative variant of
Generic_fun_uniplate.map_children
|
| traverse_children_p [Generic_fun_multiplate] | |
| traverse_family [Generic_fun_multiplate] |
Bottom up (Depth-first, post-order) traversal of a value of a recursive type.
|
| traverse_family [Generic_fun_uniplate] |
monadic variant of
Generic_fun_uniplate.map_family
|
| traverse_family_p [Generic_fun_multiplate] | |
| triple [Generic_core_ty] |
triple == Triple (Any,Any,Any)
|
| tuple [Generic_core_desc.Record] | |
| types_of_mutable_fields [Generic_core_desc.Record] | |
| types_of_mutable_fields [Generic_core_desc.Fields] | |
U | |
| unboxed_con [Generic_core_desc.Variant] |
Builds a
'v cons from a single constructor.
|
| uncurry [Generic_util_fun] | |
| unopt [Generic_util_option] | unopt s n eliminates an option value by replacing the constructor Some by s and None by n.
|
| unopt_try [Generic_util_option] | unopt_try s n x = unopt s n (opt_try x)
|
| update [Generic_util_hash] |
Update a hashtable entry.
|
V | |
| view [Generic_view_conlist] | |
| view [Generic_view_sumprod] |
view = sumprod
|
| view [Generic_view_spine] |
view = spine
|
| view [Generic_core_repr] |
synonym of
Generic_core_repr.repr
|
| view [Generic_core_desc_fun] |
Computes the generic view.
|
| view [Generic_util_obj] |
A view on the memory representation of values.
|
W | |
| with_indices [Generic_util_list] | with_indices [x0; x1; ...; xn] = [(0,x0); (1,x1); ... ; (n, xn)]
|
| with_type [Generic_core_ty] | with_type is used to help the type-checker fix the type of a value to the index of ='a ty=.
|