caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin.jambon@ens-lyon.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] A question about Format boxes
Date: Fri, 14 Sep 2012 09:30:55 -0700	[thread overview]
Message-ID: <50535BBF.6070908@ens-lyon.org> (raw)
In-Reply-To: <87zk4u3r42.fsf@maru.md5i.com>

On 09/13/2012 08:00 AM, Michael Welsh Duggan wrote:
> The example at
> <URL:http://caml.inria.fr/resources/doc/guides/format.en.html#hov-boxes>
> 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 "@[<hv 2>(---@\n@[<hv 2>(---@\n@[<hv 2>(---@,)@]@,)@]@,)@]@\n";;
> (---
>    (---
>      (---)))
> - : unit = ()
> # Format.printf "@[<hov 2>(---@\n@[<hov 2>(---@\n@[<hov 2>(---@,)@]@,)@]@,)@]@\n";;
> (---
>    (---
>      (---)))
> - : unit = ()
> # Format.printf "@[<2>(---@\n@[<2>(---@\n@[<2>(---@,)@]@,)@]@,)@]@\n";;
> (---
>    (---
>      (---)))
> - : unit = ()
> # Format.printf "@[<b 2>(---@\n@[<b 2>(---@\n@[<b 2>(---@,)@]@,)@]@,)@]@\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


  reply	other threads:[~2012-09-14 16:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 15:00 Michael Welsh Duggan
2012-09-14 16:30 ` Martin Jambon [this message]
2012-10-26 15:23 ` [Caml-list] " Hongbo Zhang

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=50535BBF.6070908@ens-lyon.org \
    --to=martin.jambon@ens-lyon.org \
    --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).