From b11a63a860e8446cf3a4b35a5d8ef76329d5135c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 7 Nov 2011 23:21:22 -0400 Subject: clean up read/show abuse Avoid ever using read to parse a non-haskell formatted input string. show :: Key is arguably still show abuse, but displaying Keys as filenames is just too useful to give up. --- Upgrade/V1.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Upgrade') diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs index 331328e81..be9a977ad 100644 --- a/Upgrade/V1.hs +++ b/Upgrade/V1.hs @@ -178,7 +178,7 @@ fileKey1 file = readKey1 $ replace "&a" "&" $ replace "&s" "%" $ replace "%" "/" file writeLog1 :: FilePath -> [LogLine] -> IO () -writeLog1 file ls = viaTmp writeFile file (unlines $ map show ls) +writeLog1 file ls = viaTmp writeFile file (showLog ls) readLog1 :: FilePath -> IO [LogLine] readLog1 file = catch (parseLog <$> readFileStrict file) (const $ return []) -- cgit v1.2.3