caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ian Zimmerman <itz@very.loosely.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] How to use ocaml.warning
Date: Fri, 26 Jul 2019 08:52:37 -0700	[thread overview]
Message-ID: <20190726155237.pnzqneafrpsbssrt@matica.foolinux.mooo.com> (raw)
In-Reply-To: <CADK7aFO3idJ2ecacQhm4fnMJp+jEAexT5StgWvy_cfdk=5N+xQ@mail.gmail.com>

On 2019-07-26 04:37, Nicolás Ojeda Bär wrote:

> In this case, you would want to attach the warning to the "let" binding:
> 
>     let[@warning "-8"] (i, j) :: rest = l in ...
> 
> Equivalently, you can use a postfix form:
> 
>     let (i, j) :: rest = l [@@warning "-8"] in ...
> 
> You can also attach the attribute to the whole "let" expression:
> 
>     (let (i, j) :: rest = l in ...) [@warning "-8"]
> 
> In this case, the warning is also disabled in the body of the "let"
> expression.
> 
> Going one step further, you can disable the warning on a whole section
> of a file by using a "floating" form of the attribute:
> 
>     [@@@warning "-8"]
>     ...
> 
> In this case, the warning will be disabled for any item appearing
> after the attribute.

Thanks.  But the manual says "ocaml.warning", not "warning".  What am I
misunderstanding?

-- 
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.

  reply	other threads:[~2019-07-26 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  2:14 Ian Zimmerman
2019-07-26  4:37 ` Nicolás Ojeda Bär
2019-07-26 15:52   ` Ian Zimmerman [this message]
2019-07-26 15:55     ` Nicolás Ojeda Bär

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=20190726155237.pnzqneafrpsbssrt@matica.foolinux.mooo.com \
    --to=itz@very.loosely.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).