Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data WikiMusicUser = WikiMusicUser {
- identifier :: UUID
- displayName :: Text
- emailAddress :: Text
- passwordHash :: Maybe Text
- authToken :: Maybe Text
- roles :: [UserRole]
- data LoginRequest = LoginRequest {}
- data UserRole
- = SuperUser
- | Maintainer
- | LowRank
- | Demo
- isAtLeastDemo :: [UserRole] -> Bool
- isAtLeastMaintainer :: [UserRole] -> Bool
- isAtLeastSuperUser :: [UserRole] -> Bool
- isAtLeastLowRank :: [UserRole] -> Bool
- doWithRoles :: Applicative f => t -> (t -> Bool) -> p -> f (Either p b) -> f (Either p b)
- doWithRoles' :: Applicative f => WikiMusicUser -> ([UserRole] -> Bool) -> p -> f (Either p b) -> f (Either p b)
- show :: Show a => a -> String
- read :: Read a => String -> a
Documentation
data WikiMusicUser Source #
WikiMusicUser | |
|
Instances
data LoginRequest Source #
Instances
Instances
FromJSON UserRole Source # | |
Defined in WikiMusic.Model.Auth | |
ToJSON UserRole Source # | |
Generic UserRole Source # | |
Read UserRole Source # | |
Show UserRole Source # | |
Eq UserRole Source # | |
ToSchema UserRole Source # | |
Defined in WikiMusic.Model.Auth | |
type Rep UserRole Source # | |
Defined in WikiMusic.Model.Auth type Rep UserRole = D1 ('MetaData "UserRole" "WikiMusic.Model.Auth" "wikimusic-model-hs-1.2.0.0-2AFmU6Rx8U3ctQHH6pLAk" 'False) ((C1 ('MetaCons "SuperUser" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Maintainer" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LowRank" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Demo" 'PrefixI 'False) (U1 :: Type -> Type))) |
isAtLeastDemo :: [UserRole] -> Bool Source #
isAtLeastMaintainer :: [UserRole] -> Bool Source #
isAtLeastSuperUser :: [UserRole] -> Bool Source #
isAtLeastLowRank :: [UserRole] -> Bool Source #
doWithRoles :: Applicative f => t -> (t -> Bool) -> p -> f (Either p b) -> f (Either p b) Source #
doWithRoles' :: Applicative f => WikiMusicUser -> ([UserRole] -> Bool) -> p -> f (Either p b) -> f (Either p b) Source #
read :: Read a => String -> a #
The read
function reads input from a string, which must be
completely consumed by the input process. read
fails with an error
if the
parse is unsuccessful, and it is therefore discouraged from being used in
real applications. Use readMaybe
or readEither
for safe alternatives.
>>>
read "123" :: Int
123
>>>
read "hello" :: Int
*** Exception: Prelude.read: no parse