Name: tbox Synopsis: Transactional variables and data structures with IO hooks Description: This package provides STM data structures with IO hooks. The basic building blocks are instances of class 'TBox'. Such an instance is an STM variable that might contain a value of some type 'a'. In contrast to a plain 'TVar (Maybe a)', a 'TBox' has IO hooks that are executed transparently on writes and reads. The IO hooks of the 'AdvSTM' monad extend the atomicity of STM transactions to the on-commit IO actions, which makes it particularly suitable for implementing a persistent and thread-safe storage. . See module Control.Concurrent.TFile for a (simple) instance of a 'TBox' that serializes its content to a file via 'Data.Binary'. . New in this release is the implementation of a skip list in module Control.Concurrent.TBox.TSkipList. A skip list is a probabilistic data structure that provides expected run time of /O(log n)/ for dictionary operations (insert, lookup, filter, delete, update) similar to a balanced tree. The main advantage of a skip list is that it does not need rebalancing, which could cause lots of contention among transactions. The 'TFile' skip list instance tries to reconstruct its content from the 'TFile'-directory. See module Control.Concurrent.TFile.TSkipList for a usage example. . Feedback is highly appreciated! Author: Peter Robinson 2009, 2010 Maintainer: Peter Robinson License: LGPL License-file: LICENSE Version: 0.1.0 Category: Data, Concurrency Stability: experimental Homepage: http://darcs.monoid.at/tbox build-type: Simple cabal-version: >= 1.2.3 library ghc-options: -Wall -fno-ignore-asserts -fwarn-incomplete-patterns exposed-modules: Control.Concurrent.TBox Control.Concurrent.TBox.Internal.Class Control.Concurrent.TBox.Internal.Operations -- Control.Concurrent.TBox.TList -- Control.Concurrent.TBox.THashtable Control.Concurrent.TBox.TSkipList Control.Concurrent.TFile -- Control.Concurrent.TFile.TList -- Control.Concurrent.TFile.THashtable Control.Concurrent.TFile.TSkipList -- other-modules: test.hs build-depends: base >= 4 && < 5, stm-io-hooks >= 0.6.0 && < 0.7, mtl >= 1.1.0.2 && < 1.2, binary >= 0.5 && < 0.6, filepath >= 1.1 && < 1.2, directory >= 1.0.0.3 && < 1.1, cautious-file >= 0.1.5 && < 0.2, array >= 0.2 && < 0.4, containers >= 0.2.0.1 && < 0.4, random >= 1.0.0.1 && < 1.1, monad-loops >= 0.3.0.2 && < 0.4.0.0, IfElse >= 0.85 && < 1, safe-failure >= 0.4.0 && < 0.5 extensions: MultiParamTypeClasses, -- RankNTypes, -- FunctionalDependencies, FlexibleContexts, FlexibleInstances, -- UndecidableInstances, DeriveDataTypeable, ExistentialQuantification, TypeSynonymInstances, BangPatterns, ScopedTypeVariables -- TypeSynonymInstances