caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] ilist-0.1.0 - indexed lists
@ 2013-01-12 16:34 Wojciech Meyer
  2013-01-12 20:56 ` Erkki Seppala
  0 siblings, 1 reply; 3+ messages in thread
From: Wojciech Meyer @ 2013-01-12 16:34 UTC (permalink / raw)
  To: caml-list

Hi,

I'm happy to release a small library that brings up to use convenience
and safety of indexed lists using GADT encodings.

The tarball can be fetched here:

http://danmey.org/ilist-0.1.0.tar.gz

OPAM packaging will be available shortly.

Currently the library contains just two modules:

NList - length indexed list
IList - heterogeneous list where each element can have it's own type

syntax extension:

Pa_ilist - allows to use the list literals and pattern matching on the
           lists. While using Camlp4 might be useful, it's being
           considered to use -ppx extensions instead present on the
           current OCaml trunk.

and plenty of examples what can be done using the library.

NList can be used everywhere we need an invariant on length encoded in a
type. For instance now a list of at least one element encoded as a tuple
of the first element and the rest as a list now can be encoded directly
as an Nlist.

IList is probably most similar to tuples with one exception, that now we
can encode a generic extraction and extending functions that will work
on any sized lists (compare IList.hd to fst), so it behaves like an
extensible tuple.

Project home:     https://github.com/danmey/Ilist
Bugs & features:  https://github.com/danmey/Ilist/issues
License:          BSD3

Thanks,
--
Wojciech Meyer
http://danmey.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-12 21:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-12 16:34 [Caml-list] [ANN] ilist-0.1.0 - indexed lists Wojciech Meyer
2013-01-12 20:56 ` Erkki Seppala
2013-01-12 21:16   ` Wojciech Meyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).