Skip to content

Commit be1fc7d

Browse files
bgamariMarge Bot
authored and
Marge Bot
committed
base: Add disclaimers in internal modules
To warn users that these modules are internal and their interfaces may change with little warning. As proposed in Core Libraries Committee #146 [CLC146]. [CLC146]: haskell/core-libraries-committee#146
1 parent 94f59ea commit be1fc7d

File tree

31 files changed

+233
-40
lines changed

31 files changed

+233
-40
lines changed

libraries/base/GHC/Arr.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
--
1616
-- GHC\'s array implementation.
1717
--
18+
-- /The API of this module is unstable and not meant to be consumed by the general public./
19+
-- If you absolutely must depend on it, make sure to use a tight upper
20+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
21+
-- change rapidly without much warning.
22+
--
1823
-----------------------------------------------------------------------------
1924

2025
module GHC.Arr (

libraries/base/GHC/Conc.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-----------------------------------------------------------------------------
77
-- |
88
-- Module : GHC.Conc
9-
-- Copyright : (c) The University of Glasgow, 1994-2002
9+
-- Copyright : (c) The University of Glasgow, 1994-2023
1010
-- License : see libraries/base/LICENSE
1111
--
1212
-- Maintainer : [email protected]
@@ -15,6 +15,11 @@
1515
--
1616
-- Basic concurrency stuff.
1717
--
18+
-- /The API of this module is unstable and not meant to be consumed by the general public./
19+
-- If you absolutely must depend on it, make sure to use a tight upper
20+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
21+
-- change rapidly without much warning.
22+
--
1823
-----------------------------------------------------------------------------
1924

2025
-- No: #hide, because bits of this module are exposed by the stm package.

libraries/base/GHC/Conc/IO.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
--
1919
-- Basic concurrency stuff.
2020
--
21+
-- /The API of this module is unstable and not meant to be consumed by the general public./
22+
-- If you absolutely must depend on it, make sure to use a tight upper
23+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
24+
-- change rapidly without much warning.
25+
--
2126
-----------------------------------------------------------------------------
2227

2328
-- No: #hide, because bits of this module are exposed by the stm package.

libraries/base/GHC/Desugar.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
--
1818
-- Support code for desugaring in GHC
1919
--
20+
-- /The API of this module is unstable and not meant to be consumed by the general public./
21+
-- If you absolutely must depend on it, make sure to use a tight upper
22+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
23+
-- change rapidly without much warning.
24+
--
2025
-----------------------------------------------------------------------------
2126

2227
module GHC.Desugar ((>>>), AnnotationWrapper(..), toAnnotationWrapper) where

libraries/base/GHC/Encoding/UTF8.hs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples, NoImplicitPrelude #-}
33
{-# OPTIONS_GHC -O2 -fno-warn-name-shadowing #-}
44

5-
-- | Simple UTF-8 codecs supporting non-streaming encoding/decoding.
5+
-- |
6+
-- Module : GHC.Encoding.UTF8
7+
-- Copyright : (c) The University of Glasgow, 1994-2023
8+
-- License : see libraries/base/LICENSE
9+
--
10+
-- Maintainer : [email protected]
11+
-- Stability : internal
12+
-- Portability : non-portable (GHC extensions)
13+
--
14+
-- /The API of this module is unstable and not meant to be consumed by the general public./
15+
-- If you absolutely must depend on it, make sure to use a tight upper
16+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
17+
-- change rapidly without much warning.
18+
--
19+
-- Simple UTF-8 codecs supporting non-streaming encoding/decoding.
620
-- For encoding where codepoints may be broken across buffers,
721
-- see "GHC.IO.Encoding.UTF8".
822
--

libraries/base/GHC/Event/TimeOut.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
--
1212
-- Common Timer definitions shared between WinIO and RIO.
1313
--
14+
-- /The API of this module is unstable and not meant to be consumed by the general public./
15+
-- If you absolutely must depend on it, make sure to use a tight upper
16+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
17+
-- change rapidly without much warning.
18+
--
1419
-------------------------------------------------------------------------------
1520

1621
module GHC.Event.TimeOut where

libraries/base/GHC/Exception.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
--
2121
-- Exceptions and exception-handling functions.
2222
--
23+
-- /The API of this module is unstable and not meant to be consumed by the general public./
24+
-- If you absolutely must depend on it, make sure to use a tight upper
25+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
26+
-- change rapidly without much warning.
27+
--
2328
-----------------------------------------------------------------------------
2429

2530
module GHC.Exception

libraries/base/GHC/Exception/Type.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
--
1717
-- Exceptions and exception-handling functions.
1818
--
19+
-- /The API of this module is unstable and not meant to be consumed by the general public./
20+
-- If you absolutely must depend on it, make sure to use a tight upper
21+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
22+
-- change rapidly without much warning.
23+
--
1924
-----------------------------------------------------------------------------
2025

2126
module GHC.Exception.Type

libraries/base/GHC/ExecutionStack/Internal.hsc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
-- Stability : internal
99
-- Portability : non-portable (GHC Extensions)
1010
--
11-
-- Internals of the `GHC.ExecutionStack` module
11+
-- Internals of the "GHC.ExecutionStack" module.
12+
--
13+
-- /The API of this module is unstable and not meant to be consumed by the general public./
14+
-- If you absolutely must depend on it, make sure to use a tight upper
15+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
16+
-- change rapidly without much warning.
1217
--
1318
-- @since 4.9.0.0
1419
-----------------------------------------------------------------------------

libraries/base/GHC/Fingerprint/Type.hs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
{-# LANGUAGE Trustworthy #-}
22
{-# LANGUAGE NoImplicitPrelude #-}
33

4-
-- ----------------------------------------------------------------------------
4+
-- |
5+
-- Module : GHC.Fingerprint.Type
6+
-- Copyright : (c) The University of Glasgow, 1994-2023
7+
-- License : see libraries/base/LICENSE
58
--
6-
-- (c) The University of Glasgow 2006
9+
-- Maintainer : [email protected]
10+
-- Stability : internal
11+
-- Portability : non-portable (GHC extensions)
712
--
813
-- Fingerprints for recompilation checking and ABI versioning, and
914
-- implementing fast comparison of Typeable.
1015
--
11-
-- ----------------------------------------------------------------------------
16+
-- /The API of this module is unstable and not meant to be consumed by the general public./
17+
-- If you absolutely must depend on it, make sure to use a tight upper
18+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
19+
-- change rapidly without much warning.
1220

1321
module GHC.Fingerprint.Type (Fingerprint(..)) where
1422

libraries/base/GHC/Float/RealFracMethods.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
-- Methods for the RealFrac instances for 'Float' and 'Double',
1616
-- with specialised versions for 'Int'.
1717
--
18-
-- Moved to their own module to not bloat GHC.Float further.
18+
-- Moved to their own module to not bloat "GHC.Float" further.
19+
--
20+
-- /The API of this module is unstable and not meant to be consumed by the general public./
21+
-- If you absolutely must depend on it, make sure to use a tight upper
22+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
23+
-- change rapidly without much warning.
1924
--
2025
-----------------------------------------------------------------------------
2126

libraries/base/GHC/GHCi.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
--
1616
-- EXPERIMENTAL! DON'T USE.
1717
--
18+
-- /The API of this module is unstable and not meant to be consumed by the general public./
19+
-- If you absolutely must depend on it, make sure to use a tight upper
20+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
21+
-- change rapidly without much warning.
22+
--
1823
-----------------------------------------------------------------------------
1924

2025
module GHC.GHCi {-# WARNING "This is an unstable interface." #-} (

libraries/base/GHC/GHCi/Helpers.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
--
1111
-- Various helpers used by the GHCi shell.
1212
--
13+
-- /The API of this module is unstable and not meant to be consumed by the general public./
14+
-- If you absolutely must depend on it, make sure to use a tight upper
15+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
16+
-- change rapidly without much warning.
17+
--
1318
-----------------------------------------------------------------------------
1419

1520
module GHC.GHCi.Helpers

libraries/base/GHC/IO.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-----------------------------------------------------------------------------
1313
-- |
1414
-- Module : GHC.IO
15-
-- Copyright : (c) The University of Glasgow 1994-2002
15+
-- Copyright : (c) The University of Glasgow 1994-2023
1616
-- License : see libraries/base/LICENSE
1717
--
1818
-- Maintainer : [email protected]
@@ -21,6 +21,11 @@
2121
--
2222
-- Definitions for the 'IO' monad and its friends.
2323
--
24+
-- /The API of this module is unstable and not meant to be consumed by the general public./
25+
-- If you absolutely must depend on it, make sure to use a tight upper
26+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
27+
-- change rapidly without much warning.
28+
--
2429
-----------------------------------------------------------------------------
2530

2631
module GHC.IO (

libraries/base/GHC/IO/Buffer.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
--
1515
-- Buffers used in the IO system
1616
--
17+
-- /The API of this module is unstable and not meant to be consumed by the general public./
18+
-- If you absolutely must depend on it, make sure to use a tight upper
19+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
20+
-- change rapidly without much warning.
21+
--
1722
-----------------------------------------------------------------------------
1823

1924
module GHC.IO.Buffer (

libraries/base/GHC/IO/Device.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
--
1414
-- Type classes for I/O providers.
1515
--
16+
-- /The API of this module is unstable and not meant to be consumed by the general public./
17+
-- If you absolutely must depend on it, make sure to use a tight upper
18+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
19+
-- change rapidly without much warning.
20+
--
1621
-----------------------------------------------------------------------------
1722

1823
module GHC.IO.Device (

libraries/base/GHC/IO/Encoding.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
--
1616
-- Text codecs for I/O
1717
--
18+
-- /The API of this module is unstable and not meant to be consumed by the general public./
19+
-- If you absolutely must depend on it, make sure to use a tight upper
20+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
21+
-- change rapidly without much warning.
22+
--
1823
-----------------------------------------------------------------------------
1924

2025
module GHC.IO.Encoding (

libraries/base/GHC/IO/Exception.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
--
1717
-- IO-related Exception types and functions
1818
--
19+
-- /The API of this module is unstable and not meant to be consumed by the general public./
20+
-- If you absolutely must depend on it, make sure to use a tight upper
21+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
22+
-- change rapidly without much warning.
23+
--
1924
-----------------------------------------------------------------------------
2025

2126
module GHC.IO.Exception (

libraries/base/GHC/IO/Handle/Internals.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
-- of the operations defined here are independent of the underlying
2525
-- device.
2626
--
27+
-- /The API of this module is unstable and not meant to be consumed by the general public./
28+
-- If you absolutely must depend on it, make sure to use a tight upper
29+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
30+
-- change rapidly without much warning.
31+
--
2732
-----------------------------------------------------------------------------
2833

2934
module GHC.IO.Handle.Internals (

libraries/base/GHC/IO/Handle/Text.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
--
2323
-- String I\/O functions
2424
--
25+
-- /The API of this module is unstable and not meant to be consumed by the general public./
26+
-- If you absolutely must depend on it, make sure to use a tight upper
27+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
28+
-- change rapidly without much warning.
29+
--
2530
-----------------------------------------------------------------------------
2631

2732
module GHC.IO.Handle.Text (

libraries/base/GHC/IO/Handle/Types.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
--
1919
-- Basic types for the implementation of IO Handles.
2020
--
21+
-- /The API of this module is unstable and not meant to be consumed by the general public./
22+
-- If you absolutely must depend on it, make sure to use a tight upper
23+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
24+
-- change rapidly without much warning.
25+
--
2126
-----------------------------------------------------------------------------
2227

2328
module GHC.IO.Handle.Types (

libraries/base/GHC/IO/SubSystem.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@
1212
-- Stability : internal
1313
-- Portability : non-portable
1414
--
15-
-- The SubSystem control interface. These methods can be used to disambiguate
15+
-- The 'IoSubSystem' control interface. These methods can be used to disambiguate
1616
-- between the two operations.
1717
--
18+
-- /The API of this module is unstable and not meant to be consumed by the general public./
19+
-- If you absolutely must depend on it, make sure to use a tight upper
20+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
21+
-- change rapidly without much warning.
22+
--
1823
-----------------------------------------------------------------------------
1924

2025
module GHC.IO.SubSystem (

libraries/base/GHC/IOPort.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313
-- Stability : internal
1414
-- Portability : non-portable (GHC Extensions)
1515
--
16-
-- The IOPort type. This is a facility used by the Windows IO subsystem.
16+
-- The 'IOPort' type. This is a facility used by the Windows IO subsystem.
17+
--
18+
-- /The API of this module is unstable and not meant to be consumed by the general public./
19+
-- If you absolutely must depend on it, make sure to use a tight upper
20+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
21+
-- change rapidly without much warning.
22+
--
1723
-- We have strict rules with an I/O Port:
1824
-- * writing more than once is an error
1925
-- * reading more than once is an error

libraries/base/GHC/InfoProv.hsc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
--
1616
-- Access to GHC's info-table provenance metadata.
1717
--
18+
-- /The API of this module is unstable and not meant to be consumed by the general public./
19+
-- If you absolutely must depend on it, make sure to use a tight upper
20+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
21+
-- change rapidly without much warning.
22+
--
1823
-- @since 4.18.0.0
1924
-----------------------------------------------------------------------------
2025

libraries/base/GHC/RTS/Flags.hsc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
{-# LANGUAGE DeriveGeneric #-}
22
{-# LANGUAGE NoImplicitPrelude #-}
33

4-
-- | Accessors to GHC RTS flags.
4+
-- |
5+
-- Module : GHC.RTS.Flags
6+
-- Copyright : (c) The University of Glasgow, 1994-2000
7+
-- License : see libraries/base/LICENSE
8+
--
9+
-- Maintainer : [email protected]
10+
-- Stability : internal
11+
-- Portability : non-portable (GHC extensions)
12+
--
13+
-- /The API of this module is unstable and is tightly coupled to GHC's internals./
14+
-- If depend on it, make sure to use a tight upper bound, e.g., @base < 4.X@ rather
15+
-- than @base < 5@, because the interface can change rapidly without much warning.
16+
--
517
-- Descriptions of flags can be seen in
618
-- <https://www.haskell.org/ghc/docs/latest/html/users_guide/runtime_control.html GHC User's Guide>,
719
-- or by running RTS help message using @+RTS --help@.

libraries/base/GHC/Stack/Types.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@
1919
-- Stability : internal
2020
-- Portability : non-portable (GHC Extensions)
2121
--
22-
-- type definitions for implicit call-stacks.
22+
-- Type definitions for implicit call-stacks.
2323
-- Use "GHC.Stack" from the base package instead of importing this
2424
-- module directly.
2525
--
26+
-- /The API of this module is unstable and not meant to be consumed by the general public./
27+
-- If you absolutely must depend on it, make sure to use a tight upper
28+
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
29+
-- change rapidly without much warning.
30+
--
2631
-----------------------------------------------------------------------------
2732

2833
module GHC.Stack.Types (

0 commit comments

Comments
 (0)