]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Utils.hs
Exodus to GHC 6.8.1
[Lucu.git] / Network / HTTP / Lucu / Utils.hs
index b679a9351804084446da52ee4218bcb36c0bde28..6b749a80c8aefb448be43b06908961713ba428c1 100644 (file)
@@ -10,18 +10,17 @@ module Network.HTTP.Lucu.Utils
     )
     where
 
-import Data.Char
-import Data.List
+import Data.List hiding (last)
 import Network.URI
+import Prelude hiding (last)
 
 -- |> splitBy (== ':') "ab:c:def"
 --  > ==> ["ab", "c", "def"]
 splitBy :: (a -> Bool) -> [a] -> [[a]]
-splitBy isSeparator src
-    = isSeparator `seq`
-      case break isSeparator src
-      of (last , []      ) -> last  : []
-         (first, sep:rest) -> first : splitBy isSeparator rest
+splitBy isSep src
+    = case break isSep src
+      of (last , []       ) -> last  : []
+         (first, _sep:rest) -> first : splitBy isSep rest
 
 -- |> joinWith ":" ["ab", "c", "def"]
 --  > ==> "ab:c:def"
@@ -72,5 +71,5 @@ parseWWWFormURLEncoded src
                      return ( unEscapeString key
                             , unEscapeString $ case value of
                                                  ('=':val) -> val
-                                                 ""        -> ""
+                                                 val       -> val
                             )