summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2015-11-21T18·05+0100
committerVincent Ambo <tazjin@gmail.com>2015-11-21T18·05+0100
commitd7d428d597ebede6d7d423abcecb930cdca8a88c (patch)
tree68d61a6bb7dae4fd9f3f2597b899ee58f2dd0a00
parenta68d6cfa31ca9fa4e2773c5f3e375c21079c358b (diff)
[locale/blog] Remove other unused code
-rw-r--r--src/Blog.hs7
-rw-r--r--src/Server.hs2
2 files changed, 2 insertions, 7 deletions
diff --git a/src/Blog.hs b/src/Blog.hs
index a78b911eda16..6cc00510c0dc 100644
--- a/src/Blog.hs
+++ b/src/Blog.hs
@@ -1,7 +1,6 @@
 module Blog where
 
 import BlogDB
-import Data.List       (intersperse)
 import Data.Maybe      (fromJust)
 import Data.Text       (Text, append, empty, pack)
 import Data.Text.Lazy  (fromStrict)
@@ -13,10 +12,6 @@ import Text.Markdown
 
 import qualified Data.Text as T
 
--- custom list functions
-intersperse' :: a -> [a] -> [a]
-intersperse' sep l = sep : intersperse sep l
-
 replace :: Eq a => a -> a -> [a] -> [a]
 replace x y = map (\z -> if z == x then y else z)
 
@@ -91,7 +86,7 @@ $maybe links <- pageLinks
 |]
   where
    toDisplay = if showAll then entries else (take 6 entries)
-   linkElems Entry{..} = concat $ intersperse' "/" [show lang, show entryId]
+   linkElems Entry{..} = concat $ ["/", show lang, "/", show entryId]
 
 showLinks :: Maybe Int -> BlogLang -> Html
 showLinks (Just i) lang = [shamlet|
diff --git a/src/Server.hs b/src/Server.hs
index df8916d85d3b..373bb7d6b51f 100644
--- a/src/Server.hs
+++ b/src/Server.hs
@@ -149,7 +149,7 @@ updateEntry acid entryId = do
                          , btext = nBtext
                          , mtext = nMtext}
     update' acid (UpdateEntry newEntry)
-    seeOther (concat $ intersperse' "/" [show $ lang entry, show entryId])
+    seeOther (concat $ ["/", show $ lang entry, "/", show entryId])
              (toResponse ())
 
 guardSession :: AcidState Blog -> ServerPartT IO ()