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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 4F97D7EEBF for ; Tue, 18 Aug 2015 19:06:57 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of kennethadammiller@gmail.com) identity=pra; client-ip=209.85.214.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of kennethadammiller@gmail.com designates 209.85.214.172 as permitted sender) identity=mailfrom; client-ip=209.85.214.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ob0-f172.google.com) identity=helo; client-ip=209.85.214.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="postmaster@mail-ob0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BtAgAmZdNVm6zWVdFdhFgGgx6vGJR4B0wBAQEBAQESAQEBAQEGCwsJIS6EGiIRHQEbHgMSCAEHNwIkAREBBQEiNYd2AQMSrEeCBYEvPjGLQIFsgnmLHAoZJw1XhSYBBQ6TP4FDBZUhjGyYYxIjgRcXhCgiM4JMAQEB X-IPAS-Result: A0BtAgAmZdNVm6zWVdFdhFgGgx6vGJR4B0wBAQEBAQESAQEBAQEGCwsJIS6EGiIRHQEbHgMSCAEHNwIkAREBBQEiNYd2AQMSrEeCBYEvPjGLQIFsgnmLHAoZJw1XhSYBBQ6TP4FDBZUhjGyYYxIjgRcXhCgiM4JMAQEB X-IronPort-AV: E=Sophos;i="5.15,703,1432591200"; d="scan'208";a="173989285" Received: from mail-ob0-f172.google.com ([209.85.214.172]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Aug 2015 19:06:56 +0200 Received: by obkg7 with SMTP id g7so15133140obk.3 for ; Tue, 18 Aug 2015 10:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Fi9jeCVbDx4ZbzVyrF0SVZPcOkkepy05YqaTx5gyryo=; b=X+yoI3WNzv1qjhwolptHcsxCQfII3MiIq5uoaNG84q9/N7+Qsy4zyPEHArv3ZEyt3f mRi09d51TFkChfKWc6Mn8sneqxJlFlXKH8OUBkOnPrUmWfOinXqLIPmzQnhmv3J7FsUT 43jdsn3hBxxMJSJx4jElsD/jbtXtBdpOdDwMi5qV1h4G5xVaMQjjWaC9eo4XhdnGZNYJ n9YJd95vaBFU7FRTi8zGLm3j+g7AR7rvfvPuhZ8t+5sQTPFaFZLgDhfVt9PUdRESuVlI wyrMlBCmGphE4HEc3E9TKl0TZ4R+RwJPainBBiUGe8AzaCTTTSDgHS2VhLN7epnCu3YF +QRA== MIME-Version: 1.0 X-Received: by 10.182.135.202 with SMTP id pu10mr7056196obb.52.1439917615525; Tue, 18 Aug 2015 10:06:55 -0700 (PDT) Received: by 10.202.191.8 with HTTP; Tue, 18 Aug 2015 10:06:55 -0700 (PDT) Date: Tue, 18 Aug 2015 13:06:55 -0400 Message-ID: From: Kenneth Adam Miller To: caml users Content-Type: multipart/alternative; boundary=089e01294004fabeaa051d98f161 Subject: [Caml-list] Type Encoding Format Control --089e01294004fabeaa051d98f161 Content-Type: text/plain; charset=UTF-8 I was wondering if cases where format control is possible in typing constructs can allow things like restricting the implementation size after compilation of a specific variant type. Say, for instance that I wanted to have a malloc implementation instead of returning a Some 'a | None type that compiles down to a boxed case of first a word and then the subsequent 'a instance, down to the 'a instance, where in the values of the word enum (or tag) are not present in the possibilities of the 'a instance. Maybe it sounds silly, but in really tight loops you want to squeeze for efficiency. So I was wondering if maybe the same actual code be used with the same sanity of type checking, but some annotation provided at the type declaration to allow such optimization to take place. --089e01294004fabeaa051d98f161 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I was wondering if cases where format control is possible = in typing constructs can allow things like restricting the implementation s= ize after compilation of a specific variant type. Say, for instance that I = wanted to have a malloc implementation instead of returning a Some 'a |= None type that compiles down to a boxed case of first a word and then the = subsequent 'a instance, down to the 'a instance, where in the value= s of the word enum (or tag) are not present in the possibilities of the = 9;a instance.

Maybe it sounds silly, but in really tight= loops you want to squeeze for efficiency. So I was wondering if maybe the = same actual code be used with the same sanity of type checking, but some an= notation provided at the type declaration to allow such optimization to tak= e place.
--089e01294004fabeaa051d98f161--