From ad9d754d2b18d4dd027884e082c20777a29ef7d4 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 30 May 2007 14:46:33 +0000 Subject: [PATCH] Make package.conf files a bit more readable --- utils/ghc-pkg/Main.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index b180fb7..4b37684 100644 --- 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 - hPutStrLn h (show packages) + let shown = concat $ intersperse ",\n " $ map show packages + fileContents = "[" ++ shown ++ "\n]" + hPutStrLn h fileContents hClose h hPutStrLn stdout "done." -- 1.7.10.4