)
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"
return ( unEscapeString key
, unEscapeString $ case value of
('=':val) -> val
- "" -> ""
+ val -> val
)