[Git][ghc/ghc][wip/clc216] base: Deprecate GHC.Desugar
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Wed Jul 31 09:22:43 UTC 2024
Rodrigo Mesquita pushed to branch wip/clc216 at Glasgow Haskell Compiler / GHC
Commits:
e5e8a162 by Ben Gamari at 2024-07-31T10:22:28+01:00
base: Deprecate GHC.Desugar
See https://github.com/haskell/core-libraries-committee/issues/216.
This will be removed in GHC 9.14.
- - - - -
5 changed files:
- compiler/GHC/Tc/Gen/Splice.hs
- libraries/base/base.cabal
- libraries/base/changelog.md
- libraries/base/src/GHC/Desugar.hs
- libraries/ghci/GHCi/TH.hs
Changes:
=====================================
compiler/GHC/Tc/Gen/Splice.hs
=====================================
@@ -136,8 +136,8 @@ import qualified GHC.Internal.TH.Syntax as TH
import qualified GHC.Internal.TH.Ppr as TH
#if defined(HAVE_INTERNAL_INTERPRETER)
--- Because GHC.Desugar might not be in the base library of the bootstrapping compiler
-import GHC.Desugar ( AnnotationWrapper(..) )
+-- Because GHC.Internal.Desugar might not be in the base library of the bootstrapping compiler
+import GHC.Internal.Desugar ( AnnotationWrapper(..) )
import Unsafe.Coerce ( unsafeCoerce )
#endif
=====================================
libraries/base/base.cabal
=====================================
@@ -55,6 +55,7 @@ Library
, Data.Ratio
, Data.STRef.Lazy
, Data.Semigroup
+ , GHC.Desugar
, Prelude
, Text.Printf
, System.CPUTime
@@ -156,7 +157,6 @@ Library
, GHC.Conc.Sync
, GHC.ConsoleHandler
, GHC.Constants
- , GHC.Desugar
, GHC.Encoding.UTF8
, GHC.Enum
, GHC.Environment
=====================================
libraries/base/changelog.md
=====================================
@@ -1,6 +1,7 @@
# Changelog for [`base` package](http://hackage.haskell.org/package/base)
## 4.21.0.0 *TBA*
+ * `GHC.Desugar` has been deprecated and should be removed in GHC 9.14. ([CLC proposal #216](https://github.com/haskell/core-libraries-committee/issues/216))
* Add a `readTixFile` field to the `HpcFlags` record in `GHC.RTS.Flags` ([CLC proposal #276](https://github.com/haskell/core-libraries-committee/issues/276))
* Add `compareLength` to `Data.List` and `Data.List.NonEmpty` ([CLC proposal #257](https://github.com/haskell/core-libraries-committee/issues/257))
* Add `INLINE[1]` to `compareInt` / `compareWord` ([CLC proposal #179](https://github.com/haskell/core-libraries-committee/issues/179))
=====================================
libraries/base/src/GHC/Desugar.hs
=====================================
@@ -1,6 +1,8 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE Safe #-}
{-# OPTIONS_HADDOCK not-home #-}
+-----------------------------------------------------------------------------
-- |
--
-- Module : GHC.Desugar
@@ -8,7 +10,7 @@
-- License : see libraries/base/LICENSE
--
-- Maintainer : ghc-devs at haskell.org
--- Stability : internal
+-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/216>)
-- Portability : non-portable (GHC extensions)
--
-- Support code for desugaring in GHC
@@ -18,11 +20,14 @@
-- bound, e.g., @base < 4.X@ rather than @base < 5@, because the interface can
-- change rapidly without much warning.
--
+-----------------------------------------------------------------------------
+
+#if __GLASGOW_HASKELL >= 912
+#error "GHC.Desugar should be removed in GHC 9.12"
+#endif
module GHC.Desugar
- ((>>>),
- AnnotationWrapper(..),
- toAnnotationWrapper
- ) where
+ {-# DEPRECATED ["GHC.Desugar is deprecated and should be removed in GHC 9.12.", "(>>>) should be imported from Control.Arrow.", "AnnotationWrapper is internal to GHC and should not be used externally."] #-}
+ ((>>>), AnnotationWrapper(..), toAnnotationWrapper) where
import GHC.Internal.Desugar
=====================================
libraries/ghci/GHCi/TH.hs
=====================================
@@ -109,7 +109,7 @@ import Data.IORef
import Data.Map (Map)
import qualified Data.Map as M
import Data.Maybe
-import GHC.Desugar
+import GHC.Internal.Desugar
import qualified GHC.Internal.TH.Syntax as TH
import Unsafe.Coerce
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e5e8a16295e6c75e7a50c40fd97c47faac4b35d7
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e5e8a16295e6c75e7a50c40fd97c47faac4b35d7
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240731/ac05f962/attachment-0001.html>
More information about the ghc-commits
mailing list