Commit c9336b1b authored by dterei's avatar dterei
Browse files

Clean of PackageConfig

parent 3ac28c00
-- |
-- Package configuration information: essentially the interface to Cabal, with
-- some utilities
--
-- (c) The University of Glasgow, 2004
--
module PackageConfig (
-- $package_naming
-- | Package configuration information: essentially the interface to Cabal, with some utilities
{-# OPTIONS -fno-warn-tabs #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and
-- detab the module (please do the detabbing in a separate patch). See
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
-- for details
-- * PackageId
mkPackageId, packageConfigId,
module PackageConfig (
-- $package_naming
-- * PackageId
mkPackageId, packageConfigId,
-- * The PackageConfig type: information about a package
PackageConfig,
InstalledPackageInfo_(..), display,
Version(..),
PackageIdentifier(..),
defaultPackageConfig,
-- * The PackageConfig type: information about a package
PackageConfig,
InstalledPackageInfo_(..), display,
Version(..),
PackageIdentifier(..),
defaultPackageConfig,
packageConfigToInstalledPackageInfo,
installedPackageInfoToPackageConfig,
) where
installedPackageInfoToPackageConfig
) where
#include "HsVersions.h"
import Maybes
import Module
import Distribution.InstalledPackageInfo
import Distribution.ModuleName
import Distribution.Package hiding (PackageId)
import Distribution.Text
import Distribution.Version
import Maybes
import Module
-- -----------------------------------------------------------------------------
-- Our PackageConfig type is just InstalledPackageInfo from Cabal. Later we
-- Our PackageConfig type is just InstalledPackageInfo from Cabal. Later we
-- might need to extend it with some GHC-specific stuff, but for now it's fine.
type PackageConfig = InstalledPackageInfo_ Module.ModuleName
defaultPackageConfig :: PackageConfig
defaultPackageConfig = emptyInstalledPackageInfo
......@@ -51,9 +46,9 @@ defaultPackageConfig = emptyInstalledPackageInfo
-- $package_naming
-- #package_naming#
-- Mostly the compiler deals in terms of 'PackageName's, which don't
-- have the version suffix. This is so that we don't need to know the
-- have the version suffix. This is so that we don't need to know the
-- version for the @-package-name@ flag, or know the versions of
-- wired-in packages like @base@ & @rts@. Versions are confined to the
-- wired-in packages like @base@ & @rts@. Versions are confined to the
-- package sub-system.
--
-- This means that in theory you could have multiple base packages installed
......@@ -88,3 +83,4 @@ installedPackageInfoToPackageConfig
hiddenModules = h })) =
pkgconf{ exposedModules = map mkModuleName e,
hiddenModules = map mkModuleName h }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment