diff options
Diffstat (limited to 'src/server/Resource.hs')
-rw-r--r-- | src/server/Resource.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/Resource.hs b/src/server/Resource.hs index 4dd8615..8999b77 100644 --- a/src/server/Resource.hs +++ b/src/server/Resource.hs @@ -4,6 +4,7 @@ module Resource , editedAt , deletedAt , Status(..) + , statuses , groupByStatus , statusDuring ) where @@ -22,7 +23,10 @@ data Status = Created | Edited | Deleted - deriving (Eq, Show, Read, Ord) + deriving (Eq, Show, Read, Ord, Enum, Bounded) + +statuses :: [Status] +statuses = [minBound..] groupByStatus :: Resource a => UTCTime -> UTCTime -> [a] -> Map Status [a] groupByStatus start end resources = |