ghc-boot (empty) → 8.0.1
raw patch · 9 files changed
+655/−0 lines, 9 filesdep +basedep +binarydep +bytestringsetup-changed
Dependencies added: base, binary, bytestring, directory, filepath, ghc-boot-th
Files
- GHC/LanguageExtensions.hs +17/−0
- GHC/LanguageExtensions/Type.hs +5/−0
- GHC/Lexeme.hs +5/−0
- GHC/PackageDb.hs +385/−0
- GHC/Serialized.hs +155/−0
- LICENSE +31/−0
- Setup.hs +2/−0
- changelog.md +5/−0
- ghc-boot.cabal +50/−0
+ GHC/LanguageExtensions.hs view
@@ -0,0 +1,17 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- | This module re-exports the 'Extension' type along with an orphan 'Binary'+-- instance for it.+--+-- Note that the @ghc-boot@ package has a large set of dependencies; for this+-- reason the 'Extension' type itself is defined in the+-- "GHC.LanguageExtensions.Type" module provided by the @ghc-boot-th@ package,+-- which has no dependencies outside of @base@. For this reason+-- @template-haskell@ depends upon @ghc-boot-th@, not @ghc-boot@.+--+module GHC.LanguageExtensions ( module GHC.LanguageExtensions.Type ) where++import Data.Binary+import GHC.LanguageExtensions.Type++instance Binary Extension
+ GHC/LanguageExtensions/Type.hs view
@@ -0,0 +1,5 @@+{-# LANGUAGE PackageImports #-}++module GHC.LanguageExtensions.Type ( module X ) where++import "ghc-boot-th" GHC.LanguageExtensions.Type as X
+ GHC/Lexeme.hs view
@@ -0,0 +1,5 @@+{-# LANGUAGE PackageImports #-}++module GHC.Lexeme ( module X ) where++import "ghc-boot-th" GHC.Lexeme as X
+ GHC/PackageDb.hs view
@@ -0,0 +1,385 @@+{-# LANGUAGE ConstraintKinds #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+-----------------------------------------------------------------------------+-- |+-- Module : GHC.PackageDb+-- Copyright : (c) The University of Glasgow 2009, Duncan Coutts 2014+--+-- Maintainer : ghc-devs@haskell.org+-- Portability : portable+--+-- This module provides the view of GHC's database of registered packages that+-- is shared between GHC the compiler\/library, and the ghc-pkg program. It+-- defines the database format that is shared between GHC and ghc-pkg.+--+-- The database format, and this library are constructed so that GHC does not+-- have to depend on the Cabal library. The ghc-pkg program acts as the+-- gateway between the external package format (which is defined by Cabal) and+-- the internal package format which is specialised just for GHC.+--+-- GHC the compiler only needs some of the information which is kept about+-- registerd packages, such as module names, various paths etc. On the other+-- hand ghc-pkg has to keep all the information from Cabal packages and be able+-- to regurgitate it for users and other tools.+--+-- The first trick is that we duplicate some of the information in the package+-- database. We essentially keep two versions of the datbase in one file, one+-- version used only by ghc-pkg which keeps the full information (using the+-- serialised form of the 'InstalledPackageInfo' type defined by the Cabal+-- library); and a second version written by ghc-pkg and read by GHC which has+-- just the subset of information that GHC needs.+--+-- The second trick is that this module only defines in detail the format of+-- the second version -- the bit GHC uses -- and the part managed by ghc-pkg+-- is kept in the file but here we treat it as an opaque blob of data. That way+-- this library avoids depending on Cabal.+--+module GHC.PackageDb (+ InstalledPackageInfo(..),+ ExposedModule(..),+ OriginalModule(..),+ BinaryStringRep(..),+ emptyInstalledPackageInfo,+ readPackageDbForGhc,+ readPackageDbForGhcPkg,+ writePackageDb+ ) where++import Data.Version (Version(..))+import qualified Data.ByteString as BS+import qualified Data.ByteString.Char8 as BS.Char8+import qualified Data.ByteString.Lazy as BS.Lazy+import qualified Data.ByteString.Lazy.Internal as BS.Lazy (defaultChunkSize)+import Data.Binary as Bin+import Data.Binary.Put as Bin+import Data.Binary.Get as Bin+import Control.Exception as Exception+import Control.Monad (when)+import System.FilePath+import System.IO+import System.IO.Error+import GHC.IO.Exception (IOErrorType(InappropriateType))+import System.Directory+++-- | This is a subset of Cabal's 'InstalledPackageInfo', with just the bits+-- that GHC is interested in.+--+data InstalledPackageInfo srcpkgid srcpkgname unitid modulename+ = InstalledPackageInfo {+ unitId :: unitid,+ sourcePackageId :: srcpkgid,+ packageName :: srcpkgname,+ packageVersion :: Version,+ abiHash :: String,+ depends :: [unitid],+ importDirs :: [FilePath],+ hsLibraries :: [String],+ extraLibraries :: [String],+ extraGHCiLibraries :: [String],+ libraryDirs :: [FilePath],+ frameworks :: [String],+ frameworkDirs :: [FilePath],+ ldOptions :: [String],+ ccOptions :: [String],+ includes :: [String],+ includeDirs :: [FilePath],+ haddockInterfaces :: [FilePath],+ haddockHTMLs :: [FilePath],+ exposedModules :: [ExposedModule unitid modulename],+ hiddenModules :: [modulename],+ exposed :: Bool,+ trusted :: Bool+ }+ deriving (Eq, Show)++-- | A convenience constraint synonym for common constraints over parameters+-- to 'InstalledPackageInfo'.+type RepInstalledPackageInfo srcpkgid srcpkgname unitid modulename =+ (BinaryStringRep srcpkgid, BinaryStringRep srcpkgname,+ BinaryStringRep unitid, BinaryStringRep modulename)++-- | An original module is a fully-qualified module name (installed package ID+-- plus module name) representing where a module was *originally* defined+-- (i.e., the 'exposedReexport' field of the original ExposedModule entry should+-- be 'Nothing'). Invariant: an OriginalModule never points to a reexport.+data OriginalModule unitid modulename+ = OriginalModule {+ originalPackageId :: unitid,+ originalModuleName :: modulename+ }+ deriving (Eq, Show)++-- | Represents a module name which is exported by a package, stored in the+-- 'exposedModules' field. A module export may be a reexport (in which case+-- 'exposedReexport' is filled in with the original source of the module).+-- Thus:+--+-- * @ExposedModule n Nothing@ represents an exposed module @n@ which+-- was defined in this package.+--+-- * @ExposedModule n (Just o)@ represents a reexported module @n@+-- which was originally defined in @o@.+--+-- We use a 'Maybe' data types instead of an ADT with two branches because this+-- representation allows us to treat reexports uniformly.+data ExposedModule unitid modulename+ = ExposedModule {+ exposedName :: modulename,+ exposedReexport :: Maybe (OriginalModule unitid modulename)+ }+ deriving (Eq, Show)++class BinaryStringRep a where+ fromStringRep :: BS.ByteString -> a+ toStringRep :: a -> BS.ByteString++emptyInstalledPackageInfo :: RepInstalledPackageInfo a b c d+ => InstalledPackageInfo a b c d+emptyInstalledPackageInfo =+ InstalledPackageInfo {+ unitId = fromStringRep BS.empty,+ sourcePackageId = fromStringRep BS.empty,+ packageName = fromStringRep BS.empty,+ packageVersion = Version [] [],+ abiHash = "",+ depends = [],+ importDirs = [],+ hsLibraries = [],+ extraLibraries = [],+ extraGHCiLibraries = [],+ libraryDirs = [],+ frameworks = [],+ frameworkDirs = [],+ ldOptions = [],+ ccOptions = [],+ includes = [],+ includeDirs = [],+ haddockInterfaces = [],+ haddockHTMLs = [],+ exposedModules = [],+ hiddenModules = [],+ exposed = False,+ trusted = False+ }++-- | Read the part of the package DB that GHC is interested in.+--+readPackageDbForGhc :: RepInstalledPackageInfo a b c d =>+ FilePath -> IO [InstalledPackageInfo a b c d]+readPackageDbForGhc file =+ decodeFromFile file getDbForGhc+ where+ getDbForGhc = do+ _version <- getHeader+ _ghcPartLen <- get :: Get Word32+ ghcPart <- get+ -- the next part is for ghc-pkg, but we stop here.+ return ghcPart++-- | Read the part of the package DB that ghc-pkg is interested in+--+-- Note that the Binary instance for ghc-pkg's representation of packages+-- is not defined in this package. This is because ghc-pkg uses Cabal types+-- (and Binary instances for these) which this package does not depend on.+--+readPackageDbForGhcPkg :: Binary pkgs => FilePath -> IO pkgs+readPackageDbForGhcPkg file =+ decodeFromFile file getDbForGhcPkg+ where+ getDbForGhcPkg = do+ _version <- getHeader+ -- skip over the ghc part+ ghcPartLen <- get :: Get Word32+ _ghcPart <- skip (fromIntegral ghcPartLen)+ -- the next part is for ghc-pkg+ ghcPkgPart <- get+ return ghcPkgPart++-- | Write the whole of the package DB, both parts.+--+writePackageDb :: (Binary pkgs, RepInstalledPackageInfo a b c d) =>+ FilePath -> [InstalledPackageInfo a b c d] -> pkgs -> IO ()+writePackageDb file ghcPkgs ghcPkgPart =+ writeFileAtomic file (runPut putDbForGhcPkg)+ where+ putDbForGhcPkg = do+ putHeader+ put ghcPartLen+ putLazyByteString ghcPart+ put ghcPkgPart+ where+ ghcPartLen :: Word32+ ghcPartLen = fromIntegral (BS.Lazy.length ghcPart)+ ghcPart = encode ghcPkgs++getHeader :: Get (Word32, Word32)+getHeader = do+ magic <- getByteString (BS.length headerMagic)+ when (magic /= headerMagic) $+ fail "not a ghc-pkg db file, wrong file magic number"++ majorVersion <- get :: Get Word32+ -- The major version is for incompatible changes++ minorVersion <- get :: Get Word32+ -- The minor version is for compatible extensions++ when (majorVersion /= 1) $+ fail "unsupported ghc-pkg db format version"+ -- If we ever support multiple major versions then we'll have to change+ -- this code++ -- The header can be extended without incrementing the major version,+ -- we ignore fields we don't know about (currently all).+ headerExtraLen <- get :: Get Word32+ skip (fromIntegral headerExtraLen)++ return (majorVersion, minorVersion)++putHeader :: Put+putHeader = do+ putByteString headerMagic+ put majorVersion+ put minorVersion+ put headerExtraLen+ where+ majorVersion = 1 :: Word32+ minorVersion = 0 :: Word32+ headerExtraLen = 0 :: Word32++headerMagic :: BS.ByteString+headerMagic = BS.Char8.pack "\0ghcpkg\0"+++-- TODO: we may be able to replace the following with utils from the binary+-- package in future.++-- | Feed a 'Get' decoder with data chunks from a file.+--+decodeFromFile :: FilePath -> Get a -> IO a+decodeFromFile file decoder =+ withBinaryFile file ReadMode $ \hnd ->+ feed hnd (runGetIncremental decoder)+ where+ feed hnd (Partial k) = do chunk <- BS.hGet hnd BS.Lazy.defaultChunkSize+ if BS.null chunk+ then feed hnd (k Nothing)+ else feed hnd (k (Just chunk))+ feed _ (Done _ _ res) = return res+ feed _ (Fail _ _ msg) = ioError err+ where+ err = mkIOError InappropriateType loc Nothing (Just file)+ `ioeSetErrorString` msg+ loc = "GHC.PackageDb.readPackageDb"++-- Copied from Cabal's Distribution.Simple.Utils.+writeFileAtomic :: FilePath -> BS.Lazy.ByteString -> IO ()+writeFileAtomic targetPath content = do+ let (targetDir, targetFile) = splitFileName targetPath+ Exception.bracketOnError+ (openBinaryTempFileWithDefaultPermissions targetDir $ targetFile <.> "tmp")+ (\(tmpPath, handle) -> hClose handle >> removeFile tmpPath)+ (\(tmpPath, handle) -> do+ BS.Lazy.hPut handle content+ hClose handle+ renameFile tmpPath targetPath)++instance (RepInstalledPackageInfo a b c d) =>+ Binary (InstalledPackageInfo a b c d) where+ put (InstalledPackageInfo+ unitId sourcePackageId+ packageName packageVersion+ abiHash depends importDirs+ hsLibraries extraLibraries extraGHCiLibraries libraryDirs+ frameworks frameworkDirs+ ldOptions ccOptions+ includes includeDirs+ haddockInterfaces haddockHTMLs+ exposedModules hiddenModules+ exposed trusted) = do+ put (toStringRep sourcePackageId)+ put (toStringRep packageName)+ put packageVersion+ put (toStringRep unitId)+ put abiHash+ put (map toStringRep depends)+ put importDirs+ put hsLibraries+ put extraLibraries+ put extraGHCiLibraries+ put libraryDirs+ put frameworks+ put frameworkDirs+ put ldOptions+ put ccOptions+ put includes+ put includeDirs+ put haddockInterfaces+ put haddockHTMLs+ put exposedModules+ put (map toStringRep hiddenModules)+ put exposed+ put trusted++ get = do+ sourcePackageId <- get+ packageName <- get+ packageVersion <- get+ unitId <- get+ abiHash <- get+ depends <- get+ importDirs <- get+ hsLibraries <- get+ extraLibraries <- get+ extraGHCiLibraries <- get+ libraryDirs <- get+ frameworks <- get+ frameworkDirs <- get+ ldOptions <- get+ ccOptions <- get+ includes <- get+ includeDirs <- get+ haddockInterfaces <- get+ haddockHTMLs <- get+ exposedModules <- get+ hiddenModules <- get+ exposed <- get+ trusted <- get+ return (InstalledPackageInfo+ (fromStringRep unitId)+ (fromStringRep sourcePackageId)+ (fromStringRep packageName) packageVersion+ abiHash+ (map fromStringRep depends)+ importDirs+ hsLibraries extraLibraries extraGHCiLibraries libraryDirs+ frameworks frameworkDirs+ ldOptions ccOptions+ includes includeDirs+ haddockInterfaces haddockHTMLs+ exposedModules+ (map fromStringRep hiddenModules)+ exposed trusted)++instance (BinaryStringRep a, BinaryStringRep b) =>+ Binary (OriginalModule a b) where+ put (OriginalModule originalPackageId originalModuleName) = do+ put (toStringRep originalPackageId)+ put (toStringRep originalModuleName)+ get = do+ originalPackageId <- get+ originalModuleName <- get+ return (OriginalModule (fromStringRep originalPackageId)+ (fromStringRep originalModuleName))++instance (BinaryStringRep a, BinaryStringRep b) =>+ Binary (ExposedModule a b) where+ put (ExposedModule exposedName exposedReexport) = do+ put (toStringRep exposedName)+ put exposedReexport+ get = do+ exposedName <- get+ exposedReexport <- get+ return (ExposedModule (fromStringRep exposedName)+ exposedReexport)
+ GHC/Serialized.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}++--+-- (c) The University of Glasgow 2002-2006+--+-- Serialized values++module GHC.Serialized (+ -- * Main Serialized data type+ Serialized(..),++ -- * Going into and out of 'Serialized'+ toSerialized, fromSerialized,++ -- * Handy serialization functions+ serializeWithData, deserializeWithData,+ ) where++import Data.Bits+import Data.Word ( Word8 )+import Data.Data+++-- | Represents a serialized value of a particular type. Attempts can be made to deserialize it at certain types+data Serialized = Serialized TypeRep [Word8]++-- | Put a Typeable value that we are able to actually turn into bytes into a 'Serialized' value ready for deserialization later+toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized+toSerialized serialize what = Serialized (typeOf what) (serialize what)++-- | If the 'Serialized' value contains something of the given type, then use the specified deserializer to return @Just@ that.+-- Otherwise return @Nothing@.+fromSerialized :: forall a. Typeable a => ([Word8] -> a) -> Serialized -> Maybe a+fromSerialized deserialize (Serialized the_type bytes)+ | the_type == typeOf (undefined :: a) = Just (deserialize bytes)+ | otherwise = Nothing++-- | Use a 'Data' instance to implement a serialization scheme dual to that of 'deserializeWithData'+serializeWithData :: Data a => a -> [Word8]+serializeWithData what = serializeWithData' what []++serializeWithData' :: Data a => a -> [Word8] -> [Word8]+serializeWithData' what = fst $ gfoldl (\(before, a_to_b) a -> (before . serializeWithData' a, a_to_b a))+ (\x -> (serializeConstr (constrRep (toConstr what)), x))+ what++-- | Use a 'Data' instance to implement a deserialization scheme dual to that of 'serializeWithData'+deserializeWithData :: Data a => [Word8] -> a+deserializeWithData = snd . deserializeWithData'++deserializeWithData' :: forall a. Data a => [Word8] -> ([Word8], a)+deserializeWithData' bytes = deserializeConstr bytes $ \constr_rep bytes ->+ gunfold (\(bytes, b_to_r) -> let (bytes', b) = deserializeWithData' bytes in (bytes', b_to_r b))+ (\x -> (bytes, x))+ (repConstr (dataTypeOf (undefined :: a)) constr_rep)+++serializeConstr :: ConstrRep -> [Word8] -> [Word8]+serializeConstr (AlgConstr ix) = serializeWord8 1 . serializeInt ix+serializeConstr (IntConstr i) = serializeWord8 2 . serializeInteger i+serializeConstr (FloatConstr r) = serializeWord8 3 . serializeRational r+serializeConstr (CharConstr c) = serializeWord8 4 . serializeChar c+++deserializeConstr :: [Word8] -> (ConstrRep -> [Word8] -> a) -> a+deserializeConstr bytes k = deserializeWord8 bytes $ \constr_ix bytes ->+ case constr_ix of+ 1 -> deserializeInt bytes $ \ix -> k (AlgConstr ix)+ 2 -> deserializeInteger bytes $ \i -> k (IntConstr i)+ 3 -> deserializeRational bytes $ \r -> k (FloatConstr r)+ 4 -> deserializeChar bytes $ \c -> k (CharConstr c)+ x -> error $ "deserializeConstr: unrecognised serialized constructor type " ++ show x ++ " in context " ++ show bytes+++serializeFixedWidthNum :: forall a. (Integral a, FiniteBits a) => a -> [Word8] -> [Word8]+serializeFixedWidthNum what = go (finiteBitSize what) what+ where+ go :: Int -> a -> [Word8] -> [Word8]+ go size current rest+ | size <= 0 = rest+ | otherwise = fromIntegral (current .&. 255) : go (size - 8) (current `shiftR` 8) rest++deserializeFixedWidthNum :: forall a b. (Integral a, FiniteBits a) => [Word8] -> (a -> [Word8] -> b) -> b+deserializeFixedWidthNum bytes k = go (finiteBitSize (undefined :: a)) bytes k+ where+ go :: Int -> [Word8] -> (a -> [Word8] -> b) -> b+ go size bytes k+ | size <= 0 = k 0 bytes+ | otherwise = case bytes of+ (byte:bytes) -> go (size - 8) bytes (\x -> k ((x `shiftL` 8) .|. fromIntegral byte))+ [] -> error "deserializeFixedWidthNum: unexpected end of stream"+++serializeEnum :: (Enum a) => a -> [Word8] -> [Word8]+serializeEnum = serializeInt . fromEnum++deserializeEnum :: Enum a => [Word8] -> (a -> [Word8] -> b) -> b+deserializeEnum bytes k = deserializeInt bytes (k . toEnum)+++serializeWord8 :: Word8 -> [Word8] -> [Word8]+serializeWord8 x = (x:)++deserializeWord8 :: [Word8] -> (Word8 -> [Word8] -> a) -> a+deserializeWord8 (byte:bytes) k = k byte bytes+deserializeWord8 [] _ = error "deserializeWord8: unexpected end of stream"+++serializeInt :: Int -> [Word8] -> [Word8]+serializeInt = serializeFixedWidthNum++deserializeInt :: [Word8] -> (Int -> [Word8] -> a) -> a+deserializeInt = deserializeFixedWidthNum+++serializeRational :: (Real a) => a -> [Word8] -> [Word8]+serializeRational = serializeString . show . toRational++deserializeRational :: (Fractional a) => [Word8] -> (a -> [Word8] -> b) -> b+deserializeRational bytes k = deserializeString bytes (k . fromRational . read)+++serializeInteger :: Integer -> [Word8] -> [Word8]+serializeInteger = serializeString . show++deserializeInteger :: [Word8] -> (Integer -> [Word8] -> a) -> a+deserializeInteger bytes k = deserializeString bytes (k . read)+++serializeChar :: Char -> [Word8] -> [Word8]+serializeChar = serializeString . show++deserializeChar :: [Word8] -> (Char -> [Word8] -> a) -> a+deserializeChar bytes k = deserializeString bytes (k . read)+++serializeString :: String -> [Word8] -> [Word8]+serializeString = serializeList serializeEnum++deserializeString :: [Word8] -> (String -> [Word8] -> a) -> a+deserializeString = deserializeList deserializeEnum+++serializeList :: (a -> [Word8] -> [Word8]) -> [a] -> [Word8] -> [Word8]+serializeList serialize_element xs = serializeInt (length xs) . foldr (.) id (map serialize_element xs)++deserializeList :: forall a b. (forall c. [Word8] -> (a -> [Word8] -> c) -> c)+ -> [Word8] -> ([a] -> [Word8] -> b) -> b+deserializeList deserialize_element bytes k = deserializeInt bytes $ \len bytes -> go len bytes k+ where+ go :: Int -> [Word8] -> ([a] -> [Word8] -> b) -> b+ go len bytes k+ | len <= 0 = k [] bytes+ | otherwise = deserialize_element bytes (\elt bytes -> go (len - 1) bytes (k . (elt:)))
+ LICENSE view
@@ -0,0 +1,31 @@+The Glasgow Haskell Compiler License++Copyright 2002, The University Court of the University of Glasgow. +All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++- Redistributions of source code must retain the above copyright notice,+this list of conditions and the following disclaimer.+ +- Redistributions in binary form must reproduce the above copyright notice,+this list of conditions and the following disclaimer in the documentation+and/or other materials provided with the distribution.+ +- Neither name of the University nor the names of its contributors may be+used to endorse or promote products derived from this software without+specific prior written permission. ++THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF+GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE+UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH+DAMAGE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ changelog.md view
@@ -0,0 +1,5 @@+## 8.0.1 *May 2016*++ * Bundled with GHC 8.0.1++ * Initial version
+ ghc-boot.cabal view
@@ -0,0 +1,50 @@+-- WARNING: ghc-boot.cabal is automatically generated from ghc-boot.cabal.in by+-- ../../configure. Make sure you are editing ghc-boot.cabal.in, not+-- ghc-boot.cabal.++name: ghc-boot+version: 8.0.1+license: BSD3+license-file: LICENSE+category: GHC+maintainer: ghc-devs@haskell.org+bug-reports: https://ghc.haskell.org/trac/ghc/newticket+synopsis: Shared functionality between GHC and its boot libraries+description: This library is shared between GHC, ghc-pkg, and other boot+ libraries.+ .+ A note about "GHC.PackageDb": it only deals with the subset of+ the package database that the compiler cares about: modules+ paths etc and not package metadata like description, authors+ etc. It is thus not a library interface to ghc-pkg and is *not*+ suitable for modifying GHC package databases.+ .+ The package database format and this library are constructed in+ such a way that while ghc-pkg depends on Cabal, the GHC library+ and program do not have to depend on Cabal.+cabal-version: >=1.22+build-type: Simple+extra-source-files: changelog.md++source-repository head+ type: git+ location: http://git.haskell.org/ghc.git+ subdir: libraries/ghc-boot++Library+ default-language: Haskell2010+ other-extensions: DeriveGeneric, RankNTypes, ScopedTypeVariables++ exposed-modules:+ GHC.LanguageExtensions+ GHC.LanguageExtensions.Type+ GHC.Lexeme+ GHC.PackageDb+ GHC.Serialized++ build-depends: base >= 4.7 && < 4.10,+ binary == 0.8.*,+ bytestring == 0.10.*,+ directory == 1.2.*,+ filepath >= 1.3 && < 1.5,+ ghc-boot-th == 8.0.1