Skip to content

Commit c7c124d

Browse files
committed
Revert "Remove deprecated functions from the ghci package"
This change force the bootstrap compiler to have ghc-internal. As such it breaks our build with ghc 9.8.4. A better solution would be to make this conditional on the ghc version in the cabal file! This reverts commit 2a88814.
1 parent 466600e commit c7c124d

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

libraries/ghci/GHCi/CreateBCO.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
{-# LANGUAGE UnboxedTuples #-}
77
{-# LANGUAGE RecordWildCards #-}
88
{-# LANGUAGE CPP #-}
9+
{-# OPTIONS_GHC -Wno-warnings-deprecations #-}
10+
-- TODO We want to import GHC.Internal.Base (BCO, mkApUpd0#, newBCO#) instead
11+
-- of from GHC.Exts when we can require of the bootstrap compiler to have
12+
-- ghc-internal.
913

1014
--
1115
-- (c) The University of Glasgow 2002-2006
@@ -26,8 +30,7 @@ import Data.Array.Base
2630
import Foreign hiding (newArray)
2731
import Unsafe.Coerce (unsafeCoerce)
2832
import GHC.Arr ( Array(..) )
29-
import GHC.Exts hiding ( BCO, mkApUpd0#, newBCO# )
30-
import GHC.Internal.Base ( BCO, mkApUpd0#, newBCO# )
33+
import GHC.Exts
3134
import GHC.IO
3235
import Control.Exception ( ErrorCall(..) )
3336

libraries/ghci/GHCi/TH.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{-# LANGUAGE ScopedTypeVariables, StandaloneDeriving, DeriveGeneric,
22
TupleSections, RecordWildCards, InstanceSigs, CPP #-}
33
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
4+
{-# OPTIONS_GHC -Wno-warnings-deprecations #-}
5+
-- TODO We want to import GHC.Internal.Desugar instead of GHC.Desugar when we
6+
-- can require of the bootstrap compiler to have ghc-internal.
47

58
-- |
69
-- Running TH splices
@@ -109,7 +112,7 @@ import Data.IORef
109112
import Data.Map (Map)
110113
import qualified Data.Map as M
111114
import Data.Maybe
112-
import GHC.Internal.Desugar (AnnotationWrapper(..))
115+
import GHC.Desugar (AnnotationWrapper(..))
113116
import qualified GHC.Boot.TH.Syntax as TH
114117
import Unsafe.Coerce
115118

libraries/ghci/ghci.cabal.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ library
8686
rts,
8787
array == 0.5.*,
8888
base >= 4.8 && < 4.23,
89-
ghc-internal >= 9.1001.0 && <=@[email protected],
89+
-- ghc-internal == @ProjectVersionForLib@.*
90+
-- TODO: Use GHC.Internal.Desugar and GHC.Internal.Base from
91+
-- ghc-internal instead of ignoring the deprecation warning in GHCi.TH
92+
-- and GHCi.CreateBCO when we require ghc-internal of the bootstrap
93+
-- compiler
9094
ghc-prim >= 0.5.0 && < 0.14,
9195
binary == 0.8.*,
9296
bytestring >= 0.10 && < 0.13,

0 commit comments

Comments
 (0)