From 1d21b5785a4e993f112035788b0344b5ea5d15d7 Mon Sep 17 00:00:00 2001 From: Aaron Greenspan Date: Tue, 21 Jan 2020 18:30:54 -0700 Subject: [PATCH] I fixed the yesod shit --- src/Foundation.hs | 4 +--- src/Lib/Types/Semver.hs | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Foundation.hs b/src/Foundation.hs index 833d0e9..96726de 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -56,9 +56,7 @@ instance Yesod AgentCtx where -- Store session data on the client in encrypted cookies, -- default session idle timeout is 120 minutes makeSessionBackend :: AgentCtx -> IO (Maybe SessionBackend) - makeSessionBackend _ = Just <$> defaultClientSessionBackend - 120 -- timeout in minutes - "config/client_session_key.aes" + makeSessionBackend _ = pure Nothing -- Yesod Middleware allows you to run code before and after each handler function. -- The defaultYesodMiddleware adds the response header "Vary: Accept, Accept-Language" and performs authorization checks. diff --git a/src/Lib/Types/Semver.hs b/src/Lib/Types/Semver.hs index 35fa59b..d68d729 100644 --- a/src/Lib/Types/Semver.hs +++ b/src/Lib/Types/Semver.hs @@ -21,10 +21,6 @@ import Yesod.Core newtype AppVersion = AppVersion { unAppVersion :: (Word16, Word16, Word16, Word16) } deriving (Eq, Ord) -instance Hashable AppVersion where - hash (AppVersion (a, b, c, d)) = (2 ^ a) * (3 ^ b) * (5 ^ c) * (7 ^ d) - hashWithSalt _ = hash - instance Read AppVersion where readsPrec _ s = case traverse (readMaybe . toS) $ splitOn "+" <=< splitOn "." $ (toS s) of Just [major, minor, patch, build] -> [(AppVersion (major, minor, patch, build), "")]