[Git][ghc/ghc][wip/unwire-ghc-experimental] compiler: Make ghc-experimental not wired in

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Thu May 30 10:18:47 UTC 2024



Matthew Pickering pushed to branch wip/unwire-ghc-experimental at Glasgow Haskell Compiler / GHC


Commits:
f7ff8d83 by Matthew Pickering at 2024-05-30T11:14:42+01:00
compiler: Make ghc-experimental not wired in

If you need to wire in definitions, then place them in ghc-internal and
reexport them from ghc-experimental.

Ticket #24903

- - - - -


3 changed files:

- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Unit/Types.hs
- libraries/ghc-experimental/ghc-experimental.cabal


Changes:

=====================================
compiler/GHC/Builtin/Names.hs
=====================================
@@ -669,10 +669,6 @@ gHC_INTERNAL_OVER_LABELS = mkGhcInternalModule (fsLit "GHC.Internal.OverloadedLa
 gHC_INTERNAL_RECORDS :: Module
 gHC_INTERNAL_RECORDS = mkGhcInternalModule (fsLit "GHC.Internal.Records")
 
-dATA_TUPLE_EXPERIMENTAL, dATA_SUM_EXPERIMENTAL :: Module
-dATA_TUPLE_EXPERIMENTAL = mkExperimentalModule (fsLit "Data.Tuple.Experimental")
-dATA_SUM_EXPERIMENTAL = mkExperimentalModule (fsLit "Data.Sum.Experimental")
-
 rOOT_MAIN :: Module
 rOOT_MAIN       = mkMainModule (fsLit ":Main") -- Root module for initialisation
 
@@ -714,9 +710,6 @@ mkMainModule m = mkModule mainUnit (mkModuleNameFS m)
 mkMainModule_ :: ModuleName -> Module
 mkMainModule_ m = mkModule mainUnit m
 
-mkExperimentalModule :: FastString -> Module
-mkExperimentalModule m = mkModule experimentalUnit (mkModuleNameFS m)
-
 {-
 ************************************************************************
 *                                                                      *


=====================================
compiler/GHC/Unit/Types.hs
=====================================
@@ -79,7 +79,6 @@ module GHC.Unit.Types
    , mainUnit
    , thisGhcUnit
    , interactiveUnit
-   , experimentalUnit
 
    , isInteractiveModule
    , wiredInUnitIds
@@ -596,11 +595,10 @@ Make sure you change 'GHC.Unit.State.findWiredInUnits' if you add an entry here.
 -}
 
 bignumUnitId, primUnitId, ghcInternalUnitId, baseUnitId, rtsUnitId,
-  thUnitId, mainUnitId, thisGhcUnitId, interactiveUnitId,
-  experimentalUnitId :: UnitId
+  thUnitId, mainUnitId, thisGhcUnitId, interactiveUnitId :: UnitId
 
 bignumUnit, primUnit, ghcInternalUnit, baseUnit, rtsUnit,
-  thUnit, mainUnit, thisGhcUnit, interactiveUnit, experimentalUnit  :: Unit
+  thUnit, mainUnit, thisGhcUnit, interactiveUnit :: Unit
 
 primUnitId        = UnitId (fsLit "ghc-prim")
 bignumUnitId      = UnitId (fsLit "ghc-bignum")
@@ -610,7 +608,6 @@ rtsUnitId         = UnitId (fsLit "rts")
 thisGhcUnitId     = UnitId (fsLit cProjectUnitId) -- See Note [GHC's Unit Id]
 interactiveUnitId = UnitId (fsLit "interactive")
 thUnitId          = UnitId (fsLit "template-haskell")
-experimentalUnitId = UnitId (fsLit "ghc-experimental")
 
 thUnit            = RealUnit (Definite thUnitId)
 primUnit          = RealUnit (Definite primUnitId)
@@ -620,7 +617,6 @@ baseUnit          = RealUnit (Definite baseUnitId)
 rtsUnit           = RealUnit (Definite rtsUnitId)
 thisGhcUnit       = RealUnit (Definite thisGhcUnitId)
 interactiveUnit   = RealUnit (Definite interactiveUnitId)
-experimentalUnit  = RealUnit (Definite experimentalUnitId)
 
 -- | This is the package Id for the current program.  It is the default
 -- package Id if you don't specify a package name.  We don't add this prefix
@@ -639,7 +635,6 @@ wiredInUnitIds =
    , baseUnitId
    , rtsUnitId
    , thUnitId
-   , experimentalUnitId
    ]
    -- NB: ghc is no longer part of the wired-in units since its unit-id, given
    -- by hadrian or cabal, is no longer overwritten and now matches both the


=====================================
libraries/ghc-experimental/ghc-experimental.cabal
=====================================
@@ -35,4 +35,3 @@ library
                       ghc-prim >= 0.11 && < 0.12
     hs-source-dirs:   src
     default-language: Haskell2010
-    ghc-options: -this-unit-id ghc-experimental



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f7ff8d8316480c1d9e6727c8332074eeee6b6f0e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f7ff8d8316480c1d9e6727c8332074eeee6b6f0e
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/20240530/bd6e5e20/attachment-0001.html>


More information about the ghc-commits mailing list