hyperbole-0.4.2: Interactive HTML apps using type-safe serverside Haskell
Safe HaskellNone
LanguageGHC2021

Web.Hyperbole.Data.Session

Synopsis

Documentation

data Cookie Source #

Constructors

Cookie 

Instances

Instances details
Show Cookie Source # 
Instance details

Defined in Web.Hyperbole.Data.Session

Eq Cookie Source # 
Instance details

Defined in Web.Hyperbole.Data.Session

Methods

(==) :: Cookie -> Cookie -> Bool #

(/=) :: Cookie -> Cookie -> Bool #

newtype Cookies Source #

Constructors

Cookies (Map Param Cookie) 

Instances

Instances details
Monoid Cookies Source # 
Instance details

Defined in Web.Hyperbole.Data.Session

Semigroup Cookies Source # 
Instance details

Defined in Web.Hyperbole.Data.Session

Show Cookies Source # 
Instance details

Defined in Web.Hyperbole.Data.Session

Eq Cookies Source # 
Instance details

Defined in Web.Hyperbole.Data.Session

Methods

(==) :: Cookies -> Cookies -> Bool #

(/=) :: Cookies -> Cookies -> Bool #

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)

instance DefaultParam Preferences where
  defaultParam = Preferences White

Minimal complete definition

Nothing

Methods

sessionKey :: Param Source #

Unique key for the Session. Defaults to the datatypeName

cookiePath :: Maybe [Segment] Source #

By default Sessions are persisted only to the current page. Set this to `Just []` to make an application-wide Session

class GDatatypeName (f :: k -> Type) where Source #

generic datatype name

Methods

gDatatypeName :: forall (p :: k). f p -> Text Source #

Instances

Instances details
Datatype d => GDatatypeName (M1 D d f :: k -> Type) Source # 
Instance details

Defined in Web.Hyperbole.Data.Session

Methods

gDatatypeName :: forall (p :: k). M1 D d f p -> Text Source #