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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
|
-------------------------
What is Missinglib?
-------------------------
It's a collection of OCaml-related utilities. The following modules are
are provided:
AnyDBM Generic interface for on-disk storage of
key/value data
AnyDBM_String AnyDBM module for simple CSV-style storage
Compose Utilities for chaining functions together
Composeoper Haskell-like operators for chaining functions
ConfigParser System for parsing configuration files
These configuration files can have multiple
sections and resemble .INI files. This module
is designed to be mostly compatible with
Python's ConfigParser module.
Fileutil File-related utilities
Hashtbloper Hash table convenience operators
Hashtblutil Hash table utilities
Lexingutil Lexing-related utilities
Listutil List-manipulation utilities
Functions are provided to help extract
portions of lists and be more convenient
for association lists. Also, lists of strings
or chars can be written directly to output channels.
Slice Underlying API for Slice operators
Sliceoper Flexible subparts of arrays, lists, and strings
Streamutil Stream parser, conversion, and creation utilities
Provides features to create streams the yield
the lines of an input channel, the blocks of an
input channel, convert finite
streams to lists, map and filter streams
(similar to those functions on lists), and
fold streams.
Strutil String-related utilities
Includes functions to strip whitespace from
the beginning or end of strings, to split
strings into lists by whitespace or a custom
delimeter, etc.
Unixutil Operating system utilities
Includes functions to process directories
(possibly recursively), test for file
existence, and an implementation of "rm"
with "-r" and "-f" options.
The entire library has no prerequisites save the OCaml standard library and
findlib and is designed to install without complexity on a variety of
systems. It could also easily be embedded within your own source trees
so that users need not have it installed beforehand.
** THIS IS CURRENTLY ALPHA-QUALITY CODE; MAJOR API FLUCTUATIONS MAY YET OCCUR.
-------------------------
Quick Start
-------------------------
1. Make sure you have OCaml 3.07 or above and findlib 0.3.1 or above
installed. You can obtain findlib from
http://www.ocaml-programming.de/packages/
2. Run "make"
3. Optional: "make test"
4. As root: "make install"
-------------------------
Usage in programs
-------------------------
You can compile your .ml files to .cmo with this:
ocamlfind ocamlc -package missinglib -c test.ml
or:
ocamlfind ocamlopt -package missinglib -c test.ml
Then, you can link them with:
ocamlfind ocamlc -package missinglib -linkpkg -o test test.cmo
or:
ocamlfind ocamlopt -package missinglib -linkpkg -o test test.cmx
If you prefer to compile and link all at once, use:
ocamlfind ocamlc -package missinglib -linkpkg -o test test.ml
or
ocamlfind ocamlopt -package missinglib -linkpkg -o test test.ml
In the OCaml top-level interpreter "ocaml", you can use:
#use "topfind";;
#require "missinglib";;
Then continue like normal.
-------------------------
Documentation
-------------------------
You can generate it in HTML with:
cd libsrc; make htdoc
You could instead build the PDF version with:
cd libsrc; make pdfdoc
Also available online at the package's homepage (see below)
-------------------------
Author & Homepage
-------------------------
Missinglib was written by John Goerzen <jgoerzen@complete.org>.
The latest version may be obtained at:
gopher://quux.org/1/devel/missinglib
or:
http://quux.org/devel/missinglib
Documentation is also available on that page.
This program is copyrighted under the terms of the GNU General Public License.
See the COPYRIGHT and COPYING files for more details.
If the GPL is unacceptable for your uses, please e-mail me; alternative
terms can be negotiated for your project.
arch-tag: general information
|