Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
2153d073
Commit
2153d073
authored
Dec 03, 2004
by
simonmar
Browse files
[project @ 2004-12-03 13:01:28 by simonmar]
Support the --auto-ghci-libs option in conjuction with 'register'.
parent
a86cd3cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/utils/ghc-pkg/Main.hs
View file @
2153d073
...
...
@@ -104,6 +104,7 @@ data Flag
|
FlagConfig
FilePath
|
FlagGlobalConfig
FilePath
|
FlagForce
|
FlagAutoGHCiLibs
deriving
Eq
flags
::
[
OptDescr
Flag
]
...
...
@@ -118,6 +119,8 @@ flags = [
"location of the global package config"
,
Option
[]
[
"force"
]
(
NoArg
FlagForce
)
"ignore missing dependencies, directories, and libraries"
,
Option
[
'g'
]
[
"auto-ghci-libs"
]
(
NoArg
FlagAutoGHCiLibs
)
"automatically build libs for GHCi (with register)"
,
Option
[
'?'
]
[
"help"
]
(
NoArg
FlagHelp
)
"display this help and exit"
,
Option
[
'V'
]
[
"version"
]
(
NoArg
FlagVersion
)
...
...
@@ -175,13 +178,14 @@ runit cli nonopts = do
db_stack
<-
mapM
readParseDatabase
dbs
let
force
=
FlagForce
`
elem
`
cli
auto_ghci_libs
=
FlagAutoGHCiLibs
`
elem
`
cli
--
-- first, parse the command
case
nonopts
of
[
"register"
,
filename
]
->
registerPackage
filename
[]
db_stack
False
False
force
registerPackage
filename
[]
db_stack
auto_ghci_libs
False
force
[
"update"
,
filename
]
->
registerPackage
filename
[]
db_stack
False
True
force
registerPackage
filename
[]
db_stack
auto_ghci_libs
True
force
[
"unregister"
,
pkgid_str
]
->
do
pkgid
<-
readPkgId
pkgid_str
unregisterPackage
db_stack
pkgid
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment