From c9907a1f4e939417d1a77adcb27501c6506efe8a Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
Date: Thu, 25 Jul 2013 20:33:13 +0000
Subject: [PATCH 2/2] Remove the unused 'splitByDelimiter' function.

---
 src/TorDNSEL/Util.hsc |   13 -------------
 1 file changed, 13 deletions(-)

diff --git a/src/TorDNSEL/Util.hsc b/src/TorDNSEL/Util.hsc
index 8cfe172..f71cf99 100644
--- a/src/TorDNSEL/Util.hsc
+++ b/src/TorDNSEL/Util.hsc
@@ -3,8 +3,6 @@
              UndecidableInstances, FlexibleInstances, MultiParamTypeClasses,
              GeneralizedNewtypeDeriving, FlexibleContexts #-}
 {-# OPTIONS_GHC -fno-warn-type-defaults -fno-warn-orphans -Wwarn #-}
---                                                        ^^^^^^
---                                    XXX: findSubstrings is deprecated
 
 -----------------------------------------------------------------------------
 -- |
@@ -59,7 +57,6 @@ module TorDNSEL.Util (
   , htonl
   , ntohl
   , hGetLineN
-  , splitByDelimiter
   , showException
   , showUTCTime
 
@@ -375,16 +372,6 @@ hGetLineN handle eol n = do
   bStr <- B.hGet handle n
   return $ fst $ B.breakSubstring eol bStr
 
--- | Split @bs@ into pieces delimited by @delimiter@, consuming the delimiter.
--- The result for overlapping delimiters is undefined.
-splitByDelimiter :: ByteString -> ByteString -> [ByteString]
-splitByDelimiter delimiter bs = subst (-len : B.findSubstrings delimiter bs)
-  where
-    subst (x:xs@(y:_)) = B.take (y-x-len) (B.drop (x+len) bs) : subst xs
-    subst [x]          = [B.drop (x+len) bs]
-    subst []           = error "splitByDelimiter: empty list"
-    len = B.length delimiter
-
 -- | Convert an exception to a string given a list of functions for displaying
 -- dynamically typed exceptions.
 showException :: [Dynamic -> Maybe String] -> E.SomeException -> String
-- 
1.7.9.5

