packages feed

clckwrks-plugin-bugs 0.7.1 → 0.7.2

raw patch · 2 files changed

+24/−5 lines, 2 filesdep +cereal

Dependencies added: cereal

Files

Clckwrks/Bugs/Types.hs view
@@ -6,20 +6,38 @@ import Data.Data           (Data, Typeable) import Data.IxSet          (Indexable(..), ixSet, ixFun) import Data.Maybe          (maybeToList)-import Data.SafeCopy       (SafeCopy, Migrate(..), base, deriveSafeCopy, extension)+import Data.SafeCopy       (SafeCopy(..), Migrate(..), base, contain, deriveSafeCopy, extension, safeGet, safePut)+import qualified Data.Serialize as S import Data.Text           (Text)+import qualified Data.Text.Encoding as T import Data.Time           (UTCTime) import Data.Set            (Set) import Web.Routes          (PathInfo(..))  newtype BugId = BugId { unBugId :: Integer }-    deriving (Eq, Ord, Read, Show, Data, Typeable, SafeCopy, PathInfo)+    deriving (Eq, Ord, Read, Show, Data, Typeable, PathInfo) +instance SafeCopy BugId where+    getCopy = contain $ fmap BugId S.get+    putCopy = contain . S.put . unBugId+    errorTypeName _ = "BugId"+ newtype BugTag = BugTag { tagText :: Text }-    deriving (Eq, Ord, Read, Show, Data, Typeable, SafeCopy, PathInfo)+    deriving (Eq, Ord, Read, Show, Data, Typeable, PathInfo) +instance SafeCopy BugTag where+    kind = base+    getCopy = contain $ (BugTag . T.decodeUtf8) <$> safeGet+    putCopy = contain . safePut . T.encodeUtf8 . tagText+    errorTypeName _ = "BugTag"+ newtype MilestoneId = MilestoneId { unMilestoneId :: Integer }-    deriving (Eq, Ord, Read, Show, Data, Typeable, SafeCopy, PathInfo, Enum)+    deriving (Eq, Ord, Read, Show, Data, Typeable, PathInfo, Enum)++instance SafeCopy MilestoneId where+    getCopy = contain $ fmap MilestoneId S.get+    putCopy = contain . S.put . unMilestoneId+    errorTypeName _ = "MilestoneId"  data Milestone = Milestone     { milestoneId      :: MilestoneId
clckwrks-plugin-bugs.cabal view
@@ -1,5 +1,5 @@ Name:                clckwrks-plugin-bugs-Version:             0.7.1+Version:             0.7.2 Synopsis:            bug tracking plugin for clckwrks Homepage:            http://clckwrks.com/ License:             BSD3@@ -46,6 +46,7 @@     attoparsec             >= 0.10 && < 0.12,     clckwrks               >= 0.21 && < 0.23,     clckwrks-plugin-page   == 0.3.*,+    cereal                 >= 0.4 && < 0.5,     containers             >= 0.4 && < 0.6,     directory              >= 1.1 && < 1.3,     filepath               >= 1.2 && < 1.4,