projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
09d72f1
)
[project @ 2005-03-05 13:48:42 by panne]
author
panne
<unknown>
Sat, 5 Mar 2005 13:48:42 +0000
(13:48 +0000)
committer
panne
<unknown>
Sat, 5 Mar 2005 13:48:42 +0000
(13:48 +0000)
Warning police
ghc/utils/ghc-pkg/Main.hs
patch
|
blob
|
history
ghc/utils/ghc-pkg/Makefile
patch
|
blob
|
history
diff --git
a/ghc/utils/ghc-pkg/Main.hs
b/ghc/utils/ghc-pkg/Main.hs
index
1c97030
..
5f9d4c3
100644
(file)
--- a/
ghc/utils/ghc-pkg/Main.hs
+++ b/
ghc/utils/ghc-pkg/Main.hs
@@
-18,12
+18,11
@@
module Main (main) where
import Version ( version, targetOS, targetARCH )
import Distribution.InstalledPackageInfo
import Distribution.Compat.ReadP
import Version ( version, targetOS, targetARCH )
import Distribution.InstalledPackageInfo
import Distribution.Compat.ReadP
-import Distribution.ParseUtils ( showError, ParseResult(..) )
+import Distribution.ParseUtils ( showError )
import Distribution.Package
import Distribution.Version
import Compat.Directory ( getAppUserDataDirectory, createDirectoryIfMissing )
import Compat.RawSystem ( rawSystem )
import Distribution.Package
import Distribution.Version
import Compat.Directory ( getAppUserDataDirectory, createDirectoryIfMissing )
import Compat.RawSystem ( rawSystem )
-import Control.Exception ( evaluate )
import Prelude
import Prelude
@@
-225,6
+224,7
@@
parseGlobPackageId =
return (PackageIdentifier{ pkgName = n, pkgVersion = globVersion }))
-- globVersion means "all versions"
return (PackageIdentifier{ pkgName = n, pkgVersion = globVersion }))
-- globVersion means "all versions"
+globVersion :: Version
globVersion = Version{ versionBranch=[], versionTags=["*"] }
-- -----------------------------------------------------------------------------
globVersion = Version{ versionBranch=[], versionTags=["*"] }
-- -----------------------------------------------------------------------------
@@
-281,8
+281,8
@@
getPkgDatabases modify flags = do
-- If we are not modifying (eg. list, describe etc.) then
-- the user database is included by default.
databases
-- If we are not modifying (eg. list, describe etc.) then
-- the user database is included by default.
databases
- | modify = foldl addDB [global_conf] flags
- | not modify = foldl addDB [user_conf,global_conf] flags
+ | modify = foldl addDB [global_conf] flags
+ | otherwise = foldl addDB [user_conf,global_conf] flags
-- implement the following rules:
-- --user means overlap with the user database
-- implement the following rules:
-- --user means overlap with the user database
@@
-302,7
+302,7
@@
readParseDatabase :: PackageDBName -> IO (PackageDBName,PackageDB)
readParseDatabase filename = do
str <- readFile filename
let packages = read str
readParseDatabase filename = do
str <- readFile filename
let packages = read str
- evaluate packages
+ Exception.evaluate packages
`Exception.catch` \_ ->
die (filename ++ ": parse error in package config file")
return (filename,packages)
`Exception.catch` \_ ->
die (filename ++ ": parse error in package config file")
return (filename,packages)
@@
-834,6
+834,7
@@
oldRunit clis = do
prog <- getProgramName
die (usageInfo (usageHeader prog) flags)
prog <- getProgramName
die (usageInfo (usageHeader prog) flags)
+my_head :: String -> [a] -> a
my_head s [] = error s
my_head s (x:xs) = x
my_head s [] = error s
my_head s (x:xs) = x
diff --git
a/ghc/utils/ghc-pkg/Makefile
b/ghc/utils/ghc-pkg/Makefile
index
f8ae77e
..
2e23bbe
100644
(file)
--- a/
ghc/utils/ghc-pkg/Makefile
+++ b/
ghc/utils/ghc-pkg/Makefile
@@
-76,6
+76,7
@@
Version.hs : Makefile $(TOP)/mk/version.mk
@$(RM) -f $(VERSION_HS)
@echo "Creating $(VERSION_HS) ... "
@echo "module Version where" >>$(VERSION_HS)
@$(RM) -f $(VERSION_HS)
@echo "Creating $(VERSION_HS) ... "
@echo "module Version where" >>$(VERSION_HS)
+ @echo "version, targetOS, targetARCH :: String" >>$(VERSION_HS)
@echo "version = \"$(ProjectVersion)\"" >> $(VERSION_HS)
@echo "targetOS = \"$(TargetOS_CPP)\"" >> $(VERSION_HS)
@echo "targetARCH = \"$(TargetArch_CPP)\"" >> $(VERSION_HS)
@echo "version = \"$(ProjectVersion)\"" >> $(VERSION_HS)
@echo "targetOS = \"$(TargetOS_CPP)\"" >> $(VERSION_HS)
@echo "targetARCH = \"$(TargetArch_CPP)\"" >> $(VERSION_HS)