module Utils where
+import Data.Function
+import Data.List
import System.Exit
import System.IO
import Text.Regex.Posix
Nothing -> Nothing
where r' = makeRegex r :: Regex
+unSepList :: Eq a => a -> [a] -> [[a]]
+unSepList x xs = case break (x ==) xs of
+ (this, _ : xs') ->
+ this : unSepList x xs'
+ (this, []) ->
+ [this]
+
+sortByFst :: Ord a => [(a, b)] -> [(a, b)]
+sortByFst = sortBy (compare `on` fst)
+