about summary refs log tree commit diff
path: root/src/Blog.hs
diff options
context:
space:
mode:
author"Vincent Ambo ext:(%22) <tazjin@me.com>2012-03-07T12·40+0100
committer"Vincent Ambo ext:(%22) <tazjin@me.com>2012-03-07T12·40+0100
commitb2bb90beff55d1aae2026f66840e6331734512d8 (patch)
tree99113fe730bb037579c225032f565abf974f1106 /src/Blog.hs
parentbc25b9d1e05ed7c73dd30ae7df10836c894bd855 (diff)
* comment adding fixed
* JSON Encoding is broken in the current Hackage version of CouchDB, thus it is necessary to build it manually and to apply this fix:
https://github.com/tbh/haskell-couchdb/commit/fafd63a43607ab8d6306fa46a264f93d4921a26c
Diffstat (limited to 'src/Blog.hs')
-rw-r--r--src/Blog.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Blog.hs b/src/Blog.hs
index 201851cba01d..0b32b7b30bd6 100644
--- a/src/Blog.hs
+++ b/src/Blog.hs
@@ -14,7 +14,6 @@ import           Text.Blaze.Html5 (Html, (!), a, form, input, p, toHtml, label)
 import           Text.Blaze.Html5.Attributes (action, enctype, href, name, size, type_, value)
 import qualified Text.Blaze.Html5 as H
 import qualified Text.Blaze.Html5.Attributes as A
-import           System.Locale (defaultTimeLocale)
 
 import           Locales
 
@@ -40,9 +39,14 @@ data Entry = Entry{
 blogText :: (a -> String) -> a -> Text
 blogText f = T.pack . f
 
+
+-- 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)
+
 blogTemplate :: BlogLang -> Text -> Html -> Html
 blogTemplate lang t_append body = H.docTypeHtml $ do --add body
     H.head $ do