From 67c4dc48f4885896af9230097ca0d7d10f0515ad Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 13 Aug 2024 09:58:51 -0400 Subject: [PATCH] flambda-backend: Move alert attributes in stdlib mlis to where they aren't ignored (#2918) (cherry picked from commit 3cae2fbbf610021fda8c2cc18b6fd9b98c49326b) --- stdlib/arg.mli | 4 ++-- stdlib/buffer.mli | 4 ++-- stdlib/ephemeron.mli | 3 ++- stdlib/queue.mli | 4 ++-- stdlib/scanf.mli | 4 ++-- stdlib/stack.mli | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/stdlib/arg.mli b/stdlib/arg.mli index 44a3772725f..ce4bb94101f 100644 --- a/stdlib/arg.mli +++ b/stdlib/arg.mli @@ -14,8 +14,6 @@ (* *) (**************************************************************************) -open! Stdlib - (** Parsing of command line arguments. This module provides a general mechanism for extracting options and @@ -79,6 +77,8 @@ open! Stdlib only be called from a single domain." ] +open! Stdlib + type spec = | Unit of (unit -> unit) (** Call the function with unit argument *) | Bool of (bool -> unit) (** Call the function with a bool argument *) diff --git a/stdlib/buffer.mli b/stdlib/buffer.mli index 5c7d8efd1b4..b18a76a23aa 100644 --- a/stdlib/buffer.mli +++ b/stdlib/buffer.mli @@ -14,8 +14,6 @@ (* *) (**************************************************************************) -open! Stdlib - (** Extensible buffers. This module implements buffers that automatically expand @@ -41,6 +39,8 @@ open! Stdlib "Unsynchronized accesses to buffers are a programming error." ] +open! Stdlib + (** Unsynchronized accesses to a buffer may lead to an invalid buffer state. Thus, concurrent accesses to a buffer must be synchronized (for instance diff --git a/stdlib/ephemeron.mli b/stdlib/ephemeron.mli index eebeca0f3d8..c757674a184 100644 --- a/stdlib/ephemeron.mli +++ b/stdlib/ephemeron.mli @@ -14,7 +14,6 @@ (* *) (**************************************************************************) -open! Stdlib (** Ephemerons and weak hash tables. Ephemerons and weak hash tables are useful when one wants to cache @@ -73,6 +72,8 @@ open! Stdlib "Unsynchronized accesses to weak hash tables are a programming error." ] +open! Stdlib + (** Unsynchronized accesses to a weak hash table may lead to an invalid weak hash table state. Thus, concurrent accesses to a buffer must be diff --git a/stdlib/queue.mli b/stdlib/queue.mli index 514943d6bac..8df76503c36 100644 --- a/stdlib/queue.mli +++ b/stdlib/queue.mli @@ -14,8 +14,6 @@ (* *) (**************************************************************************) -open! Stdlib - (** First-in first-out queues. This module implements queues (FIFOs), with in-place modification. @@ -28,6 +26,8 @@ open! Stdlib "Unsynchronized accesses to queues are a programming error." ] +open! Stdlib + (** Unsynchronized accesses to a queue may lead to an invalid queue state. Thus, concurrent accesses to queues must be synchronized (for instance diff --git a/stdlib/scanf.mli b/stdlib/scanf.mli index 96f5d60c45d..3f83dbdb64b 100644 --- a/stdlib/scanf.mli +++ b/stdlib/scanf.mli @@ -14,8 +14,6 @@ (* *) (**************************************************************************) -open! Stdlib - (** Formatted input functions. *) [@@@ocaml.warning "+A-e"] @@ -92,6 +90,8 @@ open! Stdlib "Unsynchronized accesses to Scanning.in_channel are a programming error." ] +open! Stdlib + (** Unsynchronized accesses to a {!Scanning.in_channel} may lead to an invalid {!Scanning.in_channel} state. Thus, concurrent accesses diff --git a/stdlib/stack.mli b/stdlib/stack.mli index 9fe042a4757..619d21111b5 100644 --- a/stdlib/stack.mli +++ b/stdlib/stack.mli @@ -14,8 +14,6 @@ (* *) (**************************************************************************) -open! Stdlib - (** Last-in first-out stacks. This module implements stacks (LIFOs), with in-place modification. @@ -27,6 +25,8 @@ open! Stdlib "Unsynchronized accesses to stacks are a programming error." ] +open! Stdlib + (** Unsynchronized accesses to a stack may lead to an invalid queue state. Thus, concurrent accesses to stacks must be synchronized (for instance