{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, TemplateHaskell, TypeFamilies #-}
module Clckwrks.ProfileData.Types
     ( DisplayName(..)
     , ProfileData(..)
     , Role(..)
     , defaultProfileDataFor
     , emptyProfileData
     , Username(..)
     ) where

import Data.Data     (Data, Typeable)
import Data.IxSet    (Indexable(..), ixSet, ixFun)
import Data.IxSet.Ix (Ix)
import Data.Map      (Map, empty)
import Data.SafeCopy (Migrate(..), base, deriveSafeCopy, extension)
import Data.Set      (Set, empty, singleton)
import Data.Text     (Text, empty)
import Data.Typeable (Typeable)
import Data.UserId   (UserId(..))
import GHC.Generics  (Generic)

data Role_001
    = Administrator_001
    | Visitor_001
      deriving (Role_001 -> Role_001 -> Bool
(Role_001 -> Role_001 -> Bool)
-> (Role_001 -> Role_001 -> Bool) -> Eq Role_001
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Role_001 -> Role_001 -> Bool
$c/= :: Role_001 -> Role_001 -> Bool
== :: Role_001 -> Role_001 -> Bool
$c== :: Role_001 -> Role_001 -> Bool
Eq, Eq Role_001
Eq Role_001
-> (Role_001 -> Role_001 -> Ordering)
-> (Role_001 -> Role_001 -> Bool)
-> (Role_001 -> Role_001 -> Bool)
-> (Role_001 -> Role_001 -> Bool)
-> (Role_001 -> Role_001 -> Bool)
-> (Role_001 -> Role_001 -> Role_001)
-> (Role_001 -> Role_001 -> Role_001)
-> Ord Role_001
Role_001 -> Role_001 -> Bool
Role_001 -> Role_001 -> Ordering
Role_001 -> Role_001 -> Role_001
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Role_001 -> Role_001 -> Role_001
$cmin :: Role_001 -> Role_001 -> Role_001
max :: Role_001 -> Role_001 -> Role_001
$cmax :: Role_001 -> Role_001 -> Role_001
>= :: Role_001 -> Role_001 -> Bool
$c>= :: Role_001 -> Role_001 -> Bool
> :: Role_001 -> Role_001 -> Bool
$c> :: Role_001 -> Role_001 -> Bool
<= :: Role_001 -> Role_001 -> Bool
$c<= :: Role_001 -> Role_001 -> Bool
< :: Role_001 -> Role_001 -> Bool
$c< :: Role_001 -> Role_001 -> Bool
compare :: Role_001 -> Role_001 -> Ordering
$ccompare :: Role_001 -> Role_001 -> Ordering
$cp1Ord :: Eq Role_001
Ord, ReadPrec [Role_001]
ReadPrec Role_001
Int -> ReadS Role_001
ReadS [Role_001]
(Int -> ReadS Role_001)
-> ReadS [Role_001]
-> ReadPrec Role_001
-> ReadPrec [Role_001]
-> Read Role_001
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Role_001]
$creadListPrec :: ReadPrec [Role_001]
readPrec :: ReadPrec Role_001
$creadPrec :: ReadPrec Role_001
readList :: ReadS [Role_001]
$creadList :: ReadS [Role_001]
readsPrec :: Int -> ReadS Role_001
$creadsPrec :: Int -> ReadS Role_001
Read, Int -> Role_001 -> ShowS
[Role_001] -> ShowS
Role_001 -> String
(Int -> Role_001 -> ShowS)
-> (Role_001 -> String) -> ([Role_001] -> ShowS) -> Show Role_001
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Role_001] -> ShowS
$cshowList :: [Role_001] -> ShowS
show :: Role_001 -> String
$cshow :: Role_001 -> String
showsPrec :: Int -> Role_001 -> ShowS
$cshowsPrec :: Int -> Role_001 -> ShowS
Show, Typeable Role_001
DataType
Constr
Typeable Role_001
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Role_001 -> c Role_001)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Role_001)
-> (Role_001 -> Constr)
-> (Role_001 -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Role_001))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role_001))
-> ((forall b. Data b => b -> b) -> Role_001 -> Role_001)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Role_001 -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Role_001 -> r)
-> (forall u. (forall d. Data d => d -> u) -> Role_001 -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Role_001 -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Role_001 -> m Role_001)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Role_001 -> m Role_001)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Role_001 -> m Role_001)
-> Data Role_001
Role_001 -> DataType
Role_001 -> Constr
(forall b. Data b => b -> b) -> Role_001 -> Role_001
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Role_001 -> c Role_001
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Role_001
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Role_001 -> u
forall u. (forall d. Data d => d -> u) -> Role_001 -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Role_001 -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Role_001 -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Role_001 -> m Role_001
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Role_001 -> m Role_001
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Role_001
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Role_001 -> c Role_001
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Role_001)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role_001)
$cVisitor_001 :: Constr
$cAdministrator_001 :: Constr
$tRole_001 :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Role_001 -> m Role_001
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Role_001 -> m Role_001
gmapMp :: (forall d. Data d => d -> m d) -> Role_001 -> m Role_001
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Role_001 -> m Role_001
gmapM :: (forall d. Data d => d -> m d) -> Role_001 -> m Role_001
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Role_001 -> m Role_001
gmapQi :: Int -> (forall d. Data d => d -> u) -> Role_001 -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Role_001 -> u
gmapQ :: (forall d. Data d => d -> u) -> Role_001 -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Role_001 -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Role_001 -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Role_001 -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Role_001 -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Role_001 -> r
gmapT :: (forall b. Data b => b -> b) -> Role_001 -> Role_001
$cgmapT :: (forall b. Data b => b -> b) -> Role_001 -> Role_001
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role_001)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role_001)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Role_001)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Role_001)
dataTypeOf :: Role_001 -> DataType
$cdataTypeOf :: Role_001 -> DataType
toConstr :: Role_001 -> Constr
$ctoConstr :: Role_001 -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Role_001
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Role_001
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Role_001 -> c Role_001
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Role_001 -> c Role_001
$cp1Data :: Typeable Role_001
Data, Typeable, Int -> Role_001
Role_001 -> Int
Role_001 -> [Role_001]
Role_001 -> Role_001
Role_001 -> Role_001 -> [Role_001]
Role_001 -> Role_001 -> Role_001 -> [Role_001]
(Role_001 -> Role_001)
-> (Role_001 -> Role_001)
-> (Int -> Role_001)
-> (Role_001 -> Int)
-> (Role_001 -> [Role_001])
-> (Role_001 -> Role_001 -> [Role_001])
-> (Role_001 -> Role_001 -> [Role_001])
-> (Role_001 -> Role_001 -> Role_001 -> [Role_001])
-> Enum Role_001
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Role_001 -> Role_001 -> Role_001 -> [Role_001]
$cenumFromThenTo :: Role_001 -> Role_001 -> Role_001 -> [Role_001]
enumFromTo :: Role_001 -> Role_001 -> [Role_001]
$cenumFromTo :: Role_001 -> Role_001 -> [Role_001]
enumFromThen :: Role_001 -> Role_001 -> [Role_001]
$cenumFromThen :: Role_001 -> Role_001 -> [Role_001]
enumFrom :: Role_001 -> [Role_001]
$cenumFrom :: Role_001 -> [Role_001]
fromEnum :: Role_001 -> Int
$cfromEnum :: Role_001 -> Int
toEnum :: Int -> Role_001
$ctoEnum :: Int -> Role_001
pred :: Role_001 -> Role_001
$cpred :: Role_001 -> Role_001
succ :: Role_001 -> Role_001
$csucc :: Role_001 -> Role_001
Enum, Role_001
Role_001 -> Role_001 -> Bounded Role_001
forall a. a -> a -> Bounded a
maxBound :: Role_001
$cmaxBound :: Role_001
minBound :: Role_001
$cminBound :: Role_001
Bounded, (forall x. Role_001 -> Rep Role_001 x)
-> (forall x. Rep Role_001 x -> Role_001) -> Generic Role_001
forall x. Rep Role_001 x -> Role_001
forall x. Role_001 -> Rep Role_001 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Role_001 x -> Role_001
$cfrom :: forall x. Role_001 -> Rep Role_001 x
Generic)
$(deriveSafeCopy 1 'base ''Role_001)

data Role
    = Administrator
    | Visitor
    | Moderator
    | Editor
      deriving (Role -> Role -> Bool
(Role -> Role -> Bool) -> (Role -> Role -> Bool) -> Eq Role
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Role -> Role -> Bool
$c/= :: Role -> Role -> Bool
== :: Role -> Role -> Bool
$c== :: Role -> Role -> Bool
Eq, Eq Role
Eq Role
-> (Role -> Role -> Ordering)
-> (Role -> Role -> Bool)
-> (Role -> Role -> Bool)
-> (Role -> Role -> Bool)
-> (Role -> Role -> Bool)
-> (Role -> Role -> Role)
-> (Role -> Role -> Role)
-> Ord Role
Role -> Role -> Bool
Role -> Role -> Ordering
Role -> Role -> Role
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Role -> Role -> Role
$cmin :: Role -> Role -> Role
max :: Role -> Role -> Role
$cmax :: Role -> Role -> Role
>= :: Role -> Role -> Bool
$c>= :: Role -> Role -> Bool
> :: Role -> Role -> Bool
$c> :: Role -> Role -> Bool
<= :: Role -> Role -> Bool
$c<= :: Role -> Role -> Bool
< :: Role -> Role -> Bool
$c< :: Role -> Role -> Bool
compare :: Role -> Role -> Ordering
$ccompare :: Role -> Role -> Ordering
$cp1Ord :: Eq Role
Ord, ReadPrec [Role]
ReadPrec Role
Int -> ReadS Role
ReadS [Role]
(Int -> ReadS Role)
-> ReadS [Role] -> ReadPrec Role -> ReadPrec [Role] -> Read Role
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Role]
$creadListPrec :: ReadPrec [Role]
readPrec :: ReadPrec Role
$creadPrec :: ReadPrec Role
readList :: ReadS [Role]
$creadList :: ReadS [Role]
readsPrec :: Int -> ReadS Role
$creadsPrec :: Int -> ReadS Role
Read, Int -> Role -> ShowS
[Role] -> ShowS
Role -> String
(Int -> Role -> ShowS)
-> (Role -> String) -> ([Role] -> ShowS) -> Show Role
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Role] -> ShowS
$cshowList :: [Role] -> ShowS
show :: Role -> String
$cshow :: Role -> String
showsPrec :: Int -> Role -> ShowS
$cshowsPrec :: Int -> Role -> ShowS
Show, Typeable Role
DataType
Constr
Typeable Role
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Role -> c Role)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Role)
-> (Role -> Constr)
-> (Role -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Role))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role))
-> ((forall b. Data b => b -> b) -> Role -> Role)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r)
-> (forall u. (forall d. Data d => d -> u) -> Role -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Role -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Role -> m Role)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Role -> m Role)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Role -> m Role)
-> Data Role
Role -> DataType
Role -> Constr
(forall b. Data b => b -> b) -> Role -> Role
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Role -> c Role
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Role
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Role -> u
forall u. (forall d. Data d => d -> u) -> Role -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Role -> m Role
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Role -> m Role
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Role
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Role -> c Role
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Role)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role)
$cEditor :: Constr
$cModerator :: Constr
$cVisitor :: Constr
$cAdministrator :: Constr
$tRole :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Role -> m Role
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Role -> m Role
gmapMp :: (forall d. Data d => d -> m d) -> Role -> m Role
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Role -> m Role
gmapM :: (forall d. Data d => d -> m d) -> Role -> m Role
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Role -> m Role
gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Role -> u
gmapQ :: (forall d. Data d => d -> u) -> Role -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Role -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r
gmapT :: (forall b. Data b => b -> b) -> Role -> Role
$cgmapT :: (forall b. Data b => b -> b) -> Role -> Role
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Role)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Role)
dataTypeOf :: Role -> DataType
$cdataTypeOf :: Role -> DataType
toConstr :: Role -> Constr
$ctoConstr :: Role -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Role
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Role
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Role -> c Role
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Role -> c Role
$cp1Data :: Typeable Role
Data, Typeable, Int -> Role
Role -> Int
Role -> [Role]
Role -> Role
Role -> Role -> [Role]
Role -> Role -> Role -> [Role]
(Role -> Role)
-> (Role -> Role)
-> (Int -> Role)
-> (Role -> Int)
-> (Role -> [Role])
-> (Role -> Role -> [Role])
-> (Role -> Role -> [Role])
-> (Role -> Role -> Role -> [Role])
-> Enum Role
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Role -> Role -> Role -> [Role]
$cenumFromThenTo :: Role -> Role -> Role -> [Role]
enumFromTo :: Role -> Role -> [Role]
$cenumFromTo :: Role -> Role -> [Role]
enumFromThen :: Role -> Role -> [Role]
$cenumFromThen :: Role -> Role -> [Role]
enumFrom :: Role -> [Role]
$cenumFrom :: Role -> [Role]
fromEnum :: Role -> Int
$cfromEnum :: Role -> Int
toEnum :: Int -> Role
$ctoEnum :: Int -> Role
pred :: Role -> Role
$cpred :: Role -> Role
succ :: Role -> Role
$csucc :: Role -> Role
Enum, Role
Role -> Role -> Bounded Role
forall a. a -> a -> Bounded a
maxBound :: Role
$cmaxBound :: Role
minBound :: Role
$cminBound :: Role
Bounded, (forall x. Role -> Rep Role x)
-> (forall x. Rep Role x -> Role) -> Generic Role
forall x. Rep Role x -> Role
forall x. Role -> Rep Role x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Role x -> Role
$cfrom :: forall x. Role -> Rep Role x
Generic)
$(deriveSafeCopy 2 'extension ''Role)

instance Migrate Role where
    type MigrateFrom Role = Role_001
    migrate :: MigrateFrom Role -> Role
migrate MigrateFrom Role
Administrator_001 = Role
Administrator
    migrate MigrateFrom Role
Visitor_001       = Role
Visitor

newtype Username = Username { Username -> Text
unUsername :: Text }
    deriving (Username -> Username -> Bool
(Username -> Username -> Bool)
-> (Username -> Username -> Bool) -> Eq Username
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Username -> Username -> Bool
$c/= :: Username -> Username -> Bool
== :: Username -> Username -> Bool
$c== :: Username -> Username -> Bool
Eq, Eq Username
Eq Username
-> (Username -> Username -> Ordering)
-> (Username -> Username -> Bool)
-> (Username -> Username -> Bool)
-> (Username -> Username -> Bool)
-> (Username -> Username -> Bool)
-> (Username -> Username -> Username)
-> (Username -> Username -> Username)
-> Ord Username
Username -> Username -> Bool
Username -> Username -> Ordering
Username -> Username -> Username
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Username -> Username -> Username
$cmin :: Username -> Username -> Username
max :: Username -> Username -> Username
$cmax :: Username -> Username -> Username
>= :: Username -> Username -> Bool
$c>= :: Username -> Username -> Bool
> :: Username -> Username -> Bool
$c> :: Username -> Username -> Bool
<= :: Username -> Username -> Bool
$c<= :: Username -> Username -> Bool
< :: Username -> Username -> Bool
$c< :: Username -> Username -> Bool
compare :: Username -> Username -> Ordering
$ccompare :: Username -> Username -> Ordering
$cp1Ord :: Eq Username
Ord, ReadPrec [Username]
ReadPrec Username
Int -> ReadS Username
ReadS [Username]
(Int -> ReadS Username)
-> ReadS [Username]
-> ReadPrec Username
-> ReadPrec [Username]
-> Read Username
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Username]
$creadListPrec :: ReadPrec [Username]
readPrec :: ReadPrec Username
$creadPrec :: ReadPrec Username
readList :: ReadS [Username]
$creadList :: ReadS [Username]
readsPrec :: Int -> ReadS Username
$creadsPrec :: Int -> ReadS Username
Read, Int -> Username -> ShowS
[Username] -> ShowS
Username -> String
(Int -> Username -> ShowS)
-> (Username -> String) -> ([Username] -> ShowS) -> Show Username
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Username] -> ShowS
$cshowList :: [Username] -> ShowS
show :: Username -> String
$cshow :: Username -> String
showsPrec :: Int -> Username -> ShowS
$cshowsPrec :: Int -> Username -> ShowS
Show, Typeable Username
DataType
Constr
Typeable Username
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Username -> c Username)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Username)
-> (Username -> Constr)
-> (Username -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Username))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Username))
-> ((forall b. Data b => b -> b) -> Username -> Username)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Username -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Username -> r)
-> (forall u. (forall d. Data d => d -> u) -> Username -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Username -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Username -> m Username)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Username -> m Username)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Username -> m Username)
-> Data Username
Username -> DataType
Username -> Constr
(forall b. Data b => b -> b) -> Username -> Username
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Username -> c Username
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Username
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Username -> u
forall u. (forall d. Data d => d -> u) -> Username -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Username -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Username -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Username -> m Username
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Username -> m Username
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Username
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Username -> c Username
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Username)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Username)
$cUsername :: Constr
$tUsername :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Username -> m Username
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Username -> m Username
gmapMp :: (forall d. Data d => d -> m d) -> Username -> m Username
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Username -> m Username
gmapM :: (forall d. Data d => d -> m d) -> Username -> m Username
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Username -> m Username
gmapQi :: Int -> (forall d. Data d => d -> u) -> Username -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Username -> u
gmapQ :: (forall d. Data d => d -> u) -> Username -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Username -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Username -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Username -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Username -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Username -> r
gmapT :: (forall b. Data b => b -> b) -> Username -> Username
$cgmapT :: (forall b. Data b => b -> b) -> Username -> Username
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Username)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Username)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Username)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Username)
dataTypeOf :: Username -> DataType
$cdataTypeOf :: Username -> DataType
toConstr :: Username -> Constr
$ctoConstr :: Username -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Username
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Username
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Username -> c Username
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Username -> c Username
$cp1Data :: Typeable Username
Data, Typeable, (forall x. Username -> Rep Username x)
-> (forall x. Rep Username x -> Username) -> Generic Username
forall x. Rep Username x -> Username
forall x. Username -> Rep Username x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Username x -> Username
$cfrom :: forall x. Username -> Rep Username x
Generic)

newtype DisplayName = DisplayName { DisplayName -> Text
unDisplayName :: Text }
    deriving (DisplayName -> DisplayName -> Bool
(DisplayName -> DisplayName -> Bool)
-> (DisplayName -> DisplayName -> Bool) -> Eq DisplayName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisplayName -> DisplayName -> Bool
$c/= :: DisplayName -> DisplayName -> Bool
== :: DisplayName -> DisplayName -> Bool
$c== :: DisplayName -> DisplayName -> Bool
Eq, Eq DisplayName
Eq DisplayName
-> (DisplayName -> DisplayName -> Ordering)
-> (DisplayName -> DisplayName -> Bool)
-> (DisplayName -> DisplayName -> Bool)
-> (DisplayName -> DisplayName -> Bool)
-> (DisplayName -> DisplayName -> Bool)
-> (DisplayName -> DisplayName -> DisplayName)
-> (DisplayName -> DisplayName -> DisplayName)
-> Ord DisplayName
DisplayName -> DisplayName -> Bool
DisplayName -> DisplayName -> Ordering
DisplayName -> DisplayName -> DisplayName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DisplayName -> DisplayName -> DisplayName
$cmin :: DisplayName -> DisplayName -> DisplayName
max :: DisplayName -> DisplayName -> DisplayName
$cmax :: DisplayName -> DisplayName -> DisplayName
>= :: DisplayName -> DisplayName -> Bool
$c>= :: DisplayName -> DisplayName -> Bool
> :: DisplayName -> DisplayName -> Bool
$c> :: DisplayName -> DisplayName -> Bool
<= :: DisplayName -> DisplayName -> Bool
$c<= :: DisplayName -> DisplayName -> Bool
< :: DisplayName -> DisplayName -> Bool
$c< :: DisplayName -> DisplayName -> Bool
compare :: DisplayName -> DisplayName -> Ordering
$ccompare :: DisplayName -> DisplayName -> Ordering
$cp1Ord :: Eq DisplayName
Ord, ReadPrec [DisplayName]
ReadPrec DisplayName
Int -> ReadS DisplayName
ReadS [DisplayName]
(Int -> ReadS DisplayName)
-> ReadS [DisplayName]
-> ReadPrec DisplayName
-> ReadPrec [DisplayName]
-> Read DisplayName
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisplayName]
$creadListPrec :: ReadPrec [DisplayName]
readPrec :: ReadPrec DisplayName
$creadPrec :: ReadPrec DisplayName
readList :: ReadS [DisplayName]
$creadList :: ReadS [DisplayName]
readsPrec :: Int -> ReadS DisplayName
$creadsPrec :: Int -> ReadS DisplayName
Read, Int -> DisplayName -> ShowS
[DisplayName] -> ShowS
DisplayName -> String
(Int -> DisplayName -> ShowS)
-> (DisplayName -> String)
-> ([DisplayName] -> ShowS)
-> Show DisplayName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisplayName] -> ShowS
$cshowList :: [DisplayName] -> ShowS
show :: DisplayName -> String
$cshow :: DisplayName -> String
showsPrec :: Int -> DisplayName -> ShowS
$cshowsPrec :: Int -> DisplayName -> ShowS
Show, Typeable DisplayName
DataType
Constr
Typeable DisplayName
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DisplayName -> c DisplayName)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DisplayName)
-> (DisplayName -> Constr)
-> (DisplayName -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DisplayName))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DisplayName))
-> ((forall b. Data b => b -> b) -> DisplayName -> DisplayName)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DisplayName -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DisplayName -> r)
-> (forall u. (forall d. Data d => d -> u) -> DisplayName -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> DisplayName -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> DisplayName -> m DisplayName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DisplayName -> m DisplayName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DisplayName -> m DisplayName)
-> Data DisplayName
DisplayName -> DataType
DisplayName -> Constr
(forall b. Data b => b -> b) -> DisplayName -> DisplayName
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DisplayName -> c DisplayName
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DisplayName
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> DisplayName -> u
forall u. (forall d. Data d => d -> u) -> DisplayName -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DisplayName -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DisplayName -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DisplayName -> m DisplayName
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DisplayName -> m DisplayName
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DisplayName
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DisplayName -> c DisplayName
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DisplayName)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DisplayName)
$cDisplayName :: Constr
$tDisplayName :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> DisplayName -> m DisplayName
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DisplayName -> m DisplayName
gmapMp :: (forall d. Data d => d -> m d) -> DisplayName -> m DisplayName
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DisplayName -> m DisplayName
gmapM :: (forall d. Data d => d -> m d) -> DisplayName -> m DisplayName
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DisplayName -> m DisplayName
gmapQi :: Int -> (forall d. Data d => d -> u) -> DisplayName -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DisplayName -> u
gmapQ :: (forall d. Data d => d -> u) -> DisplayName -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DisplayName -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DisplayName -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DisplayName -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DisplayName -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DisplayName -> r
gmapT :: (forall b. Data b => b -> b) -> DisplayName -> DisplayName
$cgmapT :: (forall b. Data b => b -> b) -> DisplayName -> DisplayName
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DisplayName)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DisplayName)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DisplayName)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DisplayName)
dataTypeOf :: DisplayName -> DataType
$cdataTypeOf :: DisplayName -> DataType
toConstr :: DisplayName -> Constr
$ctoConstr :: DisplayName -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DisplayName
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DisplayName
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DisplayName -> c DisplayName
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DisplayName -> c DisplayName
$cp1Data :: Typeable DisplayName
Data, Typeable, (forall x. DisplayName -> Rep DisplayName x)
-> (forall x. Rep DisplayName x -> DisplayName)
-> Generic DisplayName
forall x. Rep DisplayName x -> DisplayName
forall x. DisplayName -> Rep DisplayName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisplayName x -> DisplayName
$cfrom :: forall x. DisplayName -> Rep DisplayName x
Generic)
$(deriveSafeCopy 1 'base ''DisplayName)

data ProfileData_1 = ProfileData_1
    { ProfileData_1 -> UserId
dataFor_1    :: UserId
    , ProfileData_1 -> Text
username_1   :: Text       -- ^ now comes from happstack-authenticate
    , ProfileData_1 -> Maybe Text
email_1      :: Maybe Text -- ^ now comes from happstack-authenticate
    , ProfileData_1 -> Set Role
roles_1      :: Set Role
    , ProfileData_1 -> Map Text Text
attributes_1 :: Map Text Text
    }
    deriving (ProfileData_1 -> ProfileData_1 -> Bool
(ProfileData_1 -> ProfileData_1 -> Bool)
-> (ProfileData_1 -> ProfileData_1 -> Bool) -> Eq ProfileData_1
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProfileData_1 -> ProfileData_1 -> Bool
$c/= :: ProfileData_1 -> ProfileData_1 -> Bool
== :: ProfileData_1 -> ProfileData_1 -> Bool
$c== :: ProfileData_1 -> ProfileData_1 -> Bool
Eq, Eq ProfileData_1
Eq ProfileData_1
-> (ProfileData_1 -> ProfileData_1 -> Ordering)
-> (ProfileData_1 -> ProfileData_1 -> Bool)
-> (ProfileData_1 -> ProfileData_1 -> Bool)
-> (ProfileData_1 -> ProfileData_1 -> Bool)
-> (ProfileData_1 -> ProfileData_1 -> Bool)
-> (ProfileData_1 -> ProfileData_1 -> ProfileData_1)
-> (ProfileData_1 -> ProfileData_1 -> ProfileData_1)
-> Ord ProfileData_1
ProfileData_1 -> ProfileData_1 -> Bool
ProfileData_1 -> ProfileData_1 -> Ordering
ProfileData_1 -> ProfileData_1 -> ProfileData_1
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ProfileData_1 -> ProfileData_1 -> ProfileData_1
$cmin :: ProfileData_1 -> ProfileData_1 -> ProfileData_1
max :: ProfileData_1 -> ProfileData_1 -> ProfileData_1
$cmax :: ProfileData_1 -> ProfileData_1 -> ProfileData_1
>= :: ProfileData_1 -> ProfileData_1 -> Bool
$c>= :: ProfileData_1 -> ProfileData_1 -> Bool
> :: ProfileData_1 -> ProfileData_1 -> Bool
$c> :: ProfileData_1 -> ProfileData_1 -> Bool
<= :: ProfileData_1 -> ProfileData_1 -> Bool
$c<= :: ProfileData_1 -> ProfileData_1 -> Bool
< :: ProfileData_1 -> ProfileData_1 -> Bool
$c< :: ProfileData_1 -> ProfileData_1 -> Bool
compare :: ProfileData_1 -> ProfileData_1 -> Ordering
$ccompare :: ProfileData_1 -> ProfileData_1 -> Ordering
$cp1Ord :: Eq ProfileData_1
Ord, ReadPrec [ProfileData_1]
ReadPrec ProfileData_1
Int -> ReadS ProfileData_1
ReadS [ProfileData_1]
(Int -> ReadS ProfileData_1)
-> ReadS [ProfileData_1]
-> ReadPrec ProfileData_1
-> ReadPrec [ProfileData_1]
-> Read ProfileData_1
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProfileData_1]
$creadListPrec :: ReadPrec [ProfileData_1]
readPrec :: ReadPrec ProfileData_1
$creadPrec :: ReadPrec ProfileData_1
readList :: ReadS [ProfileData_1]
$creadList :: ReadS [ProfileData_1]
readsPrec :: Int -> ReadS ProfileData_1
$creadsPrec :: Int -> ReadS ProfileData_1
Read, Int -> ProfileData_1 -> ShowS
[ProfileData_1] -> ShowS
ProfileData_1 -> String
(Int -> ProfileData_1 -> ShowS)
-> (ProfileData_1 -> String)
-> ([ProfileData_1] -> ShowS)
-> Show ProfileData_1
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProfileData_1] -> ShowS
$cshowList :: [ProfileData_1] -> ShowS
show :: ProfileData_1 -> String
$cshow :: ProfileData_1 -> String
showsPrec :: Int -> ProfileData_1 -> ShowS
$cshowsPrec :: Int -> ProfileData_1 -> ShowS
Show, Typeable ProfileData_1
DataType
Constr
Typeable ProfileData_1
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ProfileData_1 -> c ProfileData_1)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ProfileData_1)
-> (ProfileData_1 -> Constr)
-> (ProfileData_1 -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ProfileData_1))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ProfileData_1))
-> ((forall b. Data b => b -> b) -> ProfileData_1 -> ProfileData_1)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ProfileData_1 -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ProfileData_1 -> r)
-> (forall u. (forall d. Data d => d -> u) -> ProfileData_1 -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> ProfileData_1 -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1)
-> Data ProfileData_1
ProfileData_1 -> DataType
ProfileData_1 -> Constr
(forall b. Data b => b -> b) -> ProfileData_1 -> ProfileData_1
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData_1 -> c ProfileData_1
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData_1
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ProfileData_1 -> u
forall u. (forall d. Data d => d -> u) -> ProfileData_1 -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_1 -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_1 -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData_1
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData_1 -> c ProfileData_1
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProfileData_1)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProfileData_1)
$cProfileData_1 :: Constr
$tProfileData_1 :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1
gmapMp :: (forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1
gmapM :: (forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProfileData_1 -> m ProfileData_1
gmapQi :: Int -> (forall d. Data d => d -> u) -> ProfileData_1 -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ProfileData_1 -> u
gmapQ :: (forall d. Data d => d -> u) -> ProfileData_1 -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ProfileData_1 -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_1 -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_1 -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_1 -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_1 -> r
gmapT :: (forall b. Data b => b -> b) -> ProfileData_1 -> ProfileData_1
$cgmapT :: (forall b. Data b => b -> b) -> ProfileData_1 -> ProfileData_1
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProfileData_1)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProfileData_1)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ProfileData_1)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProfileData_1)
dataTypeOf :: ProfileData_1 -> DataType
$cdataTypeOf :: ProfileData_1 -> DataType
toConstr :: ProfileData_1 -> Constr
$ctoConstr :: ProfileData_1 -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData_1
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData_1
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData_1 -> c ProfileData_1
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData_1 -> c ProfileData_1
$cp1Data :: Typeable ProfileData_1
Data, Typeable, (forall x. ProfileData_1 -> Rep ProfileData_1 x)
-> (forall x. Rep ProfileData_1 x -> ProfileData_1)
-> Generic ProfileData_1
forall x. Rep ProfileData_1 x -> ProfileData_1
forall x. ProfileData_1 -> Rep ProfileData_1 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProfileData_1 x -> ProfileData_1
$cfrom :: forall x. ProfileData_1 -> Rep ProfileData_1 x
Generic)

$(deriveSafeCopy 1 'base ''ProfileData_1)

data ProfileData_2 = ProfileData_2
    { ProfileData_2 -> UserId
dataFor_2    :: UserId
    , ProfileData_2 -> Set Role
roles_2      :: Set Role
    , ProfileData_2 -> Map Text Text
attributes_2 :: Map Text Text
    }
    deriving (ProfileData_2 -> ProfileData_2 -> Bool
(ProfileData_2 -> ProfileData_2 -> Bool)
-> (ProfileData_2 -> ProfileData_2 -> Bool) -> Eq ProfileData_2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProfileData_2 -> ProfileData_2 -> Bool
$c/= :: ProfileData_2 -> ProfileData_2 -> Bool
== :: ProfileData_2 -> ProfileData_2 -> Bool
$c== :: ProfileData_2 -> ProfileData_2 -> Bool
Eq, Eq ProfileData_2
Eq ProfileData_2
-> (ProfileData_2 -> ProfileData_2 -> Ordering)
-> (ProfileData_2 -> ProfileData_2 -> Bool)
-> (ProfileData_2 -> ProfileData_2 -> Bool)
-> (ProfileData_2 -> ProfileData_2 -> Bool)
-> (ProfileData_2 -> ProfileData_2 -> Bool)
-> (ProfileData_2 -> ProfileData_2 -> ProfileData_2)
-> (ProfileData_2 -> ProfileData_2 -> ProfileData_2)
-> Ord ProfileData_2
ProfileData_2 -> ProfileData_2 -> Bool
ProfileData_2 -> ProfileData_2 -> Ordering
ProfileData_2 -> ProfileData_2 -> ProfileData_2
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ProfileData_2 -> ProfileData_2 -> ProfileData_2
$cmin :: ProfileData_2 -> ProfileData_2 -> ProfileData_2
max :: ProfileData_2 -> ProfileData_2 -> ProfileData_2
$cmax :: ProfileData_2 -> ProfileData_2 -> ProfileData_2
>= :: ProfileData_2 -> ProfileData_2 -> Bool
$c>= :: ProfileData_2 -> ProfileData_2 -> Bool
> :: ProfileData_2 -> ProfileData_2 -> Bool
$c> :: ProfileData_2 -> ProfileData_2 -> Bool
<= :: ProfileData_2 -> ProfileData_2 -> Bool
$c<= :: ProfileData_2 -> ProfileData_2 -> Bool
< :: ProfileData_2 -> ProfileData_2 -> Bool
$c< :: ProfileData_2 -> ProfileData_2 -> Bool
compare :: ProfileData_2 -> ProfileData_2 -> Ordering
$ccompare :: ProfileData_2 -> ProfileData_2 -> Ordering
$cp1Ord :: Eq ProfileData_2
Ord, ReadPrec [ProfileData_2]
ReadPrec ProfileData_2
Int -> ReadS ProfileData_2
ReadS [ProfileData_2]
(Int -> ReadS ProfileData_2)
-> ReadS [ProfileData_2]
-> ReadPrec ProfileData_2
-> ReadPrec [ProfileData_2]
-> Read ProfileData_2
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProfileData_2]
$creadListPrec :: ReadPrec [ProfileData_2]
readPrec :: ReadPrec ProfileData_2
$creadPrec :: ReadPrec ProfileData_2
readList :: ReadS [ProfileData_2]
$creadList :: ReadS [ProfileData_2]
readsPrec :: Int -> ReadS ProfileData_2
$creadsPrec :: Int -> ReadS ProfileData_2
Read, Int -> ProfileData_2 -> ShowS
[ProfileData_2] -> ShowS
ProfileData_2 -> String
(Int -> ProfileData_2 -> ShowS)
-> (ProfileData_2 -> String)
-> ([ProfileData_2] -> ShowS)
-> Show ProfileData_2
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProfileData_2] -> ShowS
$cshowList :: [ProfileData_2] -> ShowS
show :: ProfileData_2 -> String
$cshow :: ProfileData_2 -> String
showsPrec :: Int -> ProfileData_2 -> ShowS
$cshowsPrec :: Int -> ProfileData_2 -> ShowS
Show, Typeable ProfileData_2
DataType
Constr
Typeable ProfileData_2
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ProfileData_2 -> c ProfileData_2)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ProfileData_2)
-> (ProfileData_2 -> Constr)
-> (ProfileData_2 -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ProfileData_2))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ProfileData_2))
-> ((forall b. Data b => b -> b) -> ProfileData_2 -> ProfileData_2)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ProfileData_2 -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ProfileData_2 -> r)
-> (forall u. (forall d. Data d => d -> u) -> ProfileData_2 -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> ProfileData_2 -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2)
-> Data ProfileData_2
ProfileData_2 -> DataType
ProfileData_2 -> Constr
(forall b. Data b => b -> b) -> ProfileData_2 -> ProfileData_2
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData_2 -> c ProfileData_2
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData_2
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ProfileData_2 -> u
forall u. (forall d. Data d => d -> u) -> ProfileData_2 -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_2 -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_2 -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData_2
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData_2 -> c ProfileData_2
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProfileData_2)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProfileData_2)
$cProfileData_2 :: Constr
$tProfileData_2 :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2
gmapMp :: (forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2
gmapM :: (forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProfileData_2 -> m ProfileData_2
gmapQi :: Int -> (forall d. Data d => d -> u) -> ProfileData_2 -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ProfileData_2 -> u
gmapQ :: (forall d. Data d => d -> u) -> ProfileData_2 -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ProfileData_2 -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_2 -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_2 -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_2 -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData_2 -> r
gmapT :: (forall b. Data b => b -> b) -> ProfileData_2 -> ProfileData_2
$cgmapT :: (forall b. Data b => b -> b) -> ProfileData_2 -> ProfileData_2
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProfileData_2)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProfileData_2)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ProfileData_2)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProfileData_2)
dataTypeOf :: ProfileData_2 -> DataType
$cdataTypeOf :: ProfileData_2 -> DataType
toConstr :: ProfileData_2 -> Constr
$ctoConstr :: ProfileData_2 -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData_2
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData_2
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData_2 -> c ProfileData_2
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData_2 -> c ProfileData_2
$cp1Data :: Typeable ProfileData_2
Data, Typeable, (forall x. ProfileData_2 -> Rep ProfileData_2 x)
-> (forall x. Rep ProfileData_2 x -> ProfileData_2)
-> Generic ProfileData_2
forall x. Rep ProfileData_2 x -> ProfileData_2
forall x. ProfileData_2 -> Rep ProfileData_2 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProfileData_2 x -> ProfileData_2
$cfrom :: forall x. ProfileData_2 -> Rep ProfileData_2 x
Generic)

$(deriveSafeCopy 2 'extension ''ProfileData_2)

instance Migrate ProfileData_2 where
  type MigrateFrom ProfileData_2 = ProfileData_1
  migrate :: MigrateFrom ProfileData_2 -> ProfileData_2
migrate (ProfileData_1 df _ _ rs attrs) = UserId -> Set Role -> Map Text Text -> ProfileData_2
ProfileData_2 UserId
df Set Role
rs Map Text Text
attrs

data ProfileData = ProfileData
    { ProfileData -> UserId
dataFor     :: UserId
    , ProfileData -> Maybe DisplayName
displayName :: Maybe DisplayName
    , ProfileData -> Set Role
roles       :: Set Role
    , ProfileData -> Map Text Text
attributes  :: Map Text Text
    }
    deriving (ProfileData -> ProfileData -> Bool
(ProfileData -> ProfileData -> Bool)
-> (ProfileData -> ProfileData -> Bool) -> Eq ProfileData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProfileData -> ProfileData -> Bool
$c/= :: ProfileData -> ProfileData -> Bool
== :: ProfileData -> ProfileData -> Bool
$c== :: ProfileData -> ProfileData -> Bool
Eq, Eq ProfileData
Eq ProfileData
-> (ProfileData -> ProfileData -> Ordering)
-> (ProfileData -> ProfileData -> Bool)
-> (ProfileData -> ProfileData -> Bool)
-> (ProfileData -> ProfileData -> Bool)
-> (ProfileData -> ProfileData -> Bool)
-> (ProfileData -> ProfileData -> ProfileData)
-> (ProfileData -> ProfileData -> ProfileData)
-> Ord ProfileData
ProfileData -> ProfileData -> Bool
ProfileData -> ProfileData -> Ordering
ProfileData -> ProfileData -> ProfileData
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ProfileData -> ProfileData -> ProfileData
$cmin :: ProfileData -> ProfileData -> ProfileData
max :: ProfileData -> ProfileData -> ProfileData
$cmax :: ProfileData -> ProfileData -> ProfileData
>= :: ProfileData -> ProfileData -> Bool
$c>= :: ProfileData -> ProfileData -> Bool
> :: ProfileData -> ProfileData -> Bool
$c> :: ProfileData -> ProfileData -> Bool
<= :: ProfileData -> ProfileData -> Bool
$c<= :: ProfileData -> ProfileData -> Bool
< :: ProfileData -> ProfileData -> Bool
$c< :: ProfileData -> ProfileData -> Bool
compare :: ProfileData -> ProfileData -> Ordering
$ccompare :: ProfileData -> ProfileData -> Ordering
$cp1Ord :: Eq ProfileData
Ord, ReadPrec [ProfileData]
ReadPrec ProfileData
Int -> ReadS ProfileData
ReadS [ProfileData]
(Int -> ReadS ProfileData)
-> ReadS [ProfileData]
-> ReadPrec ProfileData
-> ReadPrec [ProfileData]
-> Read ProfileData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProfileData]
$creadListPrec :: ReadPrec [ProfileData]
readPrec :: ReadPrec ProfileData
$creadPrec :: ReadPrec ProfileData
readList :: ReadS [ProfileData]
$creadList :: ReadS [ProfileData]
readsPrec :: Int -> ReadS ProfileData
$creadsPrec :: Int -> ReadS ProfileData
Read, Int -> ProfileData -> ShowS
[ProfileData] -> ShowS
ProfileData -> String
(Int -> ProfileData -> ShowS)
-> (ProfileData -> String)
-> ([ProfileData] -> ShowS)
-> Show ProfileData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProfileData] -> ShowS
$cshowList :: [ProfileData] -> ShowS
show :: ProfileData -> String
$cshow :: ProfileData -> String
showsPrec :: Int -> ProfileData -> ShowS
$cshowsPrec :: Int -> ProfileData -> ShowS
Show, Typeable ProfileData
DataType
Constr
Typeable ProfileData
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ProfileData -> c ProfileData)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ProfileData)
-> (ProfileData -> Constr)
-> (ProfileData -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ProfileData))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ProfileData))
-> ((forall b. Data b => b -> b) -> ProfileData -> ProfileData)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ProfileData -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ProfileData -> r)
-> (forall u. (forall d. Data d => d -> u) -> ProfileData -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> ProfileData -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ProfileData -> m ProfileData)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ProfileData -> m ProfileData)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ProfileData -> m ProfileData)
-> Data ProfileData
ProfileData -> DataType
ProfileData -> Constr
(forall b. Data b => b -> b) -> ProfileData -> ProfileData
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData -> c ProfileData
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ProfileData -> u
forall u. (forall d. Data d => d -> u) -> ProfileData -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProfileData -> m ProfileData
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProfileData -> m ProfileData
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData -> c ProfileData
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProfileData)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProfileData)
$cProfileData :: Constr
$tProfileData :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ProfileData -> m ProfileData
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProfileData -> m ProfileData
gmapMp :: (forall d. Data d => d -> m d) -> ProfileData -> m ProfileData
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProfileData -> m ProfileData
gmapM :: (forall d. Data d => d -> m d) -> ProfileData -> m ProfileData
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProfileData -> m ProfileData
gmapQi :: Int -> (forall d. Data d => d -> u) -> ProfileData -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ProfileData -> u
gmapQ :: (forall d. Data d => d -> u) -> ProfileData -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ProfileData -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProfileData -> r
gmapT :: (forall b. Data b => b -> b) -> ProfileData -> ProfileData
$cgmapT :: (forall b. Data b => b -> b) -> ProfileData -> ProfileData
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProfileData)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProfileData)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ProfileData)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProfileData)
dataTypeOf :: ProfileData -> DataType
$cdataTypeOf :: ProfileData -> DataType
toConstr :: ProfileData -> Constr
$ctoConstr :: ProfileData -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProfileData
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData -> c ProfileData
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProfileData -> c ProfileData
$cp1Data :: Typeable ProfileData
Data, Typeable, (forall x. ProfileData -> Rep ProfileData x)
-> (forall x. Rep ProfileData x -> ProfileData)
-> Generic ProfileData
forall x. Rep ProfileData x -> ProfileData
forall x. ProfileData -> Rep ProfileData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProfileData x -> ProfileData
$cfrom :: forall x. ProfileData -> Rep ProfileData x
Generic)

$(deriveSafeCopy 3 'extension ''ProfileData)

instance Migrate ProfileData where
  type MigrateFrom ProfileData = ProfileData_2
  migrate :: MigrateFrom ProfileData -> ProfileData
migrate (ProfileData_2 df rs attrs) = UserId
-> Maybe DisplayName -> Set Role -> Map Text Text -> ProfileData
ProfileData UserId
df Maybe DisplayName
forall a. Maybe a
Nothing Set Role
rs Map Text Text
attrs

emptyProfileData :: ProfileData
emptyProfileData :: ProfileData
emptyProfileData = ProfileData :: UserId
-> Maybe DisplayName -> Set Role -> Map Text Text -> ProfileData
ProfileData
   { dataFor :: UserId
dataFor     = Integer -> UserId
UserId Integer
0
   , displayName :: Maybe DisplayName
displayName = Maybe DisplayName
forall a. Maybe a
Nothing
   , roles :: Set Role
roles       = Set Role
forall a. Set a
Data.Set.empty
   , attributes :: Map Text Text
attributes  = Map Text Text
forall k a. Map k a
Data.Map.empty
   }

defaultProfileDataFor :: UserId -> ProfileData
defaultProfileDataFor :: UserId -> ProfileData
defaultProfileDataFor UserId
uid =
  ProfileData
emptyProfileData { dataFor :: UserId
dataFor = UserId
uid
                   , roles :: Set Role
roles   = Role -> Set Role
forall a. a -> Set a
singleton Role
Visitor
                   }

instance Indexable ProfileData where
    empty :: IxSet ProfileData
empty = [Ix ProfileData] -> IxSet ProfileData
forall a. [Ix a] -> IxSet a
ixSet [ (ProfileData -> UserId) -> Ix ProfileData
forall b a. (Ord b, Typeable b) => (a -> b) -> Ix a
ixFunS ProfileData -> UserId
dataFor
                  ]
        where
          ixFunS :: (Ord b, Typeable b) => (a -> b) -> Ix a
          ixFunS :: (a -> b) -> Ix a
ixFunS a -> b
f = (a -> [b]) -> Ix a
forall a b. (Ord b, Typeable b) => (a -> [b]) -> Ix a
ixFun ((a -> [b]) -> Ix a) -> (a -> [b]) -> Ix a
forall a b. (a -> b) -> a -> b
$ \a
a -> [a -> b
f a
a]