We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83bba75 commit 367d7c4Copy full SHA for 367d7c4
acid-experiment/Main.hs
@@ -6,6 +6,7 @@ module Main (main) where
6
7
import Data.Acid
8
import Data.Acid.Remote
9
+import Data.Acid.Local (createCheckpointAndClose)
10
11
import Control.Applicative
12
import Control.Monad.Reader
@@ -73,7 +74,7 @@ instance Migrate KeyValue where
73
74
75
main :: IO ()
76
main = do args <- getArgs
- acid <- openLocalState (KeyValue Map.empty)
77
+ acid <- openLocalStateFrom "state/KeyValue" (KeyValue Map.empty)
78
case args of
79
[key]
80
-> do mbKey <- query acid (LookupKey (fromString key))
@@ -86,4 +87,4 @@ main = do args <- getArgs
86
87
_ -> do putStrLn "Usage:"
88
putStrLn " key Lookup the value of 'key'."
89
putStrLn " key value Set the value of 'key' to 'value'."
- closeAcidState acid
90
+ createCheckpointAndClose acid
0 commit comments