2012-10-01 19:12:04 +00:00
|
|
|
{- git-annex repo groups
|
|
|
|
-
|
2015-01-21 16:50:09 +00:00
|
|
|
- Copyright 2012 Joey Hess <id@joeyh.name>
|
2012-10-01 19:12:04 +00:00
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
module Types.Group (
|
|
|
|
Group,
|
2012-10-08 19:18:58 +00:00
|
|
|
GroupMap(..),
|
|
|
|
emptyGroupMap
|
2012-10-01 19:12:04 +00:00
|
|
|
) where
|
|
|
|
|
|
|
|
import Types.UUID
|
|
|
|
|
|
|
|
import qualified Data.Map as M
|
|
|
|
import qualified Data.Set as S
|
|
|
|
|
|
|
|
type Group = String
|
|
|
|
|
2012-10-02 17:45:30 +00:00
|
|
|
data GroupMap = GroupMap
|
|
|
|
{ groupsByUUID :: M.Map UUID (S.Set Group)
|
|
|
|
, uuidsByGroup :: M.Map Group (S.Set UUID)
|
|
|
|
}
|
2012-10-08 19:18:58 +00:00
|
|
|
|
|
|
|
emptyGroupMap :: GroupMap
|
|
|
|
emptyGroupMap = GroupMap M.empty M.empty
|