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:
df58c2a
)
Make package.conf files a bit more readable
author
Ian Lynagh
<igloo@earth.li>
Wed, 30 May 2007 14:46:33 +0000
(14:46 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Wed, 30 May 2007 14:46:33 +0000
(14:46 +0000)
utils/ghc-pkg/Main.hs
patch
|
blob
|
history
diff --git
a/utils/ghc-pkg/Main.hs
b/utils/ghc-pkg/Main.hs
index
b180fb7
..
4b37684
100644
(file)
--- a/
utils/ghc-pkg/Main.hs
+++ b/
utils/ghc-pkg/Main.hs
@@
-641,7
+641,9
@@
writeNewConfig filename packages = do
if isPermissionError e
then die (filename ++ ": you don't have permission to modify this file")
else ioError e
if isPermissionError e
then die (filename ++ ": you don't have permission to modify this file")
else ioError e
- hPutStrLn h (show packages)
+ let shown = concat $ intersperse ",\n " $ map show packages
+ fileContents = "[" ++ shown ++ "\n]"
+ hPutStrLn h fileContents
hClose h
hPutStrLn stdout "done."
hClose h
hPutStrLn stdout "done."