about summary refs log tree commit diff
path: root/src/BlogDB.hs
diff options
context:
space:
mode:
authorVincent Ambo <vincent@spotify.com>2014-05-08T13·57+0200
committerVincent Ambo <vincent@spotify.com>2014-05-08T13·57+0200
commit19cc93685b2ae499c913a8ff2fc27877d5e213b6 (patch)
treecd4dfbc9eeb0589e9f2c7a3080c0728271c88bf0 /src/BlogDB.hs
parent6cbc1a4448141fc74f610ee5f2beb3608436f486 (diff)
(temporary?) fix for builds on GHC 7.8
Diffstat (limited to 'src/BlogDB.hs')
-rw-r--r--src/BlogDB.hs32
1 files changed, 22 insertions, 10 deletions
diff --git a/src/BlogDB.hs b/src/BlogDB.hs
index c054d7f17dd2..21d887297ff5 100644
--- a/src/BlogDB.hs
+++ b/src/BlogDB.hs
@@ -34,7 +34,9 @@ import qualified Data.Text              as Text
 
 
 newtype EntryId = EntryId { unEntryId :: Integer }
-    deriving (Eq, Ord, Data, Enum, Typeable, SafeCopy)
+    deriving (Eq, Ord, Data, Enum, Typeable)
+
+$(deriveSafeCopy 0 'base ''EntryId)
 
 instance Show EntryId where
   show = show . unEntryId
@@ -78,15 +80,25 @@ data Entry = Entry {
 $(deriveSafeCopy 0 'base ''Entry)
 
 -- ixSet requires different datatypes for field indexes, so let's define some
-newtype Author = Author Text   deriving (Eq, Ord, Data, Typeable, SafeCopy)
-newtype Title  = Title Text    deriving (Eq, Ord, Data, Typeable, SafeCopy)
-newtype BText  = BText Text    deriving (Eq, Ord, Data, Typeable, SafeCopy) -- standard text
-newtype MText  = MText Text    deriving (Eq, Ord, Data, Typeable, SafeCopy) -- "read more" text
-newtype Tag    = Tag Text      deriving (Eq, Ord, Data, Typeable, SafeCopy)
-newtype EDate  = EDate UTCTime deriving (Eq, Ord, Data, Typeable, SafeCopy)
-newtype SDate  = SDate UTCTime   deriving (Eq, Ord, Data, Typeable, SafeCopy)
-newtype Username = Username Text deriving (Eq, Ord, Data, Typeable, SafeCopy)
-newtype SessionID = SessionID Text deriving (Eq, Ord, Data, Typeable, SafeCopy)
+newtype Author = Author Text   deriving (Eq, Ord, Data, Typeable)
+newtype Title  = Title Text    deriving (Eq, Ord, Data, Typeable)
+newtype BText  = BText Text    deriving (Eq, Ord, Data, Typeable) -- standard text
+newtype MText  = MText Text    deriving (Eq, Ord, Data, Typeable) -- "read more" text
+newtype Tag    = Tag Text      deriving (Eq, Ord, Data, Typeable)
+newtype EDate  = EDate UTCTime deriving (Eq, Ord, Data, Typeable)
+newtype SDate  = SDate UTCTime   deriving (Eq, Ord, Data, Typeable)
+newtype Username = Username Text deriving (Eq, Ord, Data, Typeable)
+newtype SessionID = SessionID Text deriving (Eq, Ord, Data, Typeable)
+
+$(deriveSafeCopy 0 'base ''Author)
+$(deriveSafeCopy 0 'base ''Title)
+$(deriveSafeCopy 0 'base ''BText)
+$(deriveSafeCopy 0 'base ''MText)
+$(deriveSafeCopy 0 'base ''Tag)
+$(deriveSafeCopy 0 'base ''EDate)
+$(deriveSafeCopy 0 'base ''SDate)
+$(deriveSafeCopy 0 'base ''Username)
+$(deriveSafeCopy 0 'base ''SessionID)
 
 instance Indexable Entry where
     empty = ixSet [ ixFun $ \e -> [ entryId e]