From: octachron <octa@polychoron.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] a question about annotations
Date: Tue, 17 Nov 2015 14:20:08 +0200 [thread overview]
Message-ID: <564B1B78.3090307@polychoron.fr> (raw)
In-Reply-To: <564B14B0.3020306@gmail.com>
Concerning the documentation, as often with the reference manual, the
relevant section is in the language extension part:
http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman.html#sec241.
However, this section is slightly out of date in the released manual due
to recent change in the placement of the attribute:
https://github.com/ocaml/ocaml/pull/152.
Le 11/17/15 13:51, Matej Kosik a écrit :
> Dear Ocaml users,
>
> A few days ago there was a question about how to disable a specific warning in a specific location
> and the answer was to use
>
> [@warning "-<num>"]
>
> annotation.
>
> I tried it myself.
> By trial and error I was able to figure out how to use it with "function" and "match" constructs.
>
> With this fragment:
>
> type raw_frame =
> | Known_location of bool * string * int * int * int
> | Unknown_location of bool (*is_raise*)
>
> I would like to temporarily disable warning 37:
>
> "Warning 37: constructor Known_location is never used to build values.
> (However, this constructor appears in patterns.)"
>
> However, by trial and error, I failed to figure out where is the proper place to put the [@warning "-37"] annotation:
>
> Is there some document that describes where annotations are supported
> and what do they mean?
>
> I have skimmed the Reference Manual, but unfortunatelly, I can't find any relevant information.
> Where should I look?
>
> Thanks in advance.
>
next prev parent reply other threads:[~2015-11-17 12:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 11:51 Matej Kosik
2015-11-17 12:11 ` Gabriel Scherer
2015-11-17 12:20 ` octachron [this message]
2015-11-17 12:21 ` Alain Frisch
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=564B1B78.3090307@polychoron.fr \
--to=octa@polychoron.fr \
--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