I am pleased to announce the release (0.3.0) of fmlib, a group of functional
libraries with managed effects.
The main new feature of release 0.3.0 are B trees in the package
fmlib_std. B trees can be used to implement finite sets and finite maps. Fmlib_std’s B trees have functionality similar to the modules
Map of the standard library.
Map of the standard library are based on AVL trees. B
trees offer the same functionality but have on modern processors a better cache
performance and have better data locality.
The group of libraries
Fmlib has four main components:
Fmlib_stdStandard Datatypes: This component offers some modules from
with additional functionality. E.g.
Fmlib_std.Arrayoffers functions to
insert elements into arrays, remove elements from an array and binary search
in a sorted array. It has the modules
Optionwhich can be used
to avoid exceptions and use exceptions in a more structured way. The modules
Fmliboffer a complete monadic interface and offer
let*operator to write well readable monadic code.
Fmlib_prettyPretty Printing: Print tree like structures in a nice way and use
the library completely functional. The library does not assume a specific IO
method. The pretty printer generates a lazy stream of characteres which can be
written by all io functions.
Fmlib_parseCombinator Parsing: Easily parse textual input by the use of
combinators. The library supports indentation sensitivity and can therefore be
used to parse yaml files, haskell, python, etc. Furthermore no input method is
assumed. The generated parsers are sinks of tokens (or characters). You can
choose any input method and push the tokens/characters into the parsers. The
generated parsers are fully incremental. Parser can be stored at any position
of the input stream and in case of interactive editing, parsing can be resumed
from any point of the stream.
Fmlib can be installed via opam:
opam update opam install fmlib opam install fmlib_std opam install fmlib_pretty opam install fmlib_parse opam install fmlib_js
The source code of the library is located at github