{-# OPTIONS -fglasgow-exts #-} import StateVersions.AppState2 import Happstack.State import System.Environment entryPoint :: Proxy State entryPoint = Proxy main :: IO () -- specify program name so the same _local directory gets read main = withProgName "migration-demo" $ do control <- startSystemState entryPoint update $ InsertPage "index2" (Page (Title "Home 2") (Body "hello, world 2") ) update $ InsertPage "index3" (Page (Title "Home 3") (Body "hello, world 3") ) update $ InsertPage "index4" (Page (Title "Home 4") (Body "hello, world 4") ) query AskPages >>= print createCheckpoint control shutdownSystem control