packages feed

happstack-state-6.1.3: happstack-state.cabal

Name:                happstack-state
Version:             6.1.3
Synopsis:            Event-based distributed state.
Description:         Unplug your machine and restart and have your app recover to exactly where it left off. Happstack-State spares you the need to deal with all the marshalling, consistency, and configuration headache that you would have if you used an external DBMS for this purpose. Its component model makes it easy to compose big applications from smaller reliable parts. Use event subscription to trigger IO actions and support comet-style or irc-bot applications. 
License:             BSD3
License-file:        COPYING
Author:              Happstack team, HAppS LLC
Maintainer:          Happstack team <happs@googlegroups.com>
homepage:            http://happstack.com
Category:            Web, Distributed Computing
Cabal-Version:       >= 1.6
Build-Type:          Simple

source-repository head
    type:     darcs
    subdir:   happstack-state
    location: http://patch-tag.com/r/mae/happstack

flag base4

Flag tests
    Description: Build the testsuite, and include the tests in the library
    Default: False

flag replication
    Description: Enable state replication through a central serialization service.
    Default: False

Library

  Exposed-modules:     
                       Happstack.State
--                     Happstack.State.Logger
                       Happstack.State.Saver
                       Happstack.State.Control
                       Happstack.State.Transaction
                       Happstack.State.ComponentTH
                       Happstack.State.ComponentSystem
                       Happstack.State.Saver.Impl.File
                       Happstack.State.Saver.Impl.Memory
                       Happstack.State.Saver.Impl.Queue
                       Happstack.State.Saver.Types
  if flag(tests)
    Build-Depends:     QuickCheck >= 2 && <3, HUnit, network
    Exposed-modules:   
                       Happstack.State.Tests
                       Happstack.State.Tests.Helpers
                       Happstack.State.Tests.CheckpointProperties
                       Happstack.State.Tests.SaverProperties
  Other-modules:       
                       Happstack.State.Checkpoint
                       Happstack.State.Monad
                       Happstack.State.Types
                       Happstack.State.Util
                       Happstack.State.TxControl

  Build-Depends:       binary,
                       bytestring,
                       containers,
                       directory, 
                       extensible-exceptions,
                       filepath,
                       hslogger >= 1.0.2,
                       happstack-util >= 6.0 && < 6.1,
                       happstack-data >= 6.0.1 && < 6.1,
                       mtl >= 1.1 && < 2.1,
                       old-time,
                       random,
                       stm >= 2.1.2.2,
                       template-haskell

  if flag(replication)
    Other-modules:     Happstack.State.CentralLogServer
                       Happstack.State.NetworkChan
    Build-Depends:     hS3 >= 0.5.1 && < 0.6,
                       bencode >= 0.5,
                       process,
                       SHA >= 1.4.0 && < 2
    cpp-options:       -DREPLICATION

  if flag(base4)
    Build-Depends:     base >= 4 && < 5, syb
  else
    Build-Depends:     base < 4

  hs-source-dirs:      src
  if flag(tests)
    hs-source-dirs:    tests
  
  if !os(windows)
     Build-Depends:    unix
     cpp-options:      -DUNIX

  Extensions:          TemplateHaskell, FlexibleInstances, FlexibleContexts,
                       MultiParamTypeClasses, DeriveDataTypeable,
                       OverlappingInstances, UndecidableInstances, CPP,
                       TypeFamilies, FunctionalDependencies, TypeOperators,
                       GADTs, EmptyDataDecls, ExistentialQuantification, RankNTypes,
                       ScopedTypeVariables, PatternGuards,
                       MagicHash, TypeSynonymInstances
  if impl(ghc >= 6.12)
     ghc-options:      -Wall -fno-warn-unused-do-bind -fno-warn-orphans
  else
     ghc-options:      -Wall  -fno-warn-orphans
  GHC-Prof-Options:    -auto-all

Executable happstack-state-tests
  Main-Is: Test.hs
  GHC-Options: -threaded
  hs-source-dirs: tests, src
  if flag(tests)
    Buildable: True
    Build-depends: HUnit
  else
    Buildable: False