Commit 39a2b895 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Make Package datatype abstract

parent 14aec31f
module Hadrian.Haskell.Package (
Package (..), PackageName (..), PackageType (..),
Package, PackageName (..), PackageType (..),
-- * Queries
pkgNameString, pkgCabalFile,
pkgName, pkgPath, pkgType, pkgNameString, pkgCabalFile,
-- * Helpers for constructing and using 'Package's
setPath, topLevel, library, utility, setType, isLibrary, isProgram
) where
......
......@@ -181,7 +181,7 @@ installPackages = do
installLibPkgs <- topsortPackages (filter isLibrary activePackages)
forM_ installLibPkgs $ \pkg@Package{..} -> do
forM_ installLibPkgs $ \pkg -> do
when (isLibrary pkg) $
withLatestBuildStage pkg $ \stage -> do
let context = vanillaContext stage pkg
......@@ -211,7 +211,7 @@ installPackages = do
pref <- setting InstallPrefix
unit $ cmd ghcCabalInplace [ "copy"
, pkgPath
, pkgPath pkg
, installDistDir
, strip
, destDir
......@@ -228,7 +228,7 @@ installPackages = do
, installedPackageConf, "update"
, confPath ]
forM_ installLibPkgs $ \pkg@Package{..} -> do
forM_ installLibPkgs $ \pkg -> do
when (isLibrary pkg) $
withLatestBuildStage pkg $ \stage -> do
let context = vanillaContext stage pkg
......@@ -241,7 +241,7 @@ installPackages = do
r <- relocatableBuild
unit $ cmd ghcCabalInplace
[ "register"
, pkgPath
, pkgPath pkg
, installDistDir
, installedGhcReal
, installedGhcPkgReal
......
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