úÎDÒ@á"      !None!' provides the primary interface to get  sessionData, put  sessionData or expire  sessionData. mThis is a class so you can use newtype deriving to make the functions available in your custom server monad. Y provides an environment in which we can access and update the client-side session state 0The inner monad needs to provide an instance of " so that 1 the cookie value can be read and set. According   must appear outside  ServerPartT not inside it.   is like #, except it records if $ was ever called ?Wrapper around the sessionData which tracks it state so we can  avoid decoding or encoding/%sending the cookie when not required 4Configuration for the session cookie for passing to  or !. .Name of the cookie to hold your session data. Lifetime of that cookie. $Encryption key, usually from one of ,  and . cookie domain  cookie path +Only use a session over secure transports. VOnly use session over HTTP (to prevent it from being stolen via cross-site scripting) 8Your session type must have an instance for this class. >An empty session, i.e. what you get when there is no existing  session stored.  Create a & using defaults for everything except  ;. You can use record update syntax to override individual  fields.   main = do key <- getDefaultKey N let sessConf = (mkSessionConf key) { sessionCookieLife = oneWeek } F simpleHTTP nullConf $ withClientSessionT sessConf handlers  where * oneWeek = MaxAge $ 60 * 60 * 24 * 7  handlers = msum [...]  is currently defined as:  % mkSessionConf :: Key -> SessionConf ! mkSessionConf key = SessionConf 4 { sessionCookieName = "Happstack.ClientSession" " , sessionCookieLife = Session  , sessionKey = key  , sessionDomain = ""  , sessionPath = "/"  , sessionSecure = False  , sessionHttpOnly = True  }  see also: ,  %run  $ and get the result, plus the final SessionStatus sessionData 'Transform the inner monad. (similar to &) The  forall s.5 is to prevent you from modifying the session state. 2In theory we want this function to have the type:  P mapSessionStateT :: (m a -> n b) -> SessionStateT s m a -> SessionStateT s n b :But that can not be done, so this is the next best thing. ' similar to &7. This version allows modification of the session data run the ) monad and get the result plus the final SessionStatus sessionData This function does not( automatically update the cookie if the E session has been modified. It is up to you to do that. You probably  want to use ! instead.  see also: !,  =transform the inner monad, but leave the session data alone. (transform the inner monad ) Fetch the  * Fetch the  and apply a function to it +7Fetch the current value of the state within the monad. ,$ s$ sets the state within the monad to s. - create a new session by calling  ."decode the encypted cookie string /Kget the session cookie and decrypt it. If no cookie is found, return a new . 0get the  sessionData 1 Put a new value in the session. 20Expire the session, i.e. the cookie holding it. lift a computation from the   monad CThe primary purpose of this function is to make it possible to use  the 3 functions such as 4 and set to get and set  the current session data. "That makes it possible to use the 3 based functions provided by , e.g.: ( do c <- liftSessionStateT $ count += 1 !3Wrapper around your handlers that use the session. CThis function automatically takes care of expiring or updating the  cookie if the  or  modifySession is called. CIf no changes are made to the session, then the cookie will not be ' resent (because there is no need to). Cget the current  sessionData set the  sessionData (expire the session (deletes the cookie)  56 %'()*+,-./012 !789:;<=>?@ABCDEFGHIJKL"  !"   !  / 56  %'()*+,-./012 !789:;<=>?@ABCDEFGHIJKLM      !"#$%&'()*+,-./)*0123456789:;<,-=,->?@ABCDEFGHIJKLMNOPQRSTUVhappstack-clientsession-7.2.3Happstack.Server.ClientSessionDataLensclientsession-0.8.0.1Web.ClientSession randomKeygetKey getDefaultKeyKeyMonadClientSession getSession putSession expireSessionClientSessionTunClientSessionT SessionStateT SessionStatusExpiredModifiedNoChangeUnread SessionConfsessionCookieNamesessionCookieLife sessionKey sessionDomain sessionPath sessionSecuresessionHttpOnly ClientSession emptySession mkSessionConfmapSessionStateTrunClientSessionTmapClientSessionTliftSessionStateTwithClientSessionThappstack-server-7.1.1Happstack.Server.Monads Happstacktransformers-0.3.0.0Control.Monad.Trans.State.LazyStateT mtl-2.1.2Control.Monad.State.ClassputrunSessionStateT mapStateTmapSessionStateT_mapClientSessionT_askSessionConfasksSessionConfgetSessionStatusputSessionStatus newSessiondecodegetValue getSessionCST putSessionCSTexpireSessionCST MonadStategetunSessionStateT#$fMonadClientSessionsessionDataRWST&$fMonadClientSessionsessionDataWriterT%$fMonadClientSessionsessionDataStateT&$fMonadClientSessionsessionDataReaderT%$fMonadClientSessionsessionDataErrorT$$fMonadClientSessionsessionDataContT-$fMonadClientSessionsessionDataClientSessionT$fMonadRWSrwsClientSessionT$fMonadStatesClientSessionT$fMonadWriterwClientSessionT$fMonadReaderrClientSessionT!$fMonadBaseControlbClientSessionT!$fMonadTransControlClientSessionT$fMonadTransClientSessionT$fMonoidClientSessionT$fHappstackClientSessionT $fMonadBaseControlbSessionStateT $fMonadTransControlSessionStateT$$fMonadStatesessionDataSessionStateT$fMonoidSessionStateT$fHappstackSessionStateT $fSafeCopyKey