summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-08-03 15:37:15 +0200
committertv <tv@krebsco.de>2021-08-03 15:37:15 +0200
commit288051f52e65857a7946e65c5a454b8b35af981b (patch)
treeb88ca4b6571413ddc6a2c307fb3748e99293177f
parent15e2dbff3d7c0420a483564396306fdd7f81896e (diff)
migrate to GHC 8.10
-rw-r--r--Regfish.hs1
-rw-r--r--Regfish/AcidState.hs4
-rw-r--r--Regfish/Default.hs2
3 files changed, 3 insertions, 4 deletions
diff --git a/Regfish.hs b/Regfish.hs
index 7a1a5f0..f56f59b 100644
--- a/Regfish.hs
+++ b/Regfish.hs
@@ -20,7 +20,6 @@ module Regfish
import Control.Lens
import Control.Monad.IO.Class
import Data.Default
-import Data.Monoid
import qualified Data.Acid as A
import qualified Data.ByteString.Char8 as BS8
import qualified Data.ByteString.Lazy.Char8 as LBS8
diff --git a/Regfish/AcidState.hs b/Regfish/AcidState.hs
index 6137f0b..d79603d 100644
--- a/Regfish/AcidState.hs
+++ b/Regfish/AcidState.hs
@@ -10,13 +10,13 @@ import Control.Exception (bracket)
import Control.Lens
import Control.Monad.Reader
import Data.Acid
-import Data.Typeable
+import Data.SafeCopy (SafeCopy)
import Regfish.Types
import Network.HTTP.Client (CookieJar)
-- TODO Regfish.Types.CookieJar ?
-withLocalState :: (IsAcidic q, Typeable q) =>
+withLocalState :: (IsAcidic q, SafeCopy q) =>
q -> (AcidState q -> IO a) -> IO a
withLocalState initialState a =
bracket (liftIO $ openLocalState initialState)
diff --git a/Regfish/Default.hs b/Regfish/Default.hs
index 029c074..a23cc7d 100644
--- a/Regfish/Default.hs
+++ b/Regfish/Default.hs
@@ -25,7 +25,7 @@ instance Default RFConfig where
instance Default RFState where
- def = RFState def
+ def = RFState mempty