1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
name: stateref
version: 0.3
stability: provisional
license: PublicDomain
cabal-version: >= 1.2
build-type: Simple
author: James Cook <mokus@deepbondi.net>
maintainer: James Cook <mokus@deepbondi.net>
homepage: http://code.haskell.org/~mokus/stateref/
category: Data
synopsis: Abstraction for things that work like IORef.
description: A collection of type-classes generalizing the
read\/write\/modify operations for stateful variables
provided by things like IORef, TVar, &c.
Note that The interface has changed a bit from the
0.2.* version. \"*Ref\" functions are now called
\"*Reference\" and new \"*Ref\" function exist with
simpler signatures.
The new 'Ref' existential type provides a convenient
monad-indexed reference type, and the HasRef class
indicates monads for which there is a default
reference type for every referent.
tested-with: GHC
Flag useSTM
Description: Include instances for STM types
Default: True
Flag useTMVar
Description: Include instances for TMVar (TMVar is not available
in hugs' STM implementation). I have been unable to
make this flag's value depend on whether or not
you're running hugs, so if you are, you'll just have
to change it manually. It'd sure be nice if there
were either an explicit backtrack command in cabal
or if 'buildable:false' would trigger a backtrack.
Or if I could say "default: not(impl(hugs))" for this
flag.
Note that this is irrelevant at the moment because
I broke Hugs+STM support by adding MonadIO m => ...
instances. If anyone really wants me to fix it,
speak up - but those instances are pretty darn
convenient.
Default: True
Library
hs-source-dirs: src
extensions: CPP
exposed-modules: Data.Accessor
Data.StateRef
Data.StateRef.Types
Data.StateRef.Instances
Data.MRef
Data.MRef.Types
Data.MRef.Instances
other-modules: Data.StateRef.Instances.Undecidable
if flag(useSTM)
other-modules: Data.StateRef.Instances.STM
Data.MRef.Instances.STM
cpp-options: -DuseSTM
if flag(useTMVar)
cpp-options: -DuseTMVar
if impl(hugs)
buildable: False
build-depends: base >= 3 && <5, mtl
if flag(useSTM)
build-depends: stm
|