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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 35BE07ED7A for ; Fri, 14 Sep 2012 18:31:00 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of martin.jambon@ens-lyon.org) identity=pra; client-ip=66.111.4.25; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="martin.jambon@ens-lyon.org"; x-sender="martin.jambon@ens-lyon.org"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of martin.jambon@ens-lyon.org) identity=mailfrom; client-ip=66.111.4.25; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="martin.jambon@ens-lyon.org"; x-sender="martin.jambon@ens-lyon.org"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@out1-smtp.messagingengine.com) identity=helo; client-ip=66.111.4.25; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="martin.jambon@ens-lyon.org"; x-sender="postmaster@out1-smtp.messagingengine.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEDAIlaU1BCbwQZlGdsb2JhbABFjlGtLSIBAQEBCQsJCRQEI4IgAQEFOAg4Ag8LGAkWDwkDAgECAUUTCAEBiAkLp2+ENo8yBosVg0mDH4hZjh+ETI1H X-IronPort-AV: E=Sophos;i="4.80,423,1344204000"; d="scan'208";a="155785091" Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 14 Sep 2012 18:30:59 +0200 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 622582078C for ; Fri, 14 Sep 2012 12:30:57 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 14 Sep 2012 12:30:57 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=YiFf6DnSyQkeEKrEa41eNv CHTT4=; b=c1JfeLmzHZnd3up3ttZ244RWNRfSU6D3hd/mFtoRxKeUEPvGLENT36 Zk1ZgawW3H13YZmKhimwpUrnJNsAIjFR5+9Bc197XolSwHzt+Rk64Mk7rFXggtcW gFPtgxBHMA4ktcncy09NQ6aZaGp+cUVctKtqIziK4s9lEHp44kaRw= X-Sasl-enc: qM3Or8iLZSkbaX1BLkJyf6ooBm+JdRT/7kp0TTbJUVXf 1347640257 Received: from [192.168.1.144] (unknown [50.76.32.210]) by mail.messagingengine.com (Postfix) with ESMTPA id E68474836ED for ; Fri, 14 Sep 2012 12:30:56 -0400 (EDT) Message-ID: <50535BBF.6070908@ens-lyon.org> Date: Fri, 14 Sep 2012 09:30:55 -0700 From: Martin Jambon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <87zk4u3r42.fsf@maru.md5i.com> In-Reply-To: <87zk4u3r42.fsf@maru.md5i.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] A question about Format boxes On 09/13/2012 08:00 AM, Michael Welsh Duggan wrote: > The example at > > shows a major difference in the output of packing versus structural hov > boxes. However, in my experiments I cannot achieve the output this > example assigns to "packing" boxes. (OCaml 3.12) > > My examples from the REPL are below. Would someone be able to tell me > what I am doing incorrectly? > > # Format.printf "@[(---@\n@[(---@\n@[(---@,)@]@,)@]@,)@]@\n";; > (--- > (--- > (---))) > - : unit = () > # Format.printf "@[(---@\n@[(---@\n@[(---@,)@]@,)@]@,)@]@\n";; > (--- > (--- > (---))) > - : unit = () > # Format.printf "@[<2>(---@\n@[<2>(---@\n@[<2>(---@,)@]@,)@]@,)@]@\n";; > (--- > (--- > (---))) > - : unit = () > # Format.printf "@[(---@\n@[(---@\n@[(---@,)@]@,)@]@,)@]@\n";; > (--- > (--- > (---))) > - : unit = () I have no idea what you're doing wrong, but I can suggest you try easy-format (http://mjambon.com/easy-format.html) which lets you choose and customize various indentation styles. Martin