[GHC] #8244: Removing the Cabal dependency

GHC ghc-devs at haskell.org
Mon Sep 9 22:52:08 CEST 2013


#8244: Removing the Cabal dependency
-------------------------------------+------------------------------------
        Reporter:  nh2               |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by JeanPhilippeMoresmau):

 I tried to see what could work. This is what I've done so far:
 - created a new distribution-base library (the name avoids any reference
 to Cabal, don't know if it's wise)
 - build that library instead of Cabal in stage0 and stage1
 - reference that library instead of Cabal in ghc.cabal, pkg-pkg.cabal,
 Cabal.Cabal
 - add the dependency when building ghc-cabal and ghc-tags, both need the
 full Cabal anyway.

 The distribution-base library contains the following modules:
 - Distribution.Compat.ParseUtils: the bits of Cabal's
 Distribution.ParseUtils we need
 - Distribution.Compat.ReadP: Cabal's ReadP
 - Distribution.InstalledPackageInfo: Cabal's
 Distribution.InstalledPackageInfo
 - Distribution.License: Cabal's Distribution.License
 - Distribution.ModuleName: Cabal's Distribution.ModuleName
 - Distribution.Package: Cabal's Distribution.Package minus the Dependency
 type and related functions (unused in GHC)
 - Distribution.PackageIndex: the bits of Cabal's
 Distribution.Simple.PackageIndex we need
 - Distribution.Text: Cabal's Distribution.Text
 - Distribution.Utils: the bits of Cabal's Distribution.Simple.Utils we
 need

 Note that Distribution.Version is not needed by GHC, even though it used
 to import it, it only used the datatype from base, and the Data instance
 I've moved to Distribution.Package.
 I've created a new Cabal module called Distribution.Dependency since the
 Dependency type is not needed, in the Cabal source code it's mainly
 imports that need to change.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8244#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler




More information about the ghc-tickets mailing list