caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Wojciech Meyer <wojciech.meyer@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] [ANN] ilist-0.1.0 - indexed lists
Date: Sat, 12 Jan 2013 16:34:22 +0000	[thread overview]
Message-ID: <wfliby8inl.fsf@gmail.com> (raw)

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

             reply	other threads:[~2013-01-12 16:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 16:34 Wojciech Meyer [this message]
2013-01-12 20:56 ` Erkki Seppala
2013-01-12 21:16   ` Wojciech Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wfliby8inl.fsf@gmail.com \
    --to=wojciech.meyer@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).