[Git][ghc/ghc][wip/clc216] base: Deprecate GHC.Desugar
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Thu Feb 15 02:34:07 UTC 2024
Ben Gamari pushed to branch wip/clc216 at Glasgow Haskell Compiler / GHC
Commits:
b677634c by Ben Gamari at 2024-02-14T21:33:58-05:00
base: Deprecate GHC.Desugar
See https://github.com/haskell/core-libraries-committee/issues/216.
This will be removed in GHC 9.12.
- - - - -
5 changed files:
- compiler/GHC/Builtin/Names.hs
- 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/changelog.md
=====================================
@@ -17,6 +17,7 @@
* 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))
* `Foreign.C.Error.errnoToIOError` now uses the reentrant `strerror_r` to render system errors when possible ([CLC proposal #249](https://github.com/haskell/core-libraries-committee/issues/249))
* 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/b677634c0a2210f0ed309539721d46b0f096bee6
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b677634c0a2210f0ed309539721d46b0f096bee6
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/8d5f6b32/attachment-0001.html>
More information about the ghc-commits
mailing list