úÎ)€(g     None3Instances of this class can be used as states by a  states J to manage cookie-based user sessions. Instances must minimally implement   and .. By default, the secret session key is taken  from the environment variable " SESSION_KEY", or a default dummy key is " used if the environment variable "ENV" is set to " development" . You can - override this behaviour by implementing the  method. < If the controller state contains a dedicated field of type ' Maybe Session', ' a reasonable implementation would be: G data MyAppSettings = MyAppSettings { myAppSess :: Maybe Session, ...}  ) instance HasSession MyAppSettings where / getSession = myAppSess <$> controllerState  setSession sess = do  cs <- controllerState ) putState $ cs { myAppSess = sess } DReturns the secret session key. The default implementation uses the  " SESSION_KEY"5 environment variable. If it is not present, and the  "ENV" environment variable is set to " development", a dummy, hardcoded  key is used. FReturns the cached session for the current request, or nothing if the 1 session has not been set yet for this request. IStores a parsed or changed session for the remainder of the request.This L is used both for cached a parsed session cookie as well as for serializing  to the " Set-Cookie" header when responding. ?Plaintext mapping of the session map. Both keys and values are  s. A middleware wrapper around a  that sets the " Set-Cookie" G header in the HTTP response if the Session is present, i.e. if it was  accessed/modified by the . Adds a " Set-Cookie"' with the given key-value tuple to the .  The path set on the cookie is "/"*, meaning it applies to all routes on the # domain, and no expiration is set. Returns the current , either from the  cache or by  parsing the cookie from the  using . Get and parse a  from the current . "Parses and validates a serialized  given the secret. If the  5 is invalid (i.e. the hmac does not match), an empty  is  returned.  Serializes a 1 by applying a sha256 hmac with the given secret  key to the serialized  (using ), base64 encoding 1 the result, and prepending it to the serialized . Lookup a key from the current  s session. 'Insert or replace a key in the current  s session. Remove a key from the current  s session. Clear the entire .  A trivial implementation if the  settings is just a Session  store.            simple-session-0.6.0Web.Simple.Session HasSession sessionKey getSession setSessionSession withSession addCookiesession parseSession dumpSession sessionLookup sessionInsert sessionDelete sessionClear simple-0.6.0Web.Simple.Controller Controllerbytestring-0.10.0.2Data.ByteString.Internal ByteString wai-1.4.1 Network.WaiResponseRequestsessionFromCookiehttp-types-0.8.2Network.HTTP.Types.URIrenderSimpleQuery$fHasSessionMaybe