Skip to content

Commit

Permalink
Using 'reads' instead of 'read' in Simple.Configure.getPersistBuildCo…
Browse files Browse the repository at this point in the history
…nfig
  • Loading branch information
lemmih committed May 30, 2005
1 parent 45512b1 commit 70f9550
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Distribution/Simple/Configure.hs
Expand Up @@ -110,14 +110,9 @@ getPersistBuildConfig = do
let dieMsg = "error reading " ++ localBuildInfoFile ++ "; run \"setup configure\" command?\n"
when (not e) (die dieMsg)
str <- readFile localBuildInfoFile
let bi = read str
#ifndef __NHC__
evaluate bi `catch` \_ ->
die dieMsg
#else
-- FIXME: Is there anything we can do here? DeepSeq?
#endif
return bi
case reads str of
[(bi,_)] -> return bi
_ -> die dieMsg

writePersistBuildConfig :: LocalBuildInfo -> IO ()
writePersistBuildConfig lbi = do
Expand Down

0 comments on commit 70f9550

Please sign in to comment.