From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id B6F0F7F1E1 for ; Sat, 12 Jan 2013 17:34:22 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of wojciech.meyer@gmail.com) identity=pra; client-ip=209.85.212.176; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="wojciech.meyer@gmail.com"; x-sender="wojciech.meyer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of wojciech.meyer@gmail.com designates 209.85.212.176 as permitted sender) identity=mailfrom; client-ip=209.85.212.176; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="wojciech.meyer@gmail.com"; x-sender="wojciech.meyer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f176.google.com) identity=helo; client-ip=209.85.212.176; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="wojciech.meyer@gmail.com"; x-sender="postmaster@mail-wi0-f176.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8DANyP8VDRVdSwk2dsb2JhbABEg0e6SRYOAQEBAQkJCwkUBCOCZQEbHgMSEBY0ARMRAQUBiDsBAw8ECJY6gm2MM4J7hCYKGScNWYZ3AQUMjXmDKQOWC4EcjUw/hBc X-IronPort-AV: E=Sophos;i="4.84,458,1355094000"; d="scan'208";a="189617581" Received: from mail-wi0-f176.google.com ([209.85.212.176]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 12 Jan 2013 17:34:22 +0100 Received: by mail-wi0-f176.google.com with SMTP id hm6so439593wib.15 for ; Sat, 12 Jan 2013 08:34:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:mime-version :content-type; bh=PmPG229dLIFOPvbqb3IIzKk65td4pbt+DpTX/+sQS0M=; b=dsNEziPX7SzRIbzc+7Z/7VUM+H9fgGevZFa7ZwzufsVS+d0xIjpezStY2yv/0Gv5a1 XocAJMI4EMzD48OCB1vrN1aOJkraoszwGhJOWj1TPkT3APT/BXM+ow2vyycYTbi19lLl RkxWTRCRv1xcn/PzFhX/DoeQ3xk4m/S0ncjVPPB+P2EKgQlDkvqw5kmjBE00h6dbkGUj McDxo9t9kIJjxMUJTL5JfyJs4MywN8afom5re93Uu8iHecoxu/H7TTsU7lO5GOVsSOMQ d53ZA/JEuIzI+MwT3O/sHMQyKMwG9SsQ7Da6xmPm7bgL4I7hglB0EV677C0jPHHlIPAP qg4w== X-Received: by 10.194.77.13 with SMTP id o13mr127212374wjw.58.1358008462298; Sat, 12 Jan 2013 08:34:22 -0800 (PST) Received: from spec-desktop.danmey.org (cpc1-cmbg12-0-0-cust201.5-4.cable.virginmedia.com. [86.9.116.202]) by mx.google.com with ESMTPS id s10sm4779843wiw.4.2013.01.12.08.34.20 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sat, 12 Jan 2013 08:34:21 -0800 (PST) From: Wojciech Meyer To: caml-list@inria.fr Date: Sat, 12 Jan 2013 16:34:22 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: [Caml-list] [ANN] ilist-0.1.0 - indexed lists 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