[Git][ghc/ghc][wip/clc216] base: Deprecate GHC.Desugar
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Thu Feb 15 02:41:11 UTC 2024
Ben Gamari pushed to branch wip/clc216 at Glasgow Haskell Compiler / GHC
Commits:
eb52d137 by Ben Gamari at 2024-02-14T21:41:05-05:00
base: Deprecate GHC.Desugar
See https://github.com/haskell/core-libraries-committee/issues/216.
This will be removed in GHC 9.12.
- - - - -
6 changed files:
- compiler/GHC/Builtin/Names.hs
- libraries/base/base.cabal
- libraries/base/changelog.md
- + libraries/base/src/GHC/Desugar.hs
- libraries/ghc-internal/ghc-internal.cabal
- libraries/ghc-internal/src/GHC/Desugar.hs
Changes:
=====================================
compiler/GHC/Builtin/Names.hs
=====================================
@@ -622,7 +622,7 @@ mONAD_FIX = mkGhcInternalModule (fsLit "Control.Monad.Fix")
mONAD_ZIP = mkBaseModule (fsLit "Control.Monad.Zip")
mONAD_FAIL = mkGhcInternalModule (fsLit "Control.Monad.Fail")
aRROW = mkGhcInternalModule (fsLit "Control.Arrow")
-gHC_DESUGAR = mkGhcInternalModule (fsLit "GHC.Desugar")
+gHC_DESUGAR = mkGhcInternalModule (fsLit "GHC.Internal.Desugar")
rANDOM = mkGhcInternalModule (fsLit "System.Random")
gHC_EXTS = mkGhcInternalModule (fsLit "GHC.Exts")
gHC_IS_LIST = mkGhcInternalModule (fsLit "GHC.IsList")
=====================================
libraries/base/base.cabal
=====================================
@@ -46,6 +46,7 @@ Library
, Data.Ratio
, Data.STRef.Lazy
, Data.Semigroup
+ , GHC.Desugar
, Prelude
, Text.Printf
, System.CPUTime
@@ -144,7 +145,6 @@ Library
, GHC.Conc.Sync
, GHC.ConsoleHandler
, GHC.Constants
- , GHC.Desugar
, GHC.Encoding.UTF8
, GHC.Enum
, GHC.Environment
=====================================
libraries/base/changelog.md
=====================================
@@ -16,6 +16,7 @@
* Deprecate `Data.List.NonEmpty.unzip` ([CLC proposal #86](https://github.com/haskell/core-libraries-committee/issues/86))
* Fix exponent overflow/underflow bugs in the `Read` instances for `Float` and `Double` ([CLC proposal #192](https://github.com/haskell/core-libraries-committee/issues/192))
* Implement `many` and `some` methods of `instance Alternative (Compose f g)` explicitly. ([CLC proposal #181](https://github.com/haskell/core-libraries-committee/issues/181))
+ * `GHC.Desugar` has been deprecated. ([CLC proposal #216](https://github.com/haskell/core-libraries-committee/issues/216))
* The functions `GHC.Exts.dataToTag#` and `GHC.Base.getTag` have had
their types changed to the following:
=====================================
libraries/base/src/GHC/Desugar.hs
=====================================
@@ -0,0 +1,30 @@
+{-# LANGUAGE CPP #-}
+
+-----------------------------------------------------------------------------
+-- |
+-- Module : GHC.Desugar
+-- Copyright : (c) The University of Glasgow, 2007
+-- License : see libraries/base/LICENSE
+--
+-- Maintainer : ghc-devs at haskell.org
+-- Stability : deprecated (<https://github.com/haskell/core-libraries-committee/issues/216>)
+-- Portability : non-portable (GHC extensions)
+--
+-- Support code for desugaring in GHC
+--
+-- /The API of this module is unstable and not meant to be consumed by the general public./
+-- If you absolutely must depend on it, make sure to use a tight upper
+-- 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
+ {-# DEPRECATED ["GHC.Desugar is deprecated.", "(>>>) 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/ghc-internal/ghc-internal.cabal
=====================================
@@ -182,7 +182,7 @@ Library
GHC.Conc.Sync
GHC.ConsoleHandler
GHC.Constants
- GHC.Desugar
+ GHC.Internal.Desugar
GHC.Encoding.UTF8
GHC.Enum
GHC.Environment
=====================================
libraries/ghc-internal/src/GHC/Desugar.hs
=====================================
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------------
-- |
--- Module : GHC.Desugar
+-- Module : GHC.Internal.Desugar
-- Copyright : (c) The University of Glasgow, 2007
-- License : see libraries/base/LICENSE
--
@@ -24,7 +24,7 @@
--
-----------------------------------------------------------------------------
-module GHC.Desugar ((>>>), AnnotationWrapper(..), toAnnotationWrapper) where
+module GHC.Internal.Desugar ((>>>), AnnotationWrapper(..), toAnnotationWrapper) where
import Control.Arrow (Arrow(..))
import Control.Category ((.))
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eb52d137fce687eaf21d8093bdecec4e3b67a9a5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eb52d137fce687eaf21d8093bdecec4e3b67a9a5
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/20240214/23214635/attachment-0001.html>
More information about the ghc-commits
mailing list