[locale/blog] Remove other unused code
This commit is contained in:
parent
a68d6cfa31
commit
d7d428d597
2 changed files with 2 additions and 7 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
module Blog where
|
module Blog where
|
||||||
|
|
||||||
import BlogDB
|
import BlogDB
|
||||||
import Data.List (intersperse)
|
|
||||||
import Data.Maybe (fromJust)
|
import Data.Maybe (fromJust)
|
||||||
import Data.Text (Text, append, empty, pack)
|
import Data.Text (Text, append, empty, pack)
|
||||||
import Data.Text.Lazy (fromStrict)
|
import Data.Text.Lazy (fromStrict)
|
||||||
|
|
@ -13,10 +12,6 @@ import Text.Markdown
|
||||||
|
|
||||||
import qualified Data.Text as T
|
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 :: Eq a => a -> a -> [a] -> [a]
|
||||||
replace x y = map (\z -> if z == x then y else z)
|
replace x y = map (\z -> if z == x then y else z)
|
||||||
|
|
||||||
|
|
@ -91,7 +86,7 @@ $maybe links <- pageLinks
|
||||||
|]
|
|]
|
||||||
where
|
where
|
||||||
toDisplay = if showAll then entries else (take 6 entries)
|
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 :: Maybe Int -> BlogLang -> Html
|
||||||
showLinks (Just i) lang = [shamlet|
|
showLinks (Just i) lang = [shamlet|
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ updateEntry acid entryId = do
|
||||||
, btext = nBtext
|
, btext = nBtext
|
||||||
, mtext = nMtext}
|
, mtext = nMtext}
|
||||||
update' acid (UpdateEntry newEntry)
|
update' acid (UpdateEntry newEntry)
|
||||||
seeOther (concat $ intersperse' "/" [show $ lang entry, show entryId])
|
seeOther (concat $ ["/", show $ lang entry, "/", show entryId])
|
||||||
(toResponse ())
|
(toResponse ())
|
||||||
|
|
||||||
guardSession :: AcidState Blog -> ServerPartT IO ()
|
guardSession :: AcidState Blog -> ServerPartT IO ()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue