summaryrefslogtreecommitdiff
path: root/Utility/Misc.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/Misc.hs')
-rw-r--r--Utility/Misc.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/Misc.hs b/Utility/Misc.hs
index 541e150b7..e95ac4319 100644
--- a/Utility/Misc.hs
+++ b/Utility/Misc.hs
@@ -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