Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- data Cookie = Cookie {}
- newtype Cookies = Cookies (Map Param Cookie)
- insert :: Cookie -> Cookies -> Cookies
- delete :: Param -> Cookies -> Cookies
- lookup :: Param -> Cookies -> Maybe ParamValue
- deletedCookie :: Session a => Cookie
- sessionCookie :: (Session a, ToParam a) => a -> Cookie
- fromList :: [Cookie] -> Cookies
- toList :: Cookies -> [Cookie]
- class Session a where
- sessionKey :: Param
- cookiePath :: Maybe [Segment]
- class GDatatypeName (f :: k -> Type) where
- gDatatypeName :: forall (p :: k). f p -> Text
Documentation
deletedCookie :: Session a => Cookie Source #
class Session a where Source #
Configure a data type to persist in the session
data Preferences = Preferences { color :: AppColor } deriving (Generic, Show, Read,ToParam
,FromParam
,Session
) instanceDefaultParam
Preferences where defaultParam = Preferences White
Nothing
sessionKey :: Param Source #
Unique key for the Session. Defaults to the datatypeName
default sessionKey :: (Generic a, GDatatypeName (Rep a)) => Param Source #
cookiePath :: Maybe [Segment] Source #
By default Sessions are persisted only to the current page. Set this to `Just []` to make an application-wide Session
default cookiePath :: Maybe [Segment] Source #
class GDatatypeName (f :: k -> Type) where Source #
generic datatype name
gDatatypeName :: forall (p :: k). f p -> Text Source #
Instances
Datatype d => GDatatypeName (M1 D d f :: k -> Type) Source # | |
Defined in Web.Hyperbole.Data.Session |