packages feed

speculation-transformers 0.1 → 0.1.2

raw patch · 2 files changed

+7/−83 lines, 2 filesdep −basedep −stmdep −transformersdep ~speculation

Dependencies removed: base, stm, transformers

Dependency ranges changed: speculation

Files

− Control/Monad/Trans/Cont/Speculation.hs
@@ -1,70 +0,0 @@--------------------------------------------------------------------------------- |--- Module      :  Control.Monad.Trans.Cont.Speculation--- Copyright   :  (C) 2011 Edward Kmett, Jake McArthur--- License     :  BSD-style (see the file LICENSE)------ Maintainer  :  Edward Kmett <ekmett@gmail.com>--- Stability   :  provisional--- Portability :  portable------ Versions of the combinators from the 'speculation' package--- with the signature rearranged to enable them to be used--- directly as actions in the 'Cont' and 'ContT' monads.------------------------------------------------------------------------------module Control.Monad.Trans.Cont.Speculation where--import Control.Monad.Trans.Cont-import qualified Control.Concurrent.Speculation as Prim-import Control.Concurrent.STM---- * Basic speculation---- | When a is unevaluated, @'spec' g a@ evaluates the current continuation --- with @g@ while testing if @g@ '==' @a@, if they differ, it re-evalutes the--- continuation with @a@. If @a@ was already evaluated, the continuation is--- just directly applied to @a@ instead.-spec :: Eq a => a -> a -> ContT r m a-spec g a = ContT $ \k -> Prim.spec g k a ---- | As per 'spec', without the check for whether or not the second argument--- is already evaluated.-spec' :: Eq a => a -> a -> ContT r m a-spec' g a = ContT $ \k -> Prim.spec' g k a---- | @spec@ with a user supplied comparison function-specBy :: (a -> a -> Bool) -> a -> a -> ContT r m a-specBy f g a = ContT $ \k -> Prim.specBy f g k a---- | @spec'@ with a user supplied comparison function-specBy' :: (a -> a -> Bool) -> a -> a -> ContT r m a-specBy' f g a = ContT $ \k -> Prim.specBy' f g k a---- | @spec'@ with a user supplied comparison function-specOn :: Eq c => (a -> c) -> a -> a -> ContT r m a-specOn f g a = ContT $ \k -> Prim.specOn f g k a---- | @spec'@ with a user supplied comparison function-specOn' :: Eq c => (a -> c) -> a -> a -> ContT r m a-specOn' f g a = ContT $ \k -> Prim.specOn' f g k a---- * STM-based speculation--specSTM :: Eq a => STM a -> a -> ContT r STM a-specSTM g a = ContT $ \k -> Prim.specSTM g k a --specSTM' :: Eq a => STM a -> a -> ContT r STM a-specSTM' g a = ContT $ \k -> Prim.specSTM' g k a --specOnSTM :: Eq c => (a -> STM c) -> STM a -> a -> ContT r STM a-specOnSTM f g a = ContT $ \k -> Prim.specOnSTM f g k a --specOnSTM' :: Eq c => (a -> STM c) -> STM a -> a -> ContT r STM a-specOnSTM' f g a = ContT $ \k -> Prim.specOnSTM' f g k a --specBySTM :: (a -> a -> STM Bool) -> STM a -> a -> ContT r STM a-specBySTM f g a = ContT $ \k -> Prim.specBySTM f g k a --specBySTM' :: (a -> a -> STM Bool) -> STM a -> a -> ContT r STM a-specBySTM' f g a = ContT $ \k -> Prim.specBySTM' f g k a -
speculation-transformers.cabal view
@@ -1,30 +1,24 @@ name:          speculation-transformers-category:      Control, Comonads-version:       0.1+category:      Control+version:       0.1.2 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE author:        Edward A. Kmett maintainer:    Edward A. Kmett <ekmett@gmail.com> stability:     provisional-homepage:      http://github.com/ekmett/speculation-transformers/+homepage:      http://github.com/ekmett/speculation/ copyright:     Copyright (C) 2011 Edward A. Kmett, Jake McArthur-synopsis:      Safe, programmable, speculative parallelism with monads.-description:   Safe, programmable, speculative parallelism with monads.+synopsis:      Merged into 'speculation'. Use that instead.+description:   Merged into 'speculation'. Use that instead. build-type:    Simple  source-repository head   type: git-  location: git://github.com/ekmett/speculation-transformers.git+  location: git://github.com/ekmett/speculation.git  library   build-depends: -    base >= 4 && < 4.5,-    stm >= 2.1.2 && <= 2.2,-    speculation >= 1.0.0 && < 1.1,-    transformers >= 0.2.0 && < 0.3--  exposed-modules:-    Control.Monad.Trans.Cont.Speculation+    speculation >= 1.1    ghc-options: -Wall