Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
16ce00f5
Commit
16ce00f5
authored
18 years ago
by
David Himmelstrup
Browse files
Options
Downloads
Patches
Plain Diff
Don't check for packagesDirName and servListFile, they may not exist.
parent
a7437614
No related branches found
Branches containing commit
Tags
ghc-8.6.1-alpha2
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Network/Hackage/CabalInstall/Config.hs
+6
-9
6 additions, 9 deletions
Network/Hackage/CabalInstall/Config.hs
with
6 additions
and
9 deletions
Network/Hackage/CabalInstall/Config.hs
+
6
−
9
View file @
16ce00f5
...
...
@@ -65,10 +65,7 @@ isValidConfigDir :: FilePath -> IO Bool
isValidConfigDir
path
=
do
checks
<-
sequence
[
checkFiles
readable
[
path
,
path
`
joinFileName
`
servListFile
]
,
checkFiles
writable
[
path
,
path
`
joinFileName
`
pkgListFile
,
path
`
joinFileName
`
packagesDirectoryName
]]
,
path
`
joinFileName
`
servListFile
]]
return
(
and
checks
)
-- |Picks the first valid config directory or throws an exception if none were found.
...
...
@@ -81,11 +78,11 @@ selectValidConfigDir paths
checkFiles
::
(
Permissions
->
Bool
)
->
[
FilePath
]
->
IO
Bool
checkFiles
check
=
worker
where
worker
[]
=
return
True
worker
(
x
:
xs
)
=
worker
True
where
worker
r
[]
=
return
r
worker
r
(
x
:
xs
)
=
do
permissions
<-
getPermissions
x
if
check
permissions
then
worker
xs
then
worker
r
xs
else
return
False
`
mplus
`
worker
xs
`
mplus
`
worker
False
xs
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment