darcsden :: dbp -> housetab-export -> blob

A program to dump the output of the old HouseTab's state from Happstack-state into a parseable format

root / HouseTab / App / State.hs

{-# LANGUAGE TemplateHaskell, TypeFamilies, DeriveDataTypeable,
    FlexibleInstances, MultiParamTypeClasses, FlexibleContexts,
    UndecidableInstances, TypeOperators
    #-}
module HouseTab.App.State where
import Happstack.Data
import Happstack.State
import HouseTab.State

-- |top-level application state
-- in this case, the top-level state itself does not contain any state
$(deriveAll [''Show, ''Eq, ''Ord, ''Default]
  [d|
      data AppState = AppState
   |])

$(deriveSerialize ''AppState)
instance Version AppState

-- |top-level application component
-- we depend on the HouseTab component
instance Component AppState where
  type Dependencies AppState = Accounts :+: End
  initialValue = defaultValue
  
-- create types for event serialization
$(mkMethods ''AppState [])