privilegeLevelP :: Parser PrivilegeLevel
privilegeLevelP =
  let
    reader' :: T.Text -> Either T.Text PrivilegeLevel
    reader' t = maybe (Left t) pure . privilegeLevelFromText $ t
  in option (eitherTextReader reader') $
       short 'p'
    <> long "privileges"
    <> help "The desired privilege level: read, write or admin"
privilegeLevelP :: Parser PrivilegeLevel
privilegeLevelP =
  let
    reader' :: T.Text -> Either T.Text PrivilegeLevel
    reader' t = maybe (Left t) pure . privilegeLevelFromText $ t
  in option (eitherTextReader reader') $
       short 'p'
    <> long "privileges"
    <> help "The desired privilege level: read, write or admin"
privilegeLevelP =
  let
    reader' :: T.Text -> Either T.Text PrivilegeLevel
    reader' t = maybe (Left t) pure . privilegeLevelFromText $ t
  in option (eitherTextReader reader') $
       short 'p'
    <> long "privileges"
    <> help "The desired privilege level: read, write or admin"