Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Extra = Extra {}
- class RenderRoute site => Yesod site where
- approot :: Approot site
- catchHandlerExceptions :: MonadUnliftIO m => site -> m a -> (SomeException -> m a) -> m a
- errorHandler :: ErrorResponse -> HandlerFor site TypedContent
- defaultLayout :: WidgetFor site () -> HandlerFor site Html
- urlParamRenderOverride :: site -> Route site -> [(Text, Text)] -> Maybe Builder
- isAuthorized :: Route site -> Bool -> HandlerFor site AuthResult
- isWriteRequest :: Route site -> HandlerFor site Bool
- authRoute :: site -> Maybe (Route site)
- cleanPath :: site -> [Text] -> Either [Text] [Text]
- joinPath :: site -> Text -> [Text] -> [(Text, Text)] -> Builder
- addStaticContent :: Text -> Text -> ByteString -> HandlerFor site (Maybe (Either Text (Route site, [(Text, Text)])))
- maximumContentLength :: site -> Maybe (Route site) -> Maybe Word64
- maximumContentLengthIO :: site -> Maybe (Route site) -> IO (Maybe Word64)
- makeLogger :: site -> IO Logger
- messageLoggerSource :: site -> Logger -> Loc -> LogSource -> LogLevel -> LogStr -> IO ()
- jsLoader :: site -> ScriptLoadPosition site
- jsAttributes :: site -> [(Text, Text)]
- jsAttributesHandler :: HandlerFor site [(Text, Text)]
- makeSessionBackend :: site -> IO (Maybe SessionBackend)
- fileUpload :: site -> RequestBodyLength -> FileUpload
- shouldLogIO :: site -> LogSource -> LogLevel -> IO Bool
- yesodMiddleware :: ToTypedContent res => HandlerFor site res -> HandlerFor site res
- yesodWithInternalState :: site -> Maybe (Route site) -> (InternalState -> IO a) -> IO a
- defaultMessageWidget :: Html -> HtmlUrl (Route site) -> WidgetFor site ()
- data Bool
- data Char
- data Double
- data Float
- data Int
- data Word
- data Ordering
- data Maybe a
- class a ~# b => (a :: k) ~ (b :: k)
- data Integer
- class Eq a where
- class Eq a => Ord a where
- type FilePath = String
- type String = [Char]
- data Void
- class Semigroup a => Monoid a where
- class Semigroup a where
- (<>) :: a -> a -> a
- class Functor f => Applicative (f :: Type -> Type) where
- class Functor (f :: Type -> Type) where
- class Applicative m => Monad (m :: Type -> Type) where
- data Either a b
- data IO a
- type ShowS = String -> String
- class Show a where
- class Bounded a where
- class Enum a where
- succ :: a -> a
- pred :: a -> a
- toEnum :: Int -> a
- fromEnum :: a -> Int
- enumFrom :: a -> [a]
- enumFromThen :: a -> a -> [a]
- enumFromTo :: a -> a -> [a]
- enumFromThenTo :: a -> a -> a -> [a]
- class (Real a, Fractional a) => RealFrac a where
- class (Real a, Enum a) => Integral a where
- class Read a where
- type Rational = Ratio Integer
- class Num a => Fractional a where
- (/) :: a -> a -> a
- recip :: a -> a
- fromRational :: Rational -> a
- class (Num a, Ord a) => Real a where
- toRational :: a -> Rational
- class FromJSON a where
- parseJSON :: Value -> Parser a
- parseJSONList :: Value -> Parser [a]
- omittedField :: Maybe a
- data ByteString
- class (PersistField (Key record), ToJSON (Key record), FromJSON (Key record), Show (Key record), Read (Key record), Eq (Key record), Ord (Key record)) => PersistEntity record where
- type PersistEntityBackend record
- data Key record
- data EntityField record :: Type -> Type
- data Unique record
- keyToValues :: Key record -> [PersistValue]
- keyFromValues :: [PersistValue] -> Either Text (Key record)
- persistIdField :: EntityField record (Key record)
- entityDef :: proxy record -> EntityDef
- persistFieldDef :: EntityField record typ -> FieldDef
- toPersistFields :: record -> [PersistValue]
- fromPersistValues :: [PersistValue] -> Either Text record
- tabulateEntityA :: Applicative f => (forall a. EntityField record a -> f a) -> f (Entity record)
- persistUniqueKeys :: record -> [Unique record]
- persistUniqueToFieldNames :: Unique record -> NonEmpty (FieldNameHS, FieldNameDB)
- persistUniqueToValues :: Unique record -> [PersistValue]
- fieldLens :: EntityField record field -> forall (f :: Type -> Type). Functor f => (field -> f field) -> Entity record -> f (Entity record)
- keyFromRecordM :: Maybe (record -> Key record)
- data family Key record
- data Value
- class ToJSON a where
- toJSON :: a -> Value
- toEncoding :: a -> Encoding
- toJSONList :: [a] -> Value
- toEncodingList :: [a] -> Encoding
- omitField :: a -> Bool
- data Text
- data UTCTime = UTCTime {
- utctDay :: Day
- utctDayTime :: DiffTime
- class Foldable (t :: Type -> Type) where
- fold :: Monoid m => t m -> m
- foldMap :: Monoid m => (a -> m) -> t a -> m
- foldMap' :: Monoid m => (a -> m) -> t a -> m
- foldr :: (a -> b -> b) -> b -> t a -> b
- foldr' :: (a -> b -> b) -> b -> t a -> b
- foldl :: (b -> a -> b) -> b -> t a -> b
- foldl' :: (b -> a -> b) -> b -> t a -> b
- foldr1 :: (a -> a -> a) -> t a -> a
- foldl1 :: (a -> a -> a) -> t a -> a
- toList :: t a -> [a]
- null :: t a -> Bool
- length :: t a -> Int
- elem :: Eq a => a -> t a -> Bool
- maximum :: Ord a => t a -> a
- minimum :: Ord a => t a -> a
- sum :: Num a => t a -> a
- product :: Num a => t a -> a
- class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where
- class Monad m => MonadFail (m :: Type -> Type) where
- data Header
- type Application = Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived
- class (forall a. Functor (p a)) => Bifunctor (p :: Type -> Type -> Type) where
- class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where
- traverse :: Applicative f => (a -> f b) -> t a -> f (t b)
- sequenceA :: Applicative f => t (f a) -> f (t a)
- mapM :: Monad m => (a -> m b) -> t a -> m (t b)
- sequence :: Monad m => t (m a) -> m (t a)
- type IOError = IOException
- class Monad m => MonadIO (m :: Type -> Type) where
- class Fractional a => Floating a where
- class Num a where
- class (RealFrac a, Floating a) => RealFloat a where
- floatRadix :: a -> Integer
- floatDigits :: a -> Int
- floatRange :: a -> (Int, Int)
- decodeFloat :: a -> (Integer, Int)
- encodeFloat :: Integer -> Int -> a
- exponent :: a -> Int
- significand :: a -> a
- scaleFloat :: Int -> a -> a
- isNaN :: a -> Bool
- isInfinite :: a -> Bool
- isDenormalized :: a -> Bool
- isNegativeZero :: a -> Bool
- isIEEE :: a -> Bool
- atan2 :: a -> a -> a
- type ReadS a = String -> [(a, String)]
- data App = App {}
- type Handler = HandlerFor App
- data Option a = Option {}
- data family Unique record
- type Html = Markup
- type Markup = MarkupM ()
- data Content
- = ContentBuilder !Builder !(Maybe Int)
- | ContentSource !(ConduitT () (Flush Builder) (ResourceT IO) ())
- | ContentFile !FilePath !(Maybe FilePart)
- | ContentDontEvaluate !Content
- data Field (m :: Type -> Type) a = Field {
- fieldParse :: [Text] -> [FileInfo] -> m (Either (SomeMessage (HandlerSite m)) (Maybe a))
- fieldView :: FieldViewFunc m a
- fieldEnctype :: Enctype
- class Default a where
- def :: a
- data Update record
- = PersistField typ => Update {
- updateField :: EntityField record typ
- updateValue :: typ
- updateUpdate :: PersistUpdate
- | BackendUpdate (BackendSpecificUpdate (PersistEntityBackend record) record)
- = PersistField typ => Update {
- type Env = Map Text [Text]
- class (forall (m :: Type -> Type). Monad m => Monad (t m)) => MonadTrans (t :: (Type -> Type) -> Type -> Type) where
- class MonadIO m => MonadUnliftIO (m :: Type -> Type) where
- withRunInIO :: ((forall a. m a -> IO a) -> IO b) -> m b
- class MonadIO m => MonadResource (m :: Type -> Type) where
- liftResourceT :: ResourceT IO a -> m a
- data DiffTime
- type Attr = Text
- type Year = Integer
- class Ord p => DayPeriod p where
- periodFirstDay :: p -> Day
- periodLastDay :: p -> Day
- dayPeriod :: Day -> p
- newtype Day = ModifiedJulianDay {}
- data CalendarDiffDays = CalendarDiffDays {}
- type DayOfMonth = Int
- type MonthOfYear = Int
- data DayOfWeek
- data NominalDiffTime
- newtype UniversalTime = ModJulianDate {}
- data CalendarDiffTime = CalendarDiffTime {}
- data TimeZone = TimeZone {}
- data TimeOfDay = TimeOfDay {}
- data LocalTime = LocalTime {}
- data TimeLocale = TimeLocale {}
- class ParseTime t
- class FormatTime t
- data ZonedTime = ZonedTime {}
- type Form a = Html -> MForm Handler (FormResult a, Widget)
- class Monad m => MonadLogger (m :: Type -> Type)
- data LogLevel
- class PathMultiPiece s where
- fromPathMultiPiece :: [Text] -> Maybe s
- toPathMultiPiece :: s -> [Text]
- class PathPiece s where
- fromPathPiece :: Text -> Maybe s
- toPathPiece :: s -> Text
- class PersistConfig c where
- type PersistConfigBackend c :: (Type -> Type) -> Type -> Type
- type PersistConfigPool c
- loadConfig :: Value -> Parser c
- applyEnv :: c -> IO c
- createPoolConfig :: c -> IO (PersistConfigPool c)
- runPool :: MonadUnliftIO m => c -> PersistConfigBackend c m a -> PersistConfigPool c -> m a
- type family PersistConfigBackend c :: (Type -> Type) -> Type -> Type
- type family PersistConfigPool c
- newtype ConstraintNameHS = ConstraintNameHS {}
- newtype ConstraintNameDB = ConstraintNameDB {}
- newtype EntityNameDB = EntityNameDB {}
- newtype EntityNameHS = EntityNameHS {}
- newtype FieldNameHS = FieldNameHS {}
- newtype FieldNameDB = FieldNameDB {}
- class DatabaseName a where
- escapeWith :: (Text -> str) -> a -> str
- data LiteralType
- data PersistValue where
- PersistText Text
- PersistByteString ByteString
- PersistInt64 Int64
- PersistDouble Double
- PersistRational Rational
- PersistBool Bool
- PersistDay Day
- PersistTimeOfDay TimeOfDay
- PersistUTCTime UTCTime
- PersistNull
- PersistList [PersistValue]
- PersistMap [(Text, PersistValue)]
- PersistObjectId ByteString
- PersistArray [PersistValue]
- PersistLiteral_ LiteralType ByteString
- pattern PersistLiteral :: ByteString -> PersistValue
- pattern PersistLiteralEscaped :: ByteString -> PersistValue
- pattern PersistDbSpecific :: ByteString -> PersistValue
- data FieldDef = FieldDef {
- fieldHaskell :: !FieldNameHS
- fieldDB :: !FieldNameDB
- fieldType :: !FieldType
- fieldSqlType :: !SqlType
- fieldAttrs :: ![FieldAttr]
- fieldStrict :: !Bool
- fieldReference :: !ReferenceDef
- fieldCascade :: !FieldCascade
- fieldComments :: !(Maybe Text)
- fieldGenerated :: !(Maybe Text)
- fieldIsImplicitIdColumn :: !Bool
- data PersistUpdate
- type family BackendSpecificUpdate backend record
- data UpdateException
- data PersistFilter
- type family BackendSpecificFilter backend record
- data SqlType
- data PersistException
- data CascadeAction
- = Cascade
- | Restrict
- | SetNull
- | SetDefault
- data FieldCascade = FieldCascade {
- fcOnUpdate :: !(Maybe CascadeAction)
- fcOnDelete :: !(Maybe CascadeAction)
- data ForeignDef = ForeignDef {
- foreignRefTableHaskell :: !EntityNameHS
- foreignRefTableDBName :: !EntityNameDB
- foreignConstraintNameHaskell :: !ConstraintNameHS
- foreignConstraintNameDBName :: !ConstraintNameDB
- foreignFieldCascade :: !FieldCascade
- foreignFields :: ![(ForeignFieldDef, ForeignFieldDef)]
- foreignAttrs :: ![Attr]
- foreignNullable :: Bool
- foreignToPrimary :: Bool
- type ForeignFieldDef = (FieldNameHS, FieldNameDB)
- data CompositeDef = CompositeDef {
- compositeFields :: !(NonEmpty FieldDef)
- compositeAttrs :: ![Attr]
- data UniqueDef = UniqueDef {
- uniqueHaskell :: !ConstraintNameHS
- uniqueDBName :: !ConstraintNameDB
- uniqueFields :: !(NonEmpty (FieldNameHS, FieldNameDB))
- uniqueAttrs :: ![Attr]
- data EmbedFieldDef = EmbedFieldDef {
- emFieldDB :: FieldNameDB
- emFieldEmbed :: Maybe (Either SelfEmbed EntityNameHS)
- data EmbedEntityDef = EmbedEntityDef {}
- data ReferenceDef
- data FieldType
- data FieldAttr
- type ExtraLine = [Text]
- data EntityIdDef
- data EntityDef
- data WhyNullable
- data IsNullable
- data Checkmark
- newtype OverflowNatural = OverflowNatural {}
- class PersistField a where
- toPersistValue :: a -> PersistValue
- fromPersistValue :: PersistValue -> Either Text a
- class SafeToInsert a
- class SymbolToField (sym :: Symbol) rec typ | sym rec -> typ where
- symbolToField :: EntityField rec typ
- data Entity record = Entity {}
- data FilterValue typ where
- FilterValue :: forall typ. typ -> FilterValue typ
- FilterValues :: forall typ. [typ] -> FilterValue typ
- UnsafeValue :: forall a typ. PersistField a => a -> FilterValue typ
- data Filter record
- = PersistField typ => Filter {
- filterField :: EntityField record typ
- filterValue :: FilterValue typ
- filterFilter :: PersistFilter
- | FilterAnd [Filter record]
- | FilterOr [Filter record]
- | BackendFilter (BackendSpecificFilter (PersistEntityBackend record) record)
- = PersistField typ => Filter {
- data SelectOpt record
- = Asc (EntityField record typ)
- | Desc (EntityField record typ)
- | OffsetBy Int
- | LimitTo Int
- type family PersistEntityBackend record
- data family EntityField record :: Type -> Type
- class (Show (BackendKey backend), Read (BackendKey backend), Eq (BackendKey backend), Ord (BackendKey backend), PersistStoreRead backend, PersistField (BackendKey backend), ToJSON (BackendKey backend), FromJSON (BackendKey backend)) => PersistStoreWrite backend where
- insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Key record)
- insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m ()
- insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m [Key record]
- insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m ()
- insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [Entity record] -> ReaderT backend m ()
- insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m ()
- repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m ()
- repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [(Key record, record)] -> ReaderT backend m ()
- replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m ()
- delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> ReaderT backend m ()
- update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> [Update record] -> ReaderT backend m ()
- updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> [Update record] -> ReaderT backend m record
- class (Show (BackendKey backend), Read (BackendKey backend), Eq (BackendKey backend), Ord (BackendKey backend), PersistCore backend, PersistField (BackendKey backend), ToJSON (BackendKey backend), FromJSON (BackendKey backend)) => PersistStoreRead backend where
- class PersistCore backend where
- data BackendKey backend
- data family BackendKey backend
- class (PersistEntity record, PersistEntityBackend record ~ backend, PersistCore backend) => ToBackendKey backend record where
- toBackendKey :: Key record -> BackendKey backend
- fromBackendKey :: BackendKey backend -> Key record
- type PersistRecordBackend record backend = (PersistEntity record, PersistEntityBackend record ~ BaseBackend backend)
- class BackendCompatible sup sub where
- projectBackend :: sub -> sup
- class HasPersistBackend backend => IsPersistBackend backend
- class HasPersistBackend backend where
- type BaseBackend backend
- persistBackend :: backend -> BaseBackend backend
- type family BaseBackend backend
- class PersistEntity record => AtLeastOneUniqueKey record where
- requireUniquesP :: record -> NonEmpty (Unique record)
- type MultipleUniqueKeysError ty = ((('Text "The entity " ':<>: 'ShowType ty) ':<>: 'Text " has multiple unique keys.") ':$$: ('Text "The function you are trying to call requires only a single " ':<>: 'Text "unique key.")) ':$$: (('Text "There is probably a variant of the function with 'By' " ':<>: 'Text "appended that will allow you to select a unique key ") ':<>: 'Text "for the operation.")
- type NoUniqueKeysError ty = (('Text "The entity " ':<>: 'ShowType ty) ':<>: 'Text " does not have any unique keys.") ':$$: ('Text "The function you are trying to call requires a unique key " ':<>: 'Text "to be defined on the entity.")
- class PersistEntity record => OnlyOneUniqueKey record where
- onlyUniqueP :: record -> Unique record
- class (PersistUniqueRead backend, PersistStoreWrite backend) => PersistUniqueWrite backend where
- deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m ()
- insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Maybe (Key record))
- insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Maybe ())
- upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT backend m (Entity record)
- upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT backend m (Entity record)
- putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m ()
- class PersistStoreRead backend => PersistUniqueRead backend where
- class (PersistQueryRead backend, PersistStoreWrite backend) => PersistQueryWrite backend where
- updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> [Update record] -> ReaderT backend m ()
- deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m ()
- class (PersistCore backend, PersistStoreRead backend) => PersistQueryRead backend where
- selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record backend, MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT backend m1 (Acquire (ConduitM () (Entity record) m2 ()))
- selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m (Maybe (Entity record))
- selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m1 (Acquire (ConduitM () (Key record) m2 ()))
- count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m Int
- exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m Bool
- type PersistStore a = PersistStoreWrite a
- type PersistQuery a = PersistQueryWrite a
- type PersistUnique a = PersistUniqueWrite a
- data ImplicitIdDef
- data EntityJSON = EntityJSON {}
- data MkPersistSettings
- type JavascriptUrl url = (url -> [(Text, Text)] -> Text) -> Javascript
- type CssUrl url = (url -> [(Text, Text)] -> Text) -> Css
- type HtmlUrl url = Render url -> Html
- data SomeMessage master = RenderMessage master msg => SomeMessage msg
- type Lang = Text
- class RenderMessage master message where
- renderMessage :: master -> [Lang] -> message -> Text
- class ToMessage a where
- data Fragment a b = a :#: b
- data FileInfo
- class RenderRoute a => RouteAttrs a where
- routeAttrs :: Route a -> Set Text
- class RenderRoute a => ParseRoute a where
- class Eq (Route a) => RenderRoute a where
- renderRoute :: Route a -> ([Text], [(Text, Text)])
- data family Route a
- data SubHandlerFor sub master a
- data ErrorResponse
- newtype DontFullyEvaluate a = DontFullyEvaluate {
- unDontFullyEvaluate :: a
- type ContentType = ByteString
- newtype RepXml = RepXml Content
- newtype RepPlain = RepPlain Content
- newtype RepJson = RepJson Content
- type RepHtml = Html
- data TypedContent = TypedContent !ContentType !Content
- data PageContent url = PageContent {}
- newtype CssBuilder = CssBuilder {}
- data WidgetFor site a
- data HandlerFor site a
- newtype WaiSubsiteWithAuth = WaiSubsiteWithAuth {}
- newtype WaiSubsite = WaiSubsite {}
- type Texts = [Text]
- type BottomOfHeadAsync master = [Text] -> Maybe (HtmlUrl (Route master)) -> HtmlUrl (Route master)
- data ScriptLoadPosition master
- = BottomOfBody
- | BottomOfHeadBlocking
- | BottomOfHeadAsync !(BottomOfHeadAsync master)
- data AuthResult
- data Approot master
- = ApprootRelative
- | ApprootStatic !Text
- | ApprootMaster !(master -> Text)
- | ApprootRequest !(master -> Request -> Text)
- data FileUpload
- = FileUploadMemory !(BackEnd ByteString)
- | FileUploadDisk !(InternalState -> BackEnd FilePath)
- | FileUploadSource !(BackEnd (ConduitT () ByteString (ResourceT IO) ()))
- type RequestBodyContents = ([(Text, Text)], [(Text, FileInfo)])
- data YesodRequest = YesodRequest {
- reqGetParams :: ![(Text, Text)]
- reqCookies :: ![(Text, Text)]
- reqWaiRequest :: !Request
- reqLangs :: ![Text]
- reqToken :: !(Maybe Text)
- reqSession :: !SessionMap
- reqAccept :: ![ContentType]
- newtype SessionBackend = SessionBackend {
- sbLoadSession :: Request -> IO (SessionMap, SaveSession)
- type SessionMap = Map Text ByteString
- class ToContent a => ToTypedContent a where
- toTypedContent :: a -> TypedContent
- class ToTypedContent a => HasContentType a where
- getContentType :: Monad m => m a -> ContentType
- class ToFlushBuilder a where
- toFlushBuilder :: a -> Flush Builder
- class ToContent a where
- class MonadHandler m => MonadWidget (m :: Type -> Type) where
- liftWidget :: WidgetFor (HandlerSite m) a -> m a
- class (MonadResource m, MonadLogger m) => MonadHandler (m :: Type -> Type) where
- type HandlerSite (m :: Type -> Type)
- type SubHandlerSite (m :: Type -> Type)
- liftHandler :: HandlerFor (HandlerSite m) a -> m a
- liftSubHandler :: SubHandlerFor (SubHandlerSite m) (HandlerSite m) a -> m a
- type family HandlerSite (m :: Type -> Type)
- type family SubHandlerSite (m :: Type -> Type)
- data ProvidedRep (m :: Type -> Type)
- class RedirectUrl master a where
- toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => a -> m Text
- type HandlerT site (m :: Type -> Type) = HandlerFor site
- class ToWidgetHead site a where
- toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => a -> m ()
- class ToWidgetBody site a where
- toWidgetBody :: (MonadWidget m, HandlerSite m ~ site) => a -> m ()
- class ToWidgetMedia site a where
- toWidgetMedia :: (MonadWidget m, HandlerSite m ~ site) => Text -> a -> m ()
- class ToWidget site a where
- toWidget :: (MonadWidget m, HandlerSite m ~ site) => a -> m ()
- type WidgetT site (m :: Type -> Type) = WidgetFor site
- class YesodSubDispatch sub master where
- yesodSubDispatch :: YesodSubRunnerEnv sub master -> Application
- class Yesod site => YesodDispatch site where
- yesodDispatch :: YesodRunnerEnv site -> Application
- type LiteWidget = WidgetFor LiteApp
- type LiteHandler = HandlerFor LiteApp
- newtype LiteApp = LiteApp {
- unLiteApp :: Method -> [Text] -> Maybe (LiteHandler TypedContent)
- class YesodBreadcrumbs site where
- breadcrumb :: Route site -> HandlerFor site (Text, Maybe (Route site))
- data RouteOpts
- data FormMessage
- = MsgInvalidInteger Text
- | MsgInvalidNumber Text
- | MsgInvalidEntry Text
- | MsgInvalidUrl Text
- | MsgInvalidEmail Text
- | MsgInvalidTimeFormat
- | MsgInvalidHour Text
- | MsgInvalidMinute Text
- | MsgInvalidSecond Text
- | MsgInvalidDay
- | MsgCsrfWarning
- | MsgValueRequired
- | MsgInputNotFound Text
- | MsgSelectNone
- | MsgInvalidBool Text
- | MsgBoolYes
- | MsgBoolNo
- | MsgDelete
- | MsgInvalidHexColorFormat Text
- | MsgInvalidDatetimeFormat Text
- type FieldViewFunc (m :: Type -> Type) a = Text -> Text -> [(Text, Text)] -> Either Text a -> Bool -> WidgetFor (HandlerSite m) ()
- data FieldView site = FieldView {}
- data FieldSettings master = FieldSettings {}
- newtype AForm (m :: Type -> Type) a = AForm {
- unAForm :: (HandlerSite m, [Text]) -> Maybe (Env, FileEnv) -> Ints -> m (FormResult a, [FieldView (HandlerSite m)] -> [FieldView (HandlerSite m)], Ints, Enctype)
- type MForm (m :: Type -> Type) a = RWST (Maybe (Env, FileEnv), HandlerSite m, [Lang]) Enctype Ints m a
- type WForm (m :: Type -> Type) a = MForm (WriterT [FieldView (HandlerSite m)] m) a
- type FileEnv = Map Text [FileInfo]
- data Ints
- data Enctype
- data FormResult a
- = FormMissing
- | FormFailure [Text]
- | FormSuccess a
- newtype FormInput (m :: Type -> Type) a = FormInput {
- unFormInput :: HandlerSite m -> [Text] -> Env -> FileEnv -> m (Either DText a)
- type FormRender (m :: Type -> Type) a = AForm m a -> Markup -> MForm m (FormResult a, WidgetFor (HandlerSite m) ())
- data OptionList a
- = OptionList {
- olOptions :: [Option a]
- olReadExternal :: Text -> Maybe a
- | OptionListGrouped {
- olOptionsGrouped :: [(Text, [Option a])]
- olReadExternalGrouped :: Text -> Maybe a
- = OptionList {
- type AutoFocus = Bool
- newtype Textarea = Textarea {
- unTextarea :: Text
- newtype DBRunner site = DBRunner {
- runDBRunner :: forall a. YesodDB site a -> HandlerFor site a
- class YesodPersist site => YesodPersistRunner site where
- getDBRunner :: HandlerFor site (DBRunner site, HandlerFor site ())
- class Monad (YesodDB site) => YesodPersist site where
- type YesodPersistBackend site
- runDB :: YesodDB site a -> HandlerFor site a
- type family YesodPersistBackend site
- type YesodDB site = ReaderT (YesodPersistBackend site) (HandlerFor site)
- data Permission
- type Widget = WidgetFor App ()
- type AppRoute = Route App
- data ViewData = VD {}
- pattern December :: MonthOfYear
- pattern November :: MonthOfYear
- pattern October :: MonthOfYear
- pattern September :: MonthOfYear
- pattern August :: MonthOfYear
- pattern July :: MonthOfYear
- pattern June :: MonthOfYear
- pattern May :: MonthOfYear
- pattern April :: MonthOfYear
- pattern March :: MonthOfYear
- pattern February :: MonthOfYear
- pattern January :: MonthOfYear
- pattern BeforeCommonEra :: Integer -> Year
- pattern CommonEra :: Integer -> Year
- pattern YearMonthDay :: Year -> MonthOfYear -> DayOfMonth -> Day
- array :: ToJSON a => [a] -> Value
- warp :: YesodDispatch site => Int -> site -> IO ()
- isLeft :: Either a b -> Bool
- fromLeft :: a -> Either a b -> a
- error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
- span :: (a -> Bool) -> [a] -> ([a], [a])
- filter :: (a -> Bool) -> [a] -> [a]
- ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- otherwise :: Bool
- (++) :: [a] -> [a] -> [a]
- map :: (a -> b) -> [a] -> [b]
- join :: Monad m => m (m a) -> m a
- zip :: [a] -> [b] -> [(a, b)]
- concat :: Foldable t => t [a] -> [a]
- realToFrac :: (Real a, Fractional b) => a -> b
- fromIntegral :: (Integral a, Num b) => a -> b
- lookup :: Eq a => a -> [(a, b)] -> Maybe b
- mapMaybe :: (a -> Maybe b) -> [a] -> [b]
- object :: [Pair] -> Value
- (.:) :: FromJSON a => Object -> Key -> Parser a
- (.=) :: (KeyValue e kv, ToJSON v) => Key -> v -> kv
- when :: Applicative f => Bool -> f () -> f ()
- liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
- fromMaybe :: a -> Maybe a -> a
- catMaybes :: [Maybe a] -> [a]
- void :: Functor f => f a -> f ()
- unless :: Applicative f => Bool -> f () -> f ()
- id :: a -> a
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- seq :: forall {r :: RuntimeRep} a (b :: TYPE r). a -> b -> b
- liftM :: Monad m => (a1 -> r) -> m a1 -> m r
- guard :: Alternative f => Bool -> f ()
- setTitle :: MonadWidget m => Html -> m ()
- mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
- takeWhile :: (a -> Bool) -> [a] -> [a]
- take :: Int -> [a] -> [a]
- read :: Read a => String -> a
- (.) :: (b -> c) -> (a -> b) -> a -> c
- const :: a -> b -> a
- getCurrentTime :: IO UTCTime
- zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- even :: Integral a => a -> Bool
- fst :: (a, b) -> a
- maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- uncurry :: (a -> b -> c) -> (a, b) -> c
- for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
- forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
- forever :: Applicative f => f a -> f b
- getLine :: IO String
- putStrLn :: String -> IO ()
- unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
- cycle :: HasCallStack => [a] -> [a]
- print :: Show a => a -> IO ()
- (^) :: (Num a, Integral b) => a -> b -> a
- (&&) :: Bool -> Bool -> Bool
- (||) :: Bool -> Bool -> Bool
- not :: Bool -> Bool
- errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
- undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
- (=<<) :: Monad m => (a -> m b) -> m a -> m b
- liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
- liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r
- liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
- ap :: Monad m => m (a -> b) -> m a -> m b
- flip :: (a -> b -> c) -> b -> a -> c
- ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- until :: (a -> Bool) -> (a -> a) -> a -> a
- asTypeOf :: a -> a -> a
- subtract :: Num a => a -> a -> a
- maybe :: b -> (a -> b) -> Maybe a -> b
- isJust :: Maybe a -> Bool
- isNothing :: Maybe a -> Bool
- fromJust :: HasCallStack => Maybe a -> a
- maybeToList :: Maybe a -> [a]
- listToMaybe :: [a] -> Maybe a
- scanl :: (b -> a -> b) -> b -> [a] -> [b]
- scanl1 :: (a -> a -> a) -> [a] -> [a]
- scanr :: (a -> b -> b) -> b -> [a] -> [b]
- scanr1 :: (a -> a -> a) -> [a] -> [a]
- iterate :: (a -> a) -> a -> [a]
- repeat :: a -> [a]
- replicate :: Int -> a -> [a]
- dropWhile :: (a -> Bool) -> [a] -> [a]
- drop :: Int -> [a] -> [a]
- splitAt :: Int -> [a] -> ([a], [a])
- break :: (a -> Bool) -> [a] -> ([a], [a])
- reverse :: [a] -> [a]
- and :: Foldable t => t Bool -> Bool
- or :: Foldable t => t Bool -> Bool
- any :: Foldable t => (a -> Bool) -> t a -> Bool
- all :: Foldable t => (a -> Bool) -> t a -> Bool
- notElem :: (Foldable t, Eq a) => a -> t a -> Bool
- concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- (!!) :: HasCallStack => [a] -> Int -> a
- zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- unzip :: [(a, b)] -> ([a], [b])
- unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- shows :: Show a => a -> ShowS
- showChar :: Char -> ShowS
- showString :: String -> ShowS
- showParen :: Bool -> ShowS -> ShowS
- odd :: Integral a => a -> Bool
- (^^) :: (Fractional a, Integral b) => a -> b -> a
- gcd :: Integral a => a -> a -> a
- lcm :: Integral a => a -> a -> a
- snd :: (a, b) -> b
- curry :: ((a, b) -> c) -> a -> b -> c
- lex :: ReadS String
- readParen :: Bool -> ReadS a -> ReadS a
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- lefts :: [Either a b] -> [a]
- rights :: [Either a b] -> [b]
- partitionEithers :: [Either a b] -> ([a], [b])
- isRight :: Either a b -> Bool
- fromRight :: b -> Either a b -> b
- reads :: Read a => ReadS a
- foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b
- foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
- for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
- sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f ()
- sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
- asum :: (Foldable t, Alternative f) => t (f a) -> f a
- msum :: (Foldable t, MonadPlus m) => t (m a) -> m a
- find :: Foldable t => (a -> Bool) -> t a -> Maybe a
- mapAccumL :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)
- mapAccumR :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)
- insertBy :: forall record backend (m :: Type -> Type). (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record, SafeToInsert record) => record -> ReaderT backend m (Either (Entity record) (Key record))
- lines :: String -> [String]
- unlines :: [String] -> String
- words :: String -> [String]
- unwords :: [String] -> String
- userError :: String -> IOError
- ioError :: IOError -> IO a
- putChar :: Char -> IO ()
- putStr :: String -> IO ()
- getChar :: IO Char
- getContents :: IO String
- interact :: (String -> String) -> IO ()
- appendFile :: FilePath -> String -> IO ()
- readLn :: Read a => IO a
- readIO :: Read a => String -> IO a
- mapAccumM :: (Monad m, Traversable t) => (s -> a -> m (s, b)) -> s -> t a -> m (s, t b)
- forAccumM :: (Monad m, Traversable t) => s -> t a -> (s -> a -> m (s, b)) -> m (s, t b)
- fmapDefault :: Traversable t => (a -> b) -> t a -> t b
- foldMapDefault :: (Traversable t, Monoid m) => (a -> m) -> t a -> m
- filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
- (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
- (<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
- mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
- zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m ()
- foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m ()
- replicateM :: Applicative m => Int -> m a -> m [a]
- replicateM_ :: Applicative m => Int -> m a -> m ()
- (<$!>) :: Monad m => (a -> b) -> m a -> m b
- mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
- readIntegral :: Num a => String -> Maybe a
- toHtml :: ToMarkup a => a -> Html
- preEscapedToMarkup :: ToMarkup a => a -> Markup
- check :: forall (m :: Type -> Type) msg a. (Monad m, RenderMessage (HandlerSite m) msg) => (a -> Either msg a) -> Field m a -> Field m a
- toJsonText :: ToJSON j => j -> Text
- calendarDay :: CalendarDiffDays
- calendarWeek :: CalendarDiffDays
- calendarMonth :: CalendarDiffDays
- calendarYear :: CalendarDiffDays
- scaleCalendarDiffDays :: Integer -> CalendarDiffDays -> CalendarDiffDays
- addDays :: Integer -> Day -> Day
- diffDays :: Day -> Day -> Integer
- periodAllDays :: DayPeriod p => p -> [Day]
- periodLength :: DayPeriod p => p -> Int
- periodFromDay :: DayPeriod p => Day -> (p, Int)
- periodToDay :: DayPeriod p => p -> Int -> Day
- periodToDayValid :: DayPeriod p => p -> Int -> Maybe Day
- isLeapYear :: Year -> Bool
- toGregorian :: Day -> (Year, MonthOfYear, DayOfMonth)
- fromGregorian :: Year -> MonthOfYear -> DayOfMonth -> Day
- fromGregorianValid :: Year -> MonthOfYear -> DayOfMonth -> Maybe Day
- showGregorian :: Day -> String
- gregorianMonthLength :: Year -> MonthOfYear -> DayOfMonth
- addGregorianMonthsClip :: Integer -> Day -> Day
- addGregorianMonthsRollOver :: Integer -> Day -> Day
- addGregorianYearsClip :: Integer -> Day -> Day
- addGregorianYearsRollOver :: Integer -> Day -> Day
- addGregorianDurationClip :: CalendarDiffDays -> Day -> Day
- addGregorianDurationRollOver :: CalendarDiffDays -> Day -> Day
- diffGregorianDurationClip :: Day -> Day -> CalendarDiffDays
- diffGregorianDurationRollOver :: Day -> Day -> CalendarDiffDays
- dayOfWeek :: Day -> DayOfWeek
- dayOfWeekDiff :: DayOfWeek -> DayOfWeek -> Int
- firstDayOfWeekOnAfter :: DayOfWeek -> Day -> Day
- weekAllDays :: DayOfWeek -> Day -> [Day]
- weekFirstDay :: DayOfWeek -> Day -> Day
- weekLastDay :: DayOfWeek -> Day -> Day
- secondsToDiffTime :: Integer -> DiffTime
- picosecondsToDiffTime :: Integer -> DiffTime
- diffTimeToPicoseconds :: DiffTime -> Integer
- secondsToNominalDiffTime :: Pico -> NominalDiffTime
- nominalDiffTimeToSeconds :: NominalDiffTime -> Pico
- nominalDay :: NominalDiffTime
- getTime_resolution :: DiffTime
- addUTCTime :: NominalDiffTime -> UTCTime -> UTCTime
- diffUTCTime :: UTCTime -> UTCTime -> NominalDiffTime
- calendarTimeDays :: CalendarDiffDays -> CalendarDiffTime
- calendarTimeTime :: NominalDiffTime -> CalendarDiffTime
- scaleCalendarDiffTime :: Integer -> CalendarDiffTime -> CalendarDiffTime
- minutesToTimeZone :: Int -> TimeZone
- hoursToTimeZone :: Int -> TimeZone
- timeZoneOffsetString' :: Maybe Char -> TimeZone -> String
- timeZoneOffsetString :: TimeZone -> String
- utc :: TimeZone
- getTimeZone :: UTCTime -> IO TimeZone
- getCurrentTimeZone :: IO TimeZone
- midnight :: TimeOfDay
- midday :: TimeOfDay
- makeTimeOfDayValid :: Int -> Int -> Pico -> Maybe TimeOfDay
- timeToDaysAndTimeOfDay :: NominalDiffTime -> (Integer, TimeOfDay)
- daysAndTimeOfDayToTime :: Integer -> TimeOfDay -> NominalDiffTime
- utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)
- localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)
- timeToTimeOfDay :: DiffTime -> TimeOfDay
- pastMidnight :: DiffTime -> TimeOfDay
- timeOfDayToTime :: TimeOfDay -> DiffTime
- sinceMidnight :: TimeOfDay -> DiffTime
- dayFractionToTimeOfDay :: Rational -> TimeOfDay
- timeOfDayToDayFraction :: TimeOfDay -> Rational
- addLocalTime :: NominalDiffTime -> LocalTime -> LocalTime
- diffLocalTime :: LocalTime -> LocalTime -> NominalDiffTime
- utcToLocalTime :: TimeZone -> UTCTime -> LocalTime
- localTimeToUTC :: TimeZone -> LocalTime -> UTCTime
- ut1ToLocalTime :: Rational -> UniversalTime -> LocalTime
- localTimeToUT1 :: Rational -> LocalTime -> UniversalTime
- defaultTimeLocale :: TimeLocale
- iso8601DateFormat :: Maybe String -> String
- rfc822DateFormat :: String
- formatTime :: FormatTime t => TimeLocale -> String -> t -> String
- utcToZonedTime :: TimeZone -> UTCTime -> ZonedTime
- zonedTimeToUTC :: ZonedTime -> UTCTime
- getZonedTime :: IO ZonedTime
- utcToLocalZonedTime :: UTCTime -> IO ZonedTime
- parseTimeM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> String -> String -> m t
- parseTimeMultipleM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> [(String, String)] -> m t
- parseTimeOrError :: ParseTime t => Bool -> TimeLocale -> String -> String -> t
- readSTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadS t
- readPTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadP t
- renderTable :: forall (m :: Type -> Type) a. Monad m => FormRender m a
- parseHelper :: (Monad m, RenderMessage site FormMessage) => (Text -> Either FormMessage a) -> [Text] -> [FileInfo] -> m (Either (SomeMessage site) (Maybe a))
- sendResponse :: (MonadHandler m, ToTypedContent c) => c -> m a
- logDebug :: Q Exp
- logInfo :: Q Exp
- logWarn :: Q Exp
- logError :: Q Exp
- logOther :: Text -> Q Exp
- logDebugS :: Q Exp
- logInfoS :: Q Exp
- logWarnS :: Q Exp
- logErrorS :: Q Exp
- logOtherS :: Q Exp
- (>=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (<=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- fromPersistValueText :: PersistValue -> Either Text Text
- fieldAttrsContainsNullable :: [FieldAttr] -> IsNullable
- entitiesPrimary :: EntityDef -> NonEmpty FieldDef
- entityPrimary :: EntityDef -> Maybe CompositeDef
- keyAndEntityFields :: EntityDef -> NonEmpty FieldDef
- parseFieldAttrs :: [Text] -> [FieldAttr]
- isFieldNotGenerated :: FieldDef -> Bool
- isHaskellField :: FieldDef -> Bool
- noCascade :: FieldCascade
- renderFieldCascade :: FieldCascade -> Text
- renderCascadeAction :: CascadeAction -> Text
- setFieldAttrs :: [FieldAttr] -> FieldDef -> FieldDef
- overFieldAttrs :: ([FieldAttr] -> [FieldAttr]) -> FieldDef -> FieldDef
- addFieldAttr :: FieldAttr -> FieldDef -> FieldDef
- isFieldNullable :: FieldDef -> IsNullable
- isFieldMaybe :: FieldDef -> Bool
- getEntityUniquesNoPrimaryKey :: EntityDef -> [UniqueDef]
- getEntityUniques :: EntityDef -> [UniqueDef]
- getEntityHaskellName :: EntityDef -> EntityNameHS
- getEntityDBName :: EntityDef -> EntityNameDB
- getEntityExtra :: EntityDef -> Map Text [[Text]]
- setEntityDBName :: EntityNameDB -> EntityDef -> EntityDef
- getEntityComments :: EntityDef -> Maybe Text
- getEntityForeignDefs :: EntityDef -> [ForeignDef]
- getEntityFields :: EntityDef -> [FieldDef]
- getEntityFieldsDatabase :: EntityDef -> [FieldDef]
- isEntitySum :: EntityDef -> Bool
- getEntityId :: EntityDef -> EntityIdDef
- getEntityIdField :: EntityDef -> Maybe FieldDef
- setEntityId :: FieldDef -> EntityDef -> EntityDef
- setEntityIdDef :: EntityIdDef -> EntityDef -> EntityDef
- getEntityKeyFields :: EntityDef -> NonEmpty FieldDef
- overEntityFields :: ([FieldDef] -> [FieldDef]) -> EntityDef -> EntityDef
- getPersistMap :: PersistValue -> Either Text [(Text, PersistValue)]
- tabulateEntity :: PersistEntity record => (forall a. EntityField record a -> a) -> Entity record
- entityValues :: PersistEntity record => Entity record -> [PersistValue]
- keyValueEntityToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Value
- keyValueEntityFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record)
- entityIdToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Value
- entityIdFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record)
- toPersistValueJSON :: ToJSON a => a -> PersistValue
- fromPersistValueJSON :: FromJSON a => PersistValue -> Either Text a
- withBaseBackend :: forall backend (m :: Type -> Type) a. HasPersistBackend backend => ReaderT (BaseBackend backend) m a -> ReaderT backend m a
- withCompatibleBackend :: forall sup sub (m :: Type -> Type) a. BackendCompatible sup sub => ReaderT sup m a -> ReaderT sub m a
- liftPersist :: (MonadIO m, MonadReader backend m) => ReaderT backend IO b -> m b
- getJust :: forall record backend (m :: Type -> Type). (PersistStoreRead backend, PersistRecordBackend record backend, MonadIO m) => Key record -> ReaderT backend m record
- getJustEntity :: forall record backend (m :: Type -> Type). (PersistEntityBackend record ~ BaseBackend backend, MonadIO m, PersistEntity record, PersistStoreRead backend) => Key record -> ReaderT backend m (Entity record)
- belongsTo :: forall ent1 ent2 backend (m :: Type -> Type). (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Maybe (Key ent2)) -> ent1 -> ReaderT backend m (Maybe ent2)
- belongsToJust :: forall ent1 ent2 backend (m :: Type -> Type). (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Key ent2) -> ent1 -> ReaderT backend m ent2
- insertEntity :: forall e backend (m :: Type -> Type). (PersistStoreWrite backend, PersistRecordBackend e backend, SafeToInsert e, MonadIO m, HasCallStack) => e -> ReaderT backend m (Entity e)
- getEntity :: forall e backend (m :: Type -> Type). (PersistStoreRead backend, PersistRecordBackend e backend, MonadIO m) => Key e -> ReaderT backend m (Maybe (Entity e))
- insertRecord :: forall record backend (m :: Type -> Type). (PersistEntityBackend record ~ BaseBackend backend, PersistEntity record, MonadIO m, PersistStoreWrite backend, SafeToInsert record, HasCallStack) => record -> ReaderT backend m record
- onlyOneUniqueDef :: (OnlyOneUniqueKey record, Monad proxy) => proxy record -> UniqueDef
- insertUniqueEntity :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueWrite backend, SafeToInsert record) => record -> ReaderT backend m (Maybe (Entity record))
- onlyUnique :: forall record backend (m :: Type -> Type). (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend record backend, OnlyOneUniqueKey record) => record -> ReaderT backend m (Unique record)
- getByValue :: forall record (m :: Type -> Type) backend. (MonadIO m, PersistUniqueRead backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record) => record -> ReaderT backend m (Maybe (Entity record))
- replaceUnique :: forall record backend (m :: Type -> Type). (MonadIO m, Eq (Unique record), PersistRecordBackend record backend, PersistUniqueWrite backend) => Key record -> record -> ReaderT backend m (Maybe (Unique record))
- checkUnique :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueRead backend) => record -> ReaderT backend m (Maybe (Unique record))
- checkUniqueUpdateable :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueRead backend) => Entity record -> ReaderT backend m (Maybe (Unique record))
- selectSource :: forall record backend (m :: Type -> Type). (PersistQueryRead backend, MonadResource m, PersistRecordBackend record backend, MonadReader backend m) => [Filter record] -> [SelectOpt record] -> ConduitM () (Entity record) m ()
- selectKeys :: forall record backend (m :: Type -> Type). (PersistQueryRead backend, MonadResource m, PersistRecordBackend record backend, MonadReader backend m) => [Filter record] -> [SelectOpt record] -> ConduitM () (Key record) m ()
- selectList :: forall record backend (m :: Type -> Type). (MonadIO m, PersistQueryRead backend, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m [Entity record]
- selectKeysList :: forall record backend (m :: Type -> Type). (MonadIO m, PersistQueryRead backend, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m [Key record]
- (=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (+=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (-=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (*=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (/=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (==.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (!=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (<.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (>.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v
- (/<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v
- (||.) :: [Filter v] -> [Filter v] -> [Filter v]
- listToJSON :: [PersistValue] -> Text
- mapToJSON :: [(Text, PersistValue)] -> Text
- limitOffsetOrder :: PersistEntity val => [SelectOpt val] -> (Int, Int, [SelectOpt val])
- persistWith :: PersistSettings -> QuasiQuoter
- persistUpperCase :: QuasiQuoter
- persistLowerCase :: QuasiQuoter
- persistFileWith :: PersistSettings -> FilePath -> Q Exp
- persistManyFileWith :: PersistSettings -> [FilePath] -> Q Exp
- embedEntityDefs :: [EntityDef] -> [UnboundEntityDef] -> [UnboundEntityDef]
- parseReferences :: PersistSettings -> Text -> Q Exp
- mkPersist :: MkPersistSettings -> [UnboundEntityDef] -> Q [Dec]
- mkPersistWith :: MkPersistSettings -> [EntityDef] -> [UnboundEntityDef] -> Q [Dec]
- setImplicitIdDef :: ImplicitIdDef -> MkPersistSettings -> MkPersistSettings
- mkPersistSettings :: Type -> MkPersistSettings
- sqlSettings :: MkPersistSettings
- lensPTH :: (s -> a) -> (s -> b -> t) -> Lens s t a b
- pkNewtype :: MkPersistSettings -> UnboundEntityDef -> Bool
- fieldError :: Text -> Text -> Text -> Text
- persistFieldFromEntity :: MkPersistSettings -> UnboundEntityDef -> Q [Dec]
- share :: [[a] -> Q [Dec]] -> [a] -> Q [Dec]
- mkEntityDefList :: String -> [UnboundEntityDef] -> Q [Dec]
- derivePersistField :: String -> Q [Dec]
- derivePersistFieldJSON :: String -> Q [Dec]
- migrateModels :: [EntityDef] -> Migration
- mkMigrate :: String -> [UnboundEntityDef] -> Q [Dec]
- discoverEntities :: Q Exp
- getUrlRenderParams :: MonadHandler m => m (Route (HandlerSite m) -> [(Text, Text)] -> Text)
- renderJavascriptUrl :: (url -> [(Text, Text)] -> Text) -> JavascriptUrl url -> Text
- julius :: QuasiQuoter
- renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text
- lucius :: QuasiQuoter
- shamlet :: QuasiQuoter
- hamlet :: QuasiQuoter
- xhamlet :: QuasiQuoter
- cassius :: QuasiQuoter
- mkMessage :: String -> FilePath -> Lang -> Q [Dec]
- mkMessageFor :: String -> String -> FilePath -> Lang -> Q [Dec]
- mkMessageVariant :: String -> String -> FilePath -> Lang -> Q [Dec]
- getSession :: MonadHandler m => m SessionMap
- setSession :: MonadHandler m => Text -> Text -> m ()
- guessApproot :: Approot site
- setHeader :: MonadHandler m => Text -> Text -> m ()
- sendFile :: MonadHandler m => ContentType -> FilePath -> m a
- formatW3 :: UTCTime -> Text
- formatRFC1123 :: UTCTime -> Text
- formatRFC822 :: UTCTime -> Text
- clientSessionDateCacher :: NominalDiffTime -> IO (IO ClientSessionDateCache, IO ())
- emptyContent :: Content
- repJson :: ToContent a => a -> RepJson
- repPlain :: ToContent a => a -> RepPlain
- repXml :: ToContent a => a -> RepXml
- typeHtml :: ContentType
- typePlain :: ContentType
- typeJson :: ContentType
- typeXml :: ContentType
- typeAtom :: ContentType
- typeRss :: ContentType
- typeJpeg :: ContentType
- typePng :: ContentType
- typeGif :: ContentType
- typeSvg :: ContentType
- typeJavascript :: ContentType
- typeCss :: ContentType
- typeFlv :: ContentType
- typeOgv :: ContentType
- typeOctet :: ContentType
- simpleContentType :: ContentType -> ContentType
- contentTypeTypes :: ContentType -> (ByteString, ByteString)
- getRequest :: MonadHandler m => m YesodRequest
- runRequestBody :: MonadHandler m => m RequestBodyContents
- getYesod :: MonadHandler m => m (HandlerSite m)
- getsYesod :: MonadHandler m => (HandlerSite m -> a) -> m a
- getUrlRender :: MonadHandler m => m (Route (HandlerSite m) -> Text)
- getPostParams :: MonadHandler m => m [(Text, Text)]
- getCurrentRoute :: MonadHandler m => m (Maybe (Route (HandlerSite m)))
- handlerToIO :: MonadIO m => HandlerFor site (HandlerFor site a -> m a)
- forkHandler :: (SomeException -> HandlerFor site ()) -> HandlerFor site () -> HandlerFor site ()
- redirect :: (MonadHandler m, RedirectUrl (HandlerSite m) url) => url -> m a
- redirectWith :: (MonadHandler m, RedirectUrl (HandlerSite m) url) => Status -> url -> m a
- setUltDest :: (MonadHandler m, RedirectUrl (HandlerSite m) url) => url -> m ()
- setUltDestCurrent :: MonadHandler m => m ()
- setUltDestReferer :: MonadHandler m => m ()
- redirectUltDest :: (RedirectUrl (HandlerSite m) url, MonadHandler m) => url -> m a
- clearUltDest :: MonadHandler m => m ()
- addMessage :: MonadHandler m => Text -> Html -> m ()
- addMessageI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => Text -> msg -> m ()
- getMessages :: MonadHandler m => m [(Text, Html)]
- setMessage :: MonadHandler m => Html -> m ()
- setMessageI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => msg -> m ()
- getMessage :: MonadHandler m => m (Maybe Html)
- sendFilePart :: MonadHandler m => ContentType -> FilePath -> Integer -> Integer -> m a
- sendResponseStatus :: (MonadHandler m, ToTypedContent c) => Status -> c -> m a
- sendStatusJSON :: (MonadHandler m, ToJSON c) => Status -> c -> m a
- sendResponseCreated :: MonadHandler m => Route (HandlerSite m) -> m a
- sendResponseNoContent :: MonadHandler m => m a
- sendWaiResponse :: MonadHandler m => Response -> m b
- sendWaiApplication :: MonadHandler m => Application -> m b
- sendRawResponseNoConduit :: (MonadHandler m, MonadUnliftIO m) => (IO ByteString -> (ByteString -> IO ()) -> m ()) -> m a
- sendRawResponse :: (MonadHandler m, MonadUnliftIO m) => (ConduitT () ByteString IO () -> ConduitT ByteString Void IO () -> m ()) -> m a
- notModified :: MonadHandler m => m a
- notFound :: MonadHandler m => m a
- badMethod :: MonadHandler m => m a
- notAuthenticated :: MonadHandler m => m a
- permissionDenied :: MonadHandler m => Text -> m a
- permissionDeniedI :: (RenderMessage (HandlerSite m) msg, MonadHandler m) => msg -> m a
- invalidArgs :: MonadHandler m => [Text] -> m a
- invalidArgsI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => [msg] -> m a
- setCookie :: MonadHandler m => SetCookie -> m ()
- getExpires :: MonadIO m => Int -> m UTCTime
- deleteCookie :: MonadHandler m => Text -> Text -> m ()
- setLanguage :: MonadHandler m => Text -> m ()
- addContentDispositionFileName :: MonadHandler m => Text -> m ()
- addHeader :: MonadHandler m => Text -> Text -> m ()
- replaceOrAddHeader :: MonadHandler m => Text -> Text -> m ()
- cacheSeconds :: MonadHandler m => Int -> m ()
- neverExpires :: MonadHandler m => m ()
- alreadyExpired :: MonadHandler m => m ()
- expiresAt :: MonadHandler m => UTCTime -> m ()
- setEtag :: MonadHandler m => Text -> m ()
- setWeakEtag :: MonadHandler m => Text -> m ()
- setSessionBS :: MonadHandler m => Text -> ByteString -> m ()
- deleteSession :: MonadHandler m => Text -> m ()
- clearSession :: MonadHandler m => m ()
- lookupSession :: MonadHandler m => Text -> m (Maybe Text)
- lookupSessionBS :: MonadHandler m => Text -> m (Maybe ByteString)
- newIdent :: MonadHandler m => m Text
- redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url) => url -> m a
- hamletToRepHtml :: MonadHandler m => HtmlUrl (Route (HandlerSite m)) -> m Html
- giveUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output
- withUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output
- waiRequest :: MonadHandler m => m Request
- getMessageRender :: (MonadHandler m, RenderMessage (HandlerSite m) message) => m (message -> Text)
- cached :: (MonadHandler m, Typeable a) => m a -> m a
- cacheGet :: (MonadHandler m, Typeable a) => m (Maybe a)
- cacheSet :: (MonadHandler m, Typeable a) => a -> m ()
- cachedBy :: (MonadHandler m, Typeable a) => ByteString -> m a -> m a
- cacheByGet :: (MonadHandler m, Typeable a) => ByteString -> m (Maybe a)
- cacheBySet :: (MonadHandler m, Typeable a) => ByteString -> a -> m ()
- languages :: MonadHandler m => m [Text]
- lookupHeader :: MonadHandler m => CI ByteString -> m (Maybe ByteString)
- lookupHeaders :: MonadHandler m => CI ByteString -> m [ByteString]
- lookupBasicAuth :: MonadHandler m => m (Maybe (Text, Text))
- lookupBearerAuth :: MonadHandler m => m (Maybe Text)
- lookupGetParams :: MonadHandler m => Text -> m [Text]
- lookupGetParam :: MonadHandler m => Text -> m (Maybe Text)
- lookupPostParams :: (MonadResource m, MonadHandler m) => Text -> m [Text]
- lookupPostParam :: (MonadResource m, MonadHandler m) => Text -> m (Maybe Text)
- lookupFile :: MonadHandler m => Text -> m (Maybe FileInfo)
- lookupFiles :: MonadHandler m => Text -> m [FileInfo]
- lookupCookie :: MonadHandler m => Text -> m (Maybe Text)
- lookupCookies :: MonadHandler m => Text -> m [Text]
- selectRep :: MonadHandler m => Writer (Endo [ProvidedRep m]) () -> m TypedContent
- provideRep :: (Monad m, HasContentType a) => m a -> Writer (Endo [ProvidedRep m]) ()
- provideRepType :: (Monad m, ToContent a) => ContentType -> m a -> Writer (Endo [ProvidedRep m]) ()
- rawRequestBody :: forall (m :: Type -> Type) i. MonadHandler m => ConduitT i ByteString m ()
- fileSource :: forall (m :: Type -> Type). MonadResource m => FileInfo -> ConduitT () ByteString m ()
- fileSourceByteString :: MonadResource m => FileInfo -> m ByteString
- respond :: (Monad m, ToContent a) => ContentType -> a -> m TypedContent
- respondSource :: ContentType -> ConduitT () (Flush Builder) (HandlerFor site) () -> HandlerFor site TypedContent
- sendChunk :: forall (m :: Type -> Type) a i. (Monad m, ToFlushBuilder a) => a -> ConduitT i (Flush Builder) m ()
- sendFlush :: forall (m :: Type -> Type) i. Monad m => ConduitT i (Flush Builder) m ()
- sendChunkBS :: forall (m :: Type -> Type) i. Monad m => ByteString -> ConduitT i (Flush Builder) m ()
- sendChunkLBS :: forall (m :: Type -> Type) i. Monad m => ByteString -> ConduitT i (Flush Builder) m ()
- sendChunkText :: forall (m :: Type -> Type) i. Monad m => Text -> ConduitT i (Flush Builder) m ()
- sendChunkLazyText :: forall (m :: Type -> Type) i. Monad m => Text -> ConduitT i (Flush Builder) m ()
- sendChunkHtml :: forall (m :: Type -> Type) i. Monad m => Html -> ConduitT i (Flush Builder) m ()
- defaultCsrfCookieName :: ByteString
- setCsrfCookie :: MonadHandler m => m ()
- setCsrfCookieWithCookie :: MonadHandler m => SetCookie -> m ()
- defaultCsrfHeaderName :: CI ByteString
- checkCsrfHeaderNamed :: MonadHandler m => CI ByteString -> m ()
- hasValidCsrfHeaderNamed :: MonadHandler m => CI ByteString -> m Bool
- defaultCsrfParamName :: Text
- checkCsrfParamNamed :: MonadHandler m => Text -> m ()
- hasValidCsrfParamNamed :: MonadHandler m => Text -> m Bool
- checkCsrfHeaderOrParam :: (MonadHandler m, MonadLogger m) => CI ByteString -> Text -> m ()
- getSubYesod :: MonadHandler m => m (SubHandlerSite m)
- getRouteToParent :: MonadHandler m => m (Route (SubHandlerSite m) -> Route (HandlerSite m))
- getSubCurrentRoute :: MonadHandler m => m (Maybe (Route (SubHandlerSite m)))
- setTitleI :: (MonadWidget m, RenderMessage (HandlerSite m) msg) => msg -> m ()
- setDescription :: MonadWidget m => Text -> m ()
- setDescriptionI :: (MonadWidget m, RenderMessage (HandlerSite m) msg) => msg -> m ()
- setDescriptionIdemp :: MonadWidget m => Text -> m ()
- setDescriptionIdempI :: (MonadWidget m, RenderMessage (HandlerSite m) msg) => msg -> m ()
- setOGType :: MonadWidget m => Text -> m ()
- setOGImage :: MonadWidget m => Text -> m ()
- addStylesheet :: MonadWidget m => Route (HandlerSite m) -> m ()
- addStylesheetAttrs :: MonadWidget m => Route (HandlerSite m) -> [(Text, Text)] -> m ()
- addStylesheetRemote :: MonadWidget m => Text -> m ()
- addStylesheetRemoteAttrs :: MonadWidget m => Text -> [(Text, Text)] -> m ()
- addStylesheetEither :: MonadWidget m => Either (Route (HandlerSite m)) Text -> m ()
- addScriptEither :: MonadWidget m => Either (Route (HandlerSite m)) Text -> m ()
- addScript :: MonadWidget m => Route (HandlerSite m) -> m ()
- addScriptAttrs :: MonadWidget m => Route (HandlerSite m) -> [(Text, Text)] -> m ()
- addScriptRemote :: MonadWidget m => Text -> m ()
- addScriptRemoteAttrs :: MonadWidget m => Text -> [(Text, Text)] -> m ()
- whamlet :: QuasiQuoter
- whamletFile :: FilePath -> Q Exp
- whamletFileWithSettings :: HamletSettings -> FilePath -> Q Exp
- asWidgetT :: forall site (m :: Type -> Type). WidgetT site m () -> WidgetT site m ()
- ihamletToRepHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message) => HtmlUrlI18n message (Route (HandlerSite m)) -> m Html
- ihamletToHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message) => HtmlUrlI18n message (Route (HandlerSite m)) -> m Html
- handlerToWidget :: HandlerFor site a -> WidgetFor site a
- defaultMakeLogger :: IO Logger
- defaultMessageLoggerSource :: (LogSource -> LogLevel -> IO Bool) -> Logger -> Loc -> LogSource -> LogLevel -> LogStr -> IO ()
- defaultShouldLogIO :: LogSource -> LogLevel -> IO Bool
- defaultYesodMiddleware :: Yesod site => HandlerFor site res -> HandlerFor site res
- sslOnlySessions :: IO (Maybe SessionBackend) -> IO (Maybe SessionBackend)
- laxSameSiteSessions :: IO (Maybe SessionBackend) -> IO (Maybe SessionBackend)
- strictSameSiteSessions :: IO (Maybe SessionBackend) -> IO (Maybe SessionBackend)
- sslOnlyMiddleware :: Int -> HandlerFor site res -> HandlerFor site res
- authorizationCheck :: Yesod site => HandlerFor site ()
- defaultCsrfCheckMiddleware :: Yesod site => HandlerFor site res -> HandlerFor site res
- csrfCheckMiddleware :: HandlerFor site res -> HandlerFor site Bool -> CI ByteString -> Text -> HandlerFor site res
- defaultCsrfSetCookieMiddleware :: HandlerFor site res -> HandlerFor site res
- csrfSetCookieMiddleware :: HandlerFor site res -> SetCookie -> HandlerFor site res
- defaultCsrfMiddleware :: Yesod site => HandlerFor site res -> HandlerFor site res
- widgetToPageContent :: Yesod site => WidgetFor site () -> HandlerFor site (PageContent (Route site))
- defaultErrorHandler :: Yesod site => ErrorResponse -> HandlerFor site TypedContent
- formatLogMessage :: IO ZonedDate -> Loc -> LogSource -> LogLevel -> LogStr -> IO LogStr
- customizeSessionCookies :: (SetCookie -> SetCookie) -> SessionBackend -> SessionBackend
- defaultClientSessionBackend :: Int -> FilePath -> IO SessionBackend
- envClientSessionBackend :: Int -> String -> IO SessionBackend
- clientSessionBackend :: Key -> IO ClientSessionDateCache -> SessionBackend
- loadClientSession :: Key -> IO ClientSessionDateCache -> ByteString -> Request -> IO (SessionMap, SaveSession)
- guessApprootOr :: Approot site -> Approot site
- getApprootText :: Approot site -> site -> Request -> Text
- defaultLayoutJson :: (Yesod site, ToJSON a) => WidgetFor site () -> HandlerFor site a -> HandlerFor site TypedContent
- jsonToRepJson :: (Monad m, ToJSON a) => a -> m Value
- returnJson :: (Monad m, ToJSON a) => a -> m Value
- returnJsonEncoding :: (Monad m, ToJSON a) => a -> m Encoding
- provideJson :: forall (m :: Type -> Type) a. (Monad m, ToJSON a) => a -> Writer (Endo [ProvidedRep m]) ()
- parseJsonBody :: (MonadHandler m, FromJSON a) => m (Result a)
- parseInsecureJsonBody :: (MonadHandler m, FromJSON a) => m (Result a)
- parseCheckJsonBody :: (MonadHandler m, FromJSON a) => m (Result a)
- parseJsonBody_ :: (MonadHandler m, FromJSON a) => m a
- requireJsonBody :: (MonadHandler m, FromJSON a) => m a
- requireInsecureJsonBody :: (MonadHandler m, FromJSON a) => m a
- requireCheckJsonBody :: (MonadHandler m, FromJSON a) => m a
- jsonOrRedirect :: (MonadHandler m, ToJSON a) => Route (HandlerSite m) -> a -> m Value
- jsonEncodingOrRedirect :: (MonadHandler m, ToJSON a) => Route (HandlerSite m) -> a -> m Encoding
- acceptsJson :: MonadHandler m => m Bool
- contentTypeHeaderIsJson :: ByteString -> Bool
- runFakeHandler :: (Yesod site, MonadIO m) => SessionMap -> (site -> Logger) -> site -> HandlerT site IO a -> m (Either ErrorResponse a)
- yesodRunner :: (ToTypedContent res, Yesod site) => HandlerFor site res -> YesodRunnerEnv site -> Maybe (Route site) -> Application
- yesodRender :: Yesod y => y -> ResolvedApproot -> Route y -> [(Text, Text)] -> Text
- liteApp :: Writer LiteApp () -> LiteApp
- dispatchTo :: ToTypedContent a => LiteHandler a -> Writer LiteApp ()
- onMethod :: Method -> Writer LiteApp () -> Writer LiteApp ()
- onStatic :: Text -> Writer LiteApp () -> Writer LiteApp ()
- withDynamic :: PathPiece p => (p -> Writer LiteApp ()) -> Writer LiteApp ()
- withDynamicMulti :: PathMultiPiece ps => (ps -> Writer LiteApp ()) -> Writer LiteApp ()
- breadcrumbs :: (YesodBreadcrumbs site, Show (Route site), Eq (Route site)) => HandlerFor site (Text, [(Route site, Text)])
- defaultOpts :: RouteOpts
- setEqDerived :: Bool -> RouteOpts -> RouteOpts
- setShowDerived :: Bool -> RouteOpts -> RouteOpts
- setReadDerived :: Bool -> RouteOpts -> RouteOpts
- parseRoutes :: QuasiQuoter
- parseRoutesFile :: FilePath -> Q Exp
- parseRoutesFileNoCheck :: FilePath -> Q Exp
- parseRoutesNoCheck :: QuasiQuoter
- mkYesod :: String -> [ResourceTree String] -> Q [Dec]
- mkYesodOpts :: RouteOpts -> String -> [ResourceTree String] -> Q [Dec]
- mkYesodWith :: [[String]] -> String -> [String] -> [ResourceTree String] -> Q [Dec]
- mkYesodData :: String -> [ResourceTree String] -> Q [Dec]
- mkYesodDataOpts :: RouteOpts -> String -> [ResourceTree String] -> Q [Dec]
- mkYesodSubData :: String -> [ResourceTree String] -> Q [Dec]
- mkYesodSubDataOpts :: RouteOpts -> String -> [ResourceTree String] -> Q [Dec]
- mkYesodDispatch :: String -> [ResourceTree String] -> Q [Dec]
- mkYesodDispatchOpts :: RouteOpts -> String -> [ResourceTree String] -> Q [Dec]
- mkYesodSubDispatch :: [ResourceTree a] -> Q Exp
- toWaiAppPlain :: YesodDispatch site => site -> IO Application
- defaultGen :: IO Int
- toWaiAppYre :: YesodDispatch site => YesodRunnerEnv site -> Application
- toWaiApp :: YesodDispatch site => site -> IO Application
- mkDefaultMiddlewares :: Logger -> IO Middleware
- defaultMiddlewaresNoLogging :: Middleware
- warpDebug :: YesodDispatch site => Int -> site -> IO ()
- warpEnv :: YesodDispatch site => site -> IO ()
- getGetMaxExpires :: IO (IO Text)
- unauthorizedI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => msg -> m AuthResult
- yesodVersion :: String
- maybeAuthorized :: Yesod site => Route site -> Bool -> HandlerT site IO (Maybe (Route site))
- showIntegral :: Integral a => a -> String
- ireq :: forall (m :: Type -> Type) a. (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m a -> Text -> FormInput m a
- iopt :: forall (m :: Type -> Type) a. Monad m => Field m a -> Text -> FormInput m (Maybe a)
- runInputGet :: MonadHandler m => FormInput m a -> m a
- runInputGetResult :: MonadHandler m => FormInput m a -> m (FormResult a)
- runInputPost :: MonadHandler m => FormInput m a -> m a
- runInputPostResult :: MonadHandler m => FormInput m a -> m (FormResult a)
- newFormIdent :: forall (m :: Type -> Type). Monad m => MForm m Text
- formToAForm :: forall (m :: Type -> Type) site a. (HandlerSite m ~ site, Monad m) => MForm m (FormResult a, [FieldView site]) -> AForm m a
- aFormToForm :: forall (m :: Type -> Type) site a. (Monad m, HandlerSite m ~ site) => AForm m a -> MForm m (FormResult a, [FieldView site] -> [FieldView site])
- askParams :: forall (m :: Type -> Type). Monad m => MForm m (Maybe Env)
- askFiles :: forall (m :: Type -> Type). Monad m => MForm m (Maybe FileEnv)
- wreq :: forall site (m :: Type -> Type) a. (RenderMessage site FormMessage, HandlerSite m ~ site, MonadHandler m) => Field m a -> FieldSettings site -> Maybe a -> WForm m (FormResult a)
- wreqMsg :: forall site msg (m :: Type -> Type) a. (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) => Field m a -> FieldSettings site -> msg -> Maybe a -> WForm m (FormResult a)
- wopt :: forall (m :: Type -> Type) site a. (MonadHandler m, HandlerSite m ~ site) => Field m a -> FieldSettings site -> Maybe (Maybe a) -> WForm m (FormResult (Maybe a))
- wFormToAForm :: forall (m :: Type -> Type) a. MonadHandler m => WForm m (FormResult a) -> AForm m a
- wFormToMForm :: forall (m :: Type -> Type) site a. (MonadHandler m, HandlerSite m ~ site) => WForm m a -> MForm m (a, [FieldView site])
- mFormToWForm :: forall (m :: Type -> Type) site a. (MonadHandler m, HandlerSite m ~ site) => MForm m (a, FieldView site) -> WForm m a
- mreq :: forall site (m :: Type -> Type) a. (RenderMessage site FormMessage, HandlerSite m ~ site, MonadHandler m) => Field m a -> FieldSettings site -> Maybe a -> MForm m (FormResult a, FieldView site)
- mreqMsg :: forall site msg (m :: Type -> Type) a. (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) => Field m a -> FieldSettings site -> msg -> Maybe a -> MForm m (FormResult a, FieldView site)
- mopt :: forall site (m :: Type -> Type) a. (site ~ HandlerSite m, MonadHandler m) => Field m a -> FieldSettings site -> Maybe (Maybe a) -> MForm m (FormResult (Maybe a), FieldView site)
- areq :: forall site (m :: Type -> Type) a. (RenderMessage site FormMessage, HandlerSite m ~ site, MonadHandler m) => Field m a -> FieldSettings site -> Maybe a -> AForm m a
- areqMsg :: forall site msg (m :: Type -> Type) a. (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) => Field m a -> FieldSettings site -> msg -> Maybe a -> AForm m a
- aopt :: forall (m :: Type -> Type) a. MonadHandler m => Field m a -> FieldSettings (HandlerSite m) -> Maybe (Maybe a) -> AForm m (Maybe a)
- runFormPost :: (RenderMessage (HandlerSite m) FormMessage, MonadResource m, MonadHandler m) => (Markup -> MForm m (FormResult a, xml)) -> m ((FormResult a, xml), Enctype)
- generateFormPost :: (RenderMessage (HandlerSite m) FormMessage, MonadHandler m) => (Markup -> MForm m (FormResult a, xml)) -> m (xml, Enctype)
- runFormPostNoToken :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype)
- runFormGet :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype)
- generateFormGet' :: MonadHandler m => (Markup -> MForm m (FormResult a, xml)) -> m (xml, Enctype)
- generateFormGet :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype)
- identifyForm :: forall (m :: Type -> Type) a. Monad m => Text -> (Markup -> MForm m (FormResult a, WidgetFor (HandlerSite m) ())) -> Markup -> MForm m (FormResult a, WidgetFor (HandlerSite m) ())
- renderDivs :: forall (m :: Type -> Type) a. Monad m => FormRender m a
- renderDivsNoLabels :: forall (m :: Type -> Type) a. Monad m => FormRender m a
- renderBootstrap2 :: forall (m :: Type -> Type) a. Monad m => FormRender m a
- renderBootstrap :: forall (m :: Type -> Type) a. Monad m => FormRender m a
- checkBool :: forall (m :: Type -> Type) msg a. (Monad m, RenderMessage (HandlerSite m) msg) => (a -> Bool) -> msg -> Field m a -> Field m a
- checkM :: (Monad m, RenderMessage (HandlerSite m) msg) => (a -> m (Either msg a)) -> Field m a -> Field m a
- checkMMap :: (Monad m, RenderMessage (HandlerSite m) msg) => (a -> m (Either msg b)) -> (b -> a) -> Field m a -> Field m b
- customErrorMessage :: forall (m :: Type -> Type) a. Monad m => SomeMessage (HandlerSite m) -> Field m a -> Field m a
- fieldSettingsLabel :: RenderMessage site msg => msg -> FieldSettings site
- parseHelperGen :: (Monad m, RenderMessage site msg) => (Text -> Either msg a) -> [Text] -> [FileInfo] -> m (Either (SomeMessage site) (Maybe a))
- convertField :: forall (m :: Type -> Type) a b. Functor m => (a -> b) -> (b -> a) -> Field m a -> Field m b
- removeClass :: Text -> [(Text, Text)] -> [(Text, Text)]
- addClass :: Text -> [(Text, Text)] -> [(Text, Text)]
- defaultFormMessage :: FormMessage -> Text
- intField :: forall (m :: Type -> Type) i. (Monad m, Integral i, RenderMessage (HandlerSite m) FormMessage) => Field m i
- doubleField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Double
- dayField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Day
- timeField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m TimeOfDay
- timeFieldTypeTime :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m TimeOfDay
- timeFieldTypeText :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m TimeOfDay
- htmlField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Html
- textareaField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Textarea
- hiddenField :: forall (m :: Type -> Type) p. (Monad m, PathPiece p, RenderMessage (HandlerSite m) FormMessage) => Field m p
- textField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text
- passwordField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text
- parseDate :: String -> Either FormMessage Day
- emailField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text
- multiEmailField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m [Text]
- searchField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => AutoFocus -> Field m Text
- urlField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text
- selectFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) a
- selectFieldListGrouped :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, [(msg, a)])] -> Field (HandlerFor site) a
- selectField :: (Eq a, RenderMessage site FormMessage) => HandlerFor site (OptionList a) -> Field (HandlerFor site) a
- multiSelectFieldList :: (Eq a, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) [a]
- multiSelectField :: Eq a => HandlerFor site (OptionList a) -> Field (HandlerFor site) [a]
- radioFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) a
- checkboxesFieldList :: (Eq a, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) [a]
- checkboxesField :: Eq a => HandlerFor site (OptionList a) -> Field (HandlerFor site) [a]
- radioField :: (Eq a, RenderMessage site FormMessage) => HandlerFor site (OptionList a) -> Field (HandlerFor site) a
- withRadioField :: (Eq a, RenderMessage site FormMessage) => (Text -> WidgetFor site () -> WidgetFor site ()) -> (Text -> Text -> Bool -> Text -> WidgetFor site () -> WidgetFor site ()) -> HandlerFor site (OptionList a) -> Field (HandlerFor site) a
- boolField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Bool
- checkBoxField :: forall (m :: Type -> Type). Monad m => Field m Bool
- mkOptionList :: [Option a] -> OptionList a
- mkOptionListGrouped :: [(Text, [Option a])] -> OptionList a
- optionsPairs :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => [(msg, a)] -> m (OptionList a)
- optionsPairsGrouped :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => [(msg, [(msg, a)])] -> m (OptionList a)
- optionsEnum :: (MonadHandler m, Show a, Enum a, Bounded a) => m (OptionList a)
- optionsPersist :: (YesodPersist site, PersistQueryRead backend, PathPiece (Key a), RenderMessage site msg, YesodPersistBackend site ~ backend, PersistRecordBackend a backend) => [Filter a] -> [SelectOpt a] -> (a -> msg) -> HandlerFor site (OptionList (Entity a))
- optionsPersistKey :: (YesodPersist site, PersistQueryRead backend, PathPiece (Key a), RenderMessage site msg, backend ~ YesodPersistBackend site, PersistRecordBackend a backend) => [Filter a] -> [SelectOpt a] -> (a -> msg) -> HandlerFor site (OptionList (Key a))
- selectFieldHelper :: (Eq a, RenderMessage site FormMessage) => (Text -> Text -> [(Text, Text)] -> WidgetFor site () -> WidgetFor site ()) -> (Text -> Text -> Bool -> WidgetFor site ()) -> (Text -> Text -> [(Text, Text)] -> Text -> Bool -> Text -> WidgetFor site ()) -> Maybe (Text -> WidgetFor site ()) -> HandlerFor site (OptionList a) -> Field (HandlerFor site) a
- fileField :: forall (m :: Type -> Type). Monad m => Field m FileInfo
- fileAFormReq :: forall (m :: Type -> Type). (MonadHandler m, RenderMessage (HandlerSite m) FormMessage) => FieldSettings (HandlerSite m) -> AForm m FileInfo
- fileAFormOpt :: forall (m :: Type -> Type). MonadHandler m => FieldSettings (HandlerSite m) -> AForm m (Maybe FileInfo)
- colorField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text
- datetimeLocalField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m LocalTime
- defaultRunDB :: PersistConfig c => (site -> c) -> (site -> PersistConfigPool c) -> PersistConfigBackend c (HandlerFor site) a -> HandlerFor site a
- defaultGetDBRunner :: (IsSqlBackend backend, YesodPersistBackend site ~ backend) => (site -> Pool backend) -> HandlerFor site (DBRunner site, HandlerFor site ())
- runDBSource :: YesodPersistRunner site => ConduitT () a (YesodDB site) () -> ConduitT () a (HandlerFor site) ()
- respondSourceDB :: YesodPersistRunner site => ContentType -> ConduitT () (Flush Builder) (YesodDB site) () -> HandlerFor site TypedContent
- get404 :: forall (m :: Type -> Type) backend val. (MonadIO m, PersistStoreRead backend, PersistRecordBackend val backend) => Key val -> ReaderT backend m val
- getBy404 :: forall backend val (m :: Type -> Type). (PersistUniqueRead backend, PersistRecordBackend val backend, MonadIO m) => Unique val -> ReaderT backend m (Entity val)
- insert400 :: forall (m :: Type -> Type) backend val. (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend val backend, SafeToInsert val) => val -> ReaderT backend m (Key val)
- insert400_ :: forall (m :: Type -> Type) backend val. (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend val backend, SafeToInsert val) => val -> ReaderT backend m ()
- parseExtra :: DefaultEnv -> Object -> Parser Extra
- defhost :: String
- defport :: Int
- defbaseurl :: String -> Int -> String
- staticDir :: FilePath
- widgetFile :: String -> Q Exp
- development :: Bool
- staticSite :: IO Static
- manualurl :: Text
- production :: Bool
- hledgerorgurl :: Text
- staticRoot :: AppConfig DefaultEnv Extra -> Text
- widgetFileSettings :: WidgetFileSettings
- hledger_css :: StaticRoute
- hledger_js :: StaticRoute
- css_bootstrap_datepicker_standalone_min_css :: StaticRoute
- css_bootstrap_theme_css :: StaticRoute
- css_bootstrap_theme_css_map :: StaticRoute
- css_bootstrap_theme_min_css :: StaticRoute
- css_bootstrap_css :: StaticRoute
- css_bootstrap_css_map :: StaticRoute
- css_bootstrap_min_css :: StaticRoute
- fonts_glyphicons_halflings_regular_eot :: StaticRoute
- fonts_glyphicons_halflings_regular_svg :: StaticRoute
- fonts_glyphicons_halflings_regular_ttf :: StaticRoute
- fonts_glyphicons_halflings_regular_woff :: StaticRoute
- js_bootstrap_datepicker_min_js :: StaticRoute
- js_bootstrap_js :: StaticRoute
- js_bootstrap_min_js :: StaticRoute
- js_excanvas_js :: StaticRoute
- js_excanvas_min_js :: StaticRoute
- js_jquery_cookie_js :: StaticRoute
- js_jquery_flot_canvas_js :: StaticRoute
- js_jquery_flot_canvas_min_js :: StaticRoute
- js_jquery_flot_categories_js :: StaticRoute
- js_jquery_flot_categories_min_js :: StaticRoute
- js_jquery_flot_crosshair_js :: StaticRoute
- js_jquery_flot_crosshair_min_js :: StaticRoute
- js_jquery_flot_errorbars_js :: StaticRoute
- js_jquery_flot_errorbars_min_js :: StaticRoute
- js_jquery_flot_fillbetween_js :: StaticRoute
- js_jquery_flot_fillbetween_min_js :: StaticRoute
- js_jquery_flot_image_js :: StaticRoute
- js_jquery_flot_image_min_js :: StaticRoute
- js_jquery_flot_js :: StaticRoute
- js_jquery_flot_min_js :: StaticRoute
- js_jquery_flot_navigate_js :: StaticRoute
- js_jquery_flot_navigate_min_js :: StaticRoute
- js_jquery_flot_pie_js :: StaticRoute
- js_jquery_flot_pie_min_js :: StaticRoute
- js_jquery_flot_resize_js :: StaticRoute
- js_jquery_flot_resize_min_js :: StaticRoute
- js_jquery_flot_selection_js :: StaticRoute
- js_jquery_flot_selection_min_js :: StaticRoute
- js_jquery_flot_stack_js :: StaticRoute
- js_jquery_flot_stack_min_js :: StaticRoute
- js_jquery_flot_symbol_js :: StaticRoute
- js_jquery_flot_symbol_min_js :: StaticRoute
- js_jquery_flot_threshold_js :: StaticRoute
- js_jquery_flot_threshold_min_js :: StaticRoute
- js_jquery_flot_time_js :: StaticRoute
- js_jquery_flot_time_min_js :: StaticRoute
- js_jquery_flot_tooltip_js :: StaticRoute
- js_jquery_flot_tooltip_min_js :: StaticRoute
- js_jquery_hotkeys_js :: StaticRoute
- js_jquery_js :: StaticRoute
- js_jquery_min_js :: StaticRoute
- js_jquery_url_js :: StaticRoute
- js_typeahead_bundle_js :: StaticRoute
- js_typeahead_bundle_min_js :: StaticRoute
- checkServerSideUiEnabled :: Handler ()
- getViewData :: Handler ViewData
- shouldShowSidebar :: Handler Bool
- getCurrentJournal :: IORef Journal -> CliOpts -> Day -> Handler (Journal, Maybe String)
- require :: Permission -> Handler ()
- resourcesApp :: [ResourceTree String]
Documentation
Extra | |
|
class RenderRoute site => Yesod site where #
Define settings for a Yesod applications. All methods have intelligent defaults, and therefore no implementation is required.
Nothing
An absolute URL to the root of the application. Do not include trailing slash.
Default value: guessApproot
. If you know your application root
statically, it will be more efficient and more reliable to instead use
ApprootStatic
or ApprootMaster
. If you do not need full absolute
URLs, you can use ApprootRelative
instead.
Note: Prior to yesod-core 1.5, the default value was ApprootRelative
.
catchHandlerExceptions :: MonadUnliftIO m => site -> m a -> (SomeException -> m a) -> m a #
allows the user to specify how exceptions are cought.
by default all async exceptions are thrown and synchronous
exceptions render a 500 page.
To catch all exceptions (even async) to render a 500 page,
set this to catchSyncOrAsync
. Beware
this may have negative effects with functions like timeout
.
Since: yesod-core-1.6.24.0
errorHandler :: ErrorResponse -> HandlerFor site TypedContent #
Output error response pages.
Default value: defaultErrorHandler
.
defaultLayout :: WidgetFor site () -> HandlerFor site Html #
Applies some form of layout to the contents of a page.
Override the rendering function for a particular URL and query string parameters. One use case for this is to offload static hosting to a different domain name to avoid sending cookies.
For backward compatibility default implementation is in terms of
urlRenderOverride
, probably ineffective
Since 1.4.23
:: Route site | |
-> Bool | is this a write request? |
-> HandlerFor site AuthResult |
Determine if a request is authorized or not.
Return Authorized
if the request is authorized,
Unauthorized
a message if unauthorized.
If authentication is required, return AuthenticationRequired
.
isWriteRequest :: Route site -> HandlerFor site Bool #
Determines whether the current request is a write request. By default, this assumes you are following RESTful principles, and determines this from request method. In particular, all except the following request methods are considered write: GET HEAD OPTIONS TRACE.
This function is used to determine if a request is authorized; see
isAuthorized
.
authRoute :: site -> Maybe (Route site) #
The default route for authentication.
Used in particular by isAuthorized
, but library users can do whatever
they want with it.
cleanPath :: site -> [Text] -> Either [Text] [Text] #
A function used to clean up path segments. It returns Right
with a
clean path or Left
with a new set of pieces the user should be
redirected to. The default implementation enforces:
- No double slashes
- There is no trailing slash.
Note that versions of Yesod prior to 0.7 used a different set of rules involing trailing slashes.
Builds an absolute URL by concatenating the application root with the
pieces of a path and a query string, if any.
Note that the pieces of the path have been previously cleaned up by cleanPath
.
:: Text | filename extension |
-> Text | mime-type |
-> ByteString | content |
-> HandlerFor site (Maybe (Either Text (Route site, [(Text, Text)]))) |
This function is used to store some static content to be served as an external file. The most common case of this is stashing CSS and JavaScript content in an external file; the Yesod.Widget module uses this feature.
The return value is Nothing
if no storing was performed; this is the
default implementation. A Just
Left
gives the absolute URL of the
file, whereas a Just
Right
gives the type-safe URL. The former is
necessary when you are serving the content outside the context of a
Yesod application, such as via memcached.
maximumContentLength :: site -> Maybe (Route site) -> Maybe Word64 #
Maximum allowed length of the request body, in bytes.
This method may be ignored if maximumContentLengthIO
is overridden.
If Nothing
, no maximum is applied.
Default: 2 megabytes.
maximumContentLengthIO :: site -> Maybe (Route site) -> IO (Maybe Word64) #
Maximum allowed length of the request body, in bytes. This is similar
to maximumContentLength
, but the result lives in IO
. This allows
you to dynamically change the maximum file size based on some external
source like a database or an IORef
.
The default implementation uses maximumContentLength
. Future version of yesod will
remove maximumContentLength
and use this method exclusively.
Since: yesod-core-1.6.13
makeLogger :: site -> IO Logger #
Creates a Logger
to use for log messages.
Note that a common technique (endorsed by the scaffolding) is to create
a Logger
value and place it in your foundation datatype, and have this
method return that already created value. That way, you can use that
same Logger
for printing messages during app initialization.
Default: the defaultMakeLogger
function.
Send a message to the Logger
provided by getLogger
.
Default: the defaultMessageLoggerSource
function, using
shouldLogIO
to check whether we should log.
jsLoader :: site -> ScriptLoadPosition site #
Where to Load sripts from. We recommend the default value,
BottomOfBody
.
jsAttributes :: site -> [(Text, Text)] #
Default attributes to put on the JavaScript script tag generated for julius files
jsAttributesHandler :: HandlerFor site [(Text, Text)] #
Same as jsAttributes
but allows you to run arbitrary Handler code
This is useful if you need to add a randomised nonce value to the script
tag generated by widgetFile
. If this function is overridden then
jsAttributes
is ignored.
Since: yesod-core-1.6.16
makeSessionBackend :: site -> IO (Maybe SessionBackend) #
Create a session backend. Returning Nothing
disables
sessions. If you'd like to change the way that the session
cookies are created, take a look at
customizeSessionCookies
.
Default: Uses clientsession with a 2 hour timeout.
fileUpload :: site -> RequestBodyLength -> FileUpload #
How to store uploaded files.
Default: When the request body is greater than 50kb, store in a temp file. For chunked request bodies, store in a temp file. Otherwise, store in memory.
shouldLogIO :: site -> LogSource -> LogLevel -> IO Bool #
Should we log the given log source/level combination.
Default: the defaultShouldLogIO
function.
Since 1.2.4
yesodMiddleware :: ToTypedContent res => HandlerFor site res -> HandlerFor site res #
A Yesod middleware, which will wrap every handler function. This allows you to run code before and after a normal handler.
Default: the defaultYesodMiddleware
function.
Since: 1.1.6
yesodWithInternalState :: site -> Maybe (Route site) -> (InternalState -> IO a) -> IO a #
How to allocate an InternalState
for each request.
The default implementation is almost always what you want. However, if
you know that you are never taking advantage of the MonadResource
instance in your handler functions, setting this to a dummy
implementation can provide a small optimization. Only do this if you
really know what you're doing, otherwise you can turn safe code into a
runtime error!
Since 1.4.2
defaultMessageWidget :: Html -> HtmlUrl (Route site) -> WidgetFor site () #
Convert a title and HTML snippet into a Widget
. Used
primarily for wrapping up error messages for better display.
Since: yesod-core-1.4.30
Instances
Instances
The character type Char
is an enumeration whose values represent
Unicode (or equivalently ISO/IEC 10646) code points (i.e. characters, see
http://www.unicode.org/ for details). This set extends the ISO 8859-1
(Latin-1) character set (the first 256 characters), which is itself an extension
of the ASCII character set (the first 128 characters). A character literal in
Haskell has type Char
.
To convert a Char
to or from the corresponding Int
value defined
by Unicode, use toEnum
and fromEnum
from the
Enum
class respectively (or equivalently ord
and
chr
).
Instances
Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.
Instances
Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.
Instances
A fixed-precision integer type with at least the range [-2^29 .. 2^29-1]
.
The exact range for a given implementation can be determined by using
minBound
and maxBound
from the Bounded
class.