Wolfgang Jeltsch pushed to branch wip/jeltsch/stability-risk-3-module-deprecation at Glasgow Haskell Compiler / GHC
Commits:
-
94f74140
by Wolfgang Jeltsch at 2026-03-27T18:11:07+02:00
11 changed files:
- libraries/base/changelog.md
- libraries/base/src/GHC/Event/TimeOut.hs
- libraries/base/src/GHC/Float/RealFracMethods.hs
- libraries/base/src/GHC/GHCi.hs
- libraries/base/src/GHC/GHCi/Helpers.hs
- libraries/base/src/GHC/IO/Handle/Internals.hs
- libraries/base/src/GHC/IO/Handle/Types.hs
- libraries/base/src/GHC/IO/SubSystem.hs
- libraries/base/src/System/IO/OS.hs
- libraries/base/src/System/Posix/Internals.hs
- + libraries/base/tests/T23697.stderr
Changes:
| ... | ... | @@ -28,6 +28,16 @@ |
| 28 | 28 | * Hide implementation details when throwing exceptions in throw and throwSTM. ([CLC proposal #387](https://github.com/haskell/core-libraries-committee/issues/387))
|
| 29 | 29 | * Change `hIsReadable` and `hIsWritable` such that they always throw a respective exception when encountering a closed or semi-closed handle, not just in the case of a file handle. ([CLC proposal #371](github.com/haskell/core-libraries-committee/issues/371))
|
| 30 | 30 | * Annotate `onException` continuation with `WhileHandling`. ([CLC Proposal #397](https://github.com/haskell/core-libraries-committee/issues/397))
|
| 31 | + * Declare the following modules deprecated, and announce that they will be removed in GHC 10.2:
|
|
| 32 | + - GHC.Event.TimeOut
|
|
| 33 | + - GHC.Float.RealFracMethods
|
|
| 34 | + - GHC.GHCi
|
|
| 35 | + - GHC.GHCi.Helpers
|
|
| 36 | + - GHC.IO.Handle.Internals
|
|
| 37 | + - GHC.IO.Handle.Types
|
|
| 38 | + - GHC.IO.SubSystem
|
|
| 39 | + - System.Posix.Internals
|
|
| 40 | + ([CLC Proposal #392](https://github.com/haskell/core-libraries-committee/issues/392))
|
|
| 31 | 41 | |
| 32 | 42 | ## 4.22.0.0 *TBA*
|
| 33 | 43 | * Shipped with GHC 9.14.1
|
| 1 | +{-# LANGUAGE CPP #-}
|
|
| 2 | + |
|
| 1 | 3 | -- |
|
| 2 | 4 | -- Module : GHC.Event.TimeOut
|
| 3 | 5 | -- Copyright : (c) Tamar Christina 2018
|
| 4 | 6 | -- License : BSD-style (see the file libraries/base/LICENSE)
|
| 5 | 7 | --
|
| 6 | 8 | -- Maintainer : libraries@haskell.org
|
| 7 | --- Stability : stable
|
|
| 9 | +-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/392>)
|
|
| 8 | 10 | -- Portability : non-portable
|
| 9 | 11 | --
|
| 10 | 12 | -- Common Timer definitions shared between WinIO and RIO.
|
| ... | ... | @@ -14,7 +16,12 @@ |
| 14 | 16 | -- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
|
| 15 | 17 | -- change rapidly without much warning.
|
| 16 | 18 | |
| 19 | +#if __GLASGOW_HASKELL__ >= 1002
|
|
| 20 | +#error "GHC.Event.TimeOut should be removed in GHC 10.02."
|
|
| 21 | +#endif
|
|
| 22 | + |
|
| 17 | 23 | module GHC.Event.TimeOut
|
| 24 | + {-# DEPRECATED "GHC.Event.TimeOut is deprecated and will be removed in GHC 10.02. See https://github.com/well-typed/reinstallable-base/tree/main/hackage-uses-of-internals/stability-risk-3 for context." #-}
|
|
| 18 | 25 | ( TimeoutQueue
|
| 19 | 26 | , TimeoutCallback
|
| 20 | 27 | , TimeoutEdit
|
| 1 | +{-# LANGUAGE CPP #-}
|
|
| 2 | + |
|
| 1 | 3 | {-# LANGUAGE Safe #-}
|
| 2 | 4 | {-# OPTIONS_HADDOCK not-home #-}
|
| 3 | 5 | |
| ... | ... | @@ -8,7 +10,7 @@ |
| 8 | 10 | -- License : see libraries/base/LICENSE
|
| 9 | 11 | --
|
| 10 | 12 | -- Maintainer : ghc-devs@haskell.org
|
| 11 | --- Stability : internal
|
|
| 13 | +-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/392>)
|
|
| 12 | 14 | -- Portability : non-portable (GHC Extensions)
|
| 13 | 15 | --
|
| 14 | 16 | -- Methods for the RealFrac instances for 'Float' and 'Double',
|
| ... | ... | @@ -22,7 +24,12 @@ |
| 22 | 24 | -- change rapidly without much warning.
|
| 23 | 25 | --
|
| 24 | 26 | |
| 27 | +#if __GLASGOW_HASKELL__ >= 1002
|
|
| 28 | +#error "GHC.Float.RealFracMethods should be removed in GHC 10.02."
|
|
| 29 | +#endif
|
|
| 30 | + |
|
| 25 | 31 | module GHC.Float.RealFracMethods
|
| 32 | + {-# DEPRECATED "GHC.Float.RealFracMethods is deprecated and will be removed in GHC 10.02. See https://github.com/well-typed/reinstallable-base/tree/main/hackage-uses-of-internals/stability-risk-3 for context." #-}
|
|
| 26 | 33 | (-- * Double methods
|
| 27 | 34 | -- ** Integer results
|
| 28 | 35 | properFractionDoubleInteger,
|
| 1 | +{-# LANGUAGE CPP #-}
|
|
| 2 | + |
|
| 1 | 3 | {-# OPTIONS_HADDOCK not-home #-}
|
| 2 | 4 | |
| 3 | 5 | -- |
|
| ... | ... | @@ -7,7 +9,7 @@ |
| 7 | 9 | -- License : see libraries/base/LICENSE
|
| 8 | 10 | --
|
| 9 | 11 | -- Maintainer : ghc-devs@haskell.org
|
| 10 | --- Stability : internal
|
|
| 12 | +-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/392>)
|
|
| 11 | 13 | -- Portability : non-portable (GHC Extensions)
|
| 12 | 14 | --
|
| 13 | 15 | -- The GHCi Monad lifting interface.
|
| ... | ... | @@ -20,8 +22,12 @@ |
| 20 | 22 | -- change rapidly without much warning.
|
| 21 | 23 | --
|
| 22 | 24 | |
| 25 | +#if __GLASGOW_HASKELL__ >= 1002
|
|
| 26 | +#error "GHC.GHCi should be removed in GHC 10.02."
|
|
| 27 | +#endif
|
|
| 28 | + |
|
| 23 | 29 | module GHC.GHCi
|
| 24 | - {-# WARNING "This is an unstable interface." #-}
|
|
| 30 | + {-# DEPRECATED "GHC.GHCi is deprecated and will be removed in GHC 10.02. See https://github.com/well-typed/reinstallable-base/tree/main/hackage-uses-of-internals/stability-risk-3 for context." #-}
|
|
| 25 | 31 | (GHCiSandboxIO(..),
|
| 26 | 32 | NoIO()
|
| 27 | 33 | ) where
|
| 1 | +{-# LANGUAGE CPP #-}
|
|
| 2 | + |
|
| 1 | 3 | {-# LANGUAGE Safe #-}
|
| 2 | 4 | |
| 3 | 5 | -- |
|
| ... | ... | @@ -7,7 +9,7 @@ |
| 7 | 9 | -- License : see libraries/base/LICENSE
|
| 8 | 10 | --
|
| 9 | 11 | -- Maintainer : ghc-devs@haskell.org
|
| 10 | --- Stability : internal
|
|
| 12 | +-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/392>)
|
|
| 11 | 13 | -- Portability : non-portable (GHC Extensions)
|
| 12 | 14 | --
|
| 13 | 15 | -- Various helpers used by the GHCi shell.
|
| ... | ... | @@ -18,7 +20,12 @@ |
| 18 | 20 | -- change rapidly without much warning.
|
| 19 | 21 | --
|
| 20 | 22 | |
| 23 | +#if __GLASGOW_HASKELL__ >= 1002
|
|
| 24 | +#error "GHC.GHCi.Helpers should be removed in GHC 10.02."
|
|
| 25 | +#endif
|
|
| 26 | + |
|
| 21 | 27 | module GHC.GHCi.Helpers
|
| 28 | + {-# DEPRECATED "GHC.GHCi.Helpers is deprecated and will be removed in GHC 10.02. See https://github.com/well-typed/reinstallable-base/tree/main/hackage-uses-of-internals/stability-risk-3 for context." #-}
|
|
| 22 | 29 | (disableBuffering,
|
| 23 | 30 | flushAll,
|
| 24 | 31 | evalWrapper
|
| 1 | +{-# LANGUAGE CPP #-}
|
|
| 2 | + |
|
| 1 | 3 | {-# LANGUAGE Safe #-}
|
| 2 | 4 | {-# OPTIONS_HADDOCK not-home #-}
|
| 3 | 5 | |
| ... | ... | @@ -8,7 +10,7 @@ |
| 8 | 10 | -- License : see libraries/base/LICENSE
|
| 9 | 11 | --
|
| 10 | 12 | -- Maintainer : libraries@haskell.org
|
| 11 | --- Stability : internal
|
|
| 13 | +-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/392>)
|
|
| 12 | 14 | -- Portability : non-portable
|
| 13 | 15 | --
|
| 14 | 16 | -- This module defines the basic operations on I\/O \"handles\". All
|
| ... | ... | @@ -21,7 +23,12 @@ |
| 21 | 23 | -- change rapidly without much warning.
|
| 22 | 24 | --
|
| 23 | 25 | |
| 26 | +#if __GLASGOW_HASKELL__ >= 1002
|
|
| 27 | +#error "GHC.IO.Handle.Internals should be removed in GHC 10.02."
|
|
| 28 | +#endif
|
|
| 29 | + |
|
| 24 | 30 | module GHC.IO.Handle.Internals
|
| 31 | + {-# DEPRECATED "GHC.IO.Handle.Internals is deprecated and will be removed in GHC 10.02. See https://github.com/well-typed/reinstallable-base/tree/main/hackage-uses-of-internals/stability-risk-3 for context." #-}
|
|
| 25 | 32 | (withHandle,
|
| 26 | 33 | withHandle',
|
| 27 | 34 | withHandle_,
|
| 1 | +{-# LANGUAGE CPP #-}
|
|
| 2 | + |
|
| 1 | 3 | {-# LANGUAGE Safe #-}
|
| 2 | 4 | {-# OPTIONS_HADDOCK not-home #-}
|
| 3 | 5 | |
| ... | ... | @@ -7,7 +9,7 @@ |
| 7 | 9 | -- License : see libraries/base/LICENSE
|
| 8 | 10 | --
|
| 9 | 11 | -- Maintainer : libraries@haskell.org
|
| 10 | --- Stability : internal
|
|
| 12 | +-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/392>)
|
|
| 11 | 13 | -- Portability : non-portable
|
| 12 | 14 | --
|
| 13 | 15 | -- Basic types for the implementation of IO Handles.
|
| ... | ... | @@ -18,7 +20,12 @@ |
| 18 | 20 | -- change rapidly without much warning.
|
| 19 | 21 | --
|
| 20 | 22 | |
| 23 | +#if __GLASGOW_HASKELL__ >= 1002
|
|
| 24 | +#error "GHC.IO.Handle.Types should be removed in GHC 10.02."
|
|
| 25 | +#endif
|
|
| 26 | + |
|
| 21 | 27 | module GHC.IO.Handle.Types (
|
| 28 | + {-# DEPRECATED "GHC.IO.Handle.Types is deprecated and will be removed in GHC 10.02. See https://github.com/well-typed/reinstallable-base/tree/main/hackage-uses-of-internals/stability-risk-3 for context." #-}
|
|
| 22 | 29 | Handle(..), Handle__(..), showHandle,
|
| 23 | 30 | checkHandleInvariants,
|
| 24 | 31 | BufferList(..),
|
| 1 | +{-# LANGUAGE CPP #-}
|
|
| 2 | + |
|
| 1 | 3 | {-# LANGUAGE Safe #-}
|
| 2 | 4 | |
| 3 | 5 | -- |
|
| ... | ... | @@ -7,7 +9,7 @@ |
| 7 | 9 | -- License : see libraries/base/LICENSE
|
| 8 | 10 | --
|
| 9 | 11 | -- Maintainer : libraries@haskell.org
|
| 10 | --- Stability : internal
|
|
| 12 | +-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/392>)
|
|
| 11 | 13 | -- Portability : non-portable
|
| 12 | 14 | --
|
| 13 | 15 | -- The 'IoSubSystem' control interface. These methods can be used to disambiguate
|
| ... | ... | @@ -19,7 +21,12 @@ |
| 19 | 21 | -- change rapidly without much warning.
|
| 20 | 22 | --
|
| 21 | 23 | |
| 24 | +#if __GLASGOW_HASKELL__ >= 1002
|
|
| 25 | +#error "GHC.IO.SubSystem should be removed in GHC 10.02."
|
|
| 26 | +#endif
|
|
| 27 | + |
|
| 22 | 28 | module GHC.IO.SubSystem
|
| 29 | + {-# DEPRECATED "GHC.IO.SubSystem is deprecated and will be removed in GHC 10.02. See https://github.com/well-typed/reinstallable-base/tree/main/hackage-uses-of-internals/stability-risk-3 for context." #-}
|
|
| 23 | 30 | (withIoSubSystem,
|
| 24 | 31 | withIoSubSystem',
|
| 25 | 32 | whenIoSubSystem,
|
| ... | ... | @@ -47,12 +47,12 @@ import GHC.IO.Windows.Handle |
| 47 | 47 | toHANDLE
|
| 48 | 48 | )
|
| 49 | 49 | #endif
|
| 50 | -import GHC.IO.Handle.Types
|
|
| 50 | +import GHC.Internal.IO.Handle.Types
|
|
| 51 | 51 | (
|
| 52 | 52 | Handle (FileHandle, DuplexHandle),
|
| 53 | 53 | Handle__ (Handle__, haDevice)
|
| 54 | 54 | )
|
| 55 | -import GHC.IO.Handle.Internals (withHandle_', flushBuffer)
|
|
| 55 | +import GHC.Internal.IO.Handle.Internals (withHandle_', flushBuffer)
|
|
| 56 | 56 | import GHC.IO.Exception
|
| 57 | 57 | (
|
| 58 | 58 | IOErrorType (InappropriateType),
|
| 1 | +{-# LANGUAGE CPP #-}
|
|
| 2 | + |
|
| 1 | 3 | {-# LANGUAGE Safe #-}
|
| 2 | 4 | {-# OPTIONS_HADDOCK not-home #-}
|
| 3 | 5 | |
| ... | ... | @@ -7,7 +9,7 @@ |
| 7 | 9 | -- License : see libraries/base/LICENSE
|
| 8 | 10 | --
|
| 9 | 11 | -- Maintainer : ghc-devs@haskell.org
|
| 10 | --- Stability : internal
|
|
| 12 | +-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/392>)
|
|
| 11 | 13 | -- Portability : non-portable (requires POSIX)
|
| 12 | 14 | --
|
| 13 | 15 | -- POSIX support layer for the standard libraries.
|
| ... | ... | @@ -23,7 +25,12 @@ |
| 23 | 25 | -- * S_ISSOCK (no sockets in POSIX)
|
| 24 | 26 | --
|
| 25 | 27 | |
| 28 | +#if __GLASGOW_HASKELL__ >= 1002
|
|
| 29 | +#error "System.Posix.Internals should be removed in GHC 10.02."
|
|
| 30 | +#endif
|
|
| 31 | + |
|
| 26 | 32 | module System.Posix.Internals
|
| 33 | + {-# DEPRECATED "System.Posix.Internals is deprecated and will be removed in GHC 10.02. See https://github.com/well-typed/reinstallable-base/tree/main/hackage-uses-of-internals/stability-risk-3 for context." #-}
|
|
| 27 | 34 | ( module GHC.Internal.System.Posix.Internals -- TODO: deprecate
|
| 28 | 35 | ) where
|
| 29 | 36 |
| 1 | +T23697.hsc:11:1: warning: [GHC-15328] [-Wdeprecations (in -Wextended-warnings)]
|
|
| 2 | + Module ‘System.Posix.Internals’ is deprecated:
|
|
| 3 | + "System.Posix.Internals is deprecated and will be removed in GHC 10.02. See https://github.com/well-typed/reinstallable-base/tree/main/hackage-uses-of-internals/stability-risk-3 for context." |