diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-03-12 10:54:17 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-03-12 10:54:17 +0300 |
commit | 5c804e5de11c71e84e81c40a10c11baba04b15e1 (patch) | |
tree | 2f778689460dd9229959735a9f8cebeca9c8f8a3 /compiler/utils/Util.hs | |
parent | e3ae0eb8e13adbbbec163d65c3b6e613666c56c9 (diff) | |
download | haskell-5c804e5de11c71e84e81c40a10c11baba04b15e1.tar.gz |
Remove splitEithers, use partitionEithers from base
Diffstat (limited to 'compiler/utils/Util.hs')
-rw-r--r-- | compiler/utils/Util.hs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index a4520ed679..d0a38ec240 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -25,7 +25,7 @@ module Util ( mapFst, mapSnd, chkAppend, mapAndUnzip, mapAndUnzip3, mapAccumL2, - nOfThem, filterOut, partitionWith, splitEithers, + nOfThem, filterOut, partitionWith, dropWhileEndLE, spanEnd, @@ -296,14 +296,6 @@ partitionWith f (x:xs) = case f x of Right c -> (bs, c:cs) where (bs,cs) = partitionWith f xs -splitEithers :: [Either a b] -> ([a], [b]) --- ^ Teases a list of 'Either's apart into two lists -splitEithers [] = ([],[]) -splitEithers (e : es) = case e of - Left x -> (x:xs, ys) - Right y -> (xs, y:ys) - where (xs,ys) = splitEithers es - chkAppend :: [a] -> [a] -> [a] -- Checks for the second argument being empty -- Used in situations where that situation is common |