This commit is contained in:
Joey Hess 2011-12-12 02:04:48 -04:00
parent acd7a52dfd
commit 2332afb4bc
2 changed files with 17 additions and 15 deletions

View file

@ -40,6 +40,10 @@ separate c l = unbreak $ break c l
| null b = r
| otherwise = (a, tail b)
{- Breaks out the first line. -}
firstLine :: String-> String
firstLine = takeWhile (/= '\n')
{- Catches IO errors and returns a Bool -}
catchBoolIO :: IO Bool -> IO Bool
catchBoolIO a = catchDefaultIO a False