about summary refs log tree commit diff
path: root/services/tazblog/src
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-20T06·09+0100
committerVincent Ambo <tazjin@google.com>2019-08-20T06·09+0100
commit13b0204c0391697b41cdfb80e96da6945808e25d (patch)
tree87c0307a96bc7649b61eb85460200b24e537f629 /services/tazblog/src
parentb856648127e89321db338344019544a4fcdcbf93 (diff)
chore(tazblog): Introduce dependency on 'cache' r/46
Diffstat (limited to 'services/tazblog/src')
-rw-r--r--services/tazblog/src/BlogStore.hs33
1 files changed, 18 insertions, 15 deletions
diff --git a/services/tazblog/src/BlogStore.hs b/services/tazblog/src/BlogStore.hs
index 5ed67ac93864..e4c7a64b2634 100644
--- a/services/tazblog/src/BlogStore.hs
+++ b/services/tazblog/src/BlogStore.hs
@@ -15,33 +15,36 @@
 --
 -- This module implements logic for assembling a post out of these
 -- fragments and caching it based on the TTL of its `_meta` record.
-
 module BlogStore where
 
-import           Data.Text              (Text)
-import Locales (BlogLang(..))
-import           Data.Time (UTCTime)
 import Control.Monad.IO.Class (MonadIO)
+import Data.Text (Text)
+import Data.Time (UTCTime)
+import Locales (BlogLang (..))
 
-newtype EntryId = EntryId { unEntryId :: Integer }
-    deriving (Eq, Ord)
+newtype EntryId = EntryId {unEntryId :: Integer}
+  deriving (Eq, Ord)
 
 instance Show EntryId where
+
   show = show . unEntryId
 
-data Entry = Entry {
-    entryId :: EntryId,
-    lang    :: BlogLang,
-    author  :: Text,
-    title   :: Text,
-    btext   :: Text,
-    mtext   :: Text,
-    edate   :: UTCTime
-} deriving (Eq, Ord, Show)
+data Entry
+  = Entry
+      { entryId :: EntryId,
+        lang :: BlogLang,
+        author :: Text,
+        title :: Text,
+        btext :: Text,
+        mtext :: Text,
+        edate :: UTCTime
+        }
+  deriving (Eq, Ord, Show)
 
 data BlogCache
 
 type Offset = Integer
+
 type Count = Integer
 
 newCache :: String -> IO BlogCache