Drop 'spawnP', as it only really makes sense for NFData

This commit is contained in:
Michael Walker 2014-12-18 18:22:50 +00:00
parent f2dae49d71
commit 9361499b01

View File

@ -23,8 +23,6 @@ import Data.Maybe (maybe)
-- abstracts Conc monads which support futures. In itself, this is not
-- enough to implement nondeterminism, however the class is provided
-- to remove the 'NFData' constraints imposed by 'ParFuture'.
--
-- A minimal implementation consists of 'spawn' and 'get'.
class Monad m => ConcFuture future m | m -> future where
-- | Create a concurrent computation for the provided action, and
-- return a future which can be used to query the result.
@ -35,12 +33,6 @@ class Monad m => ConcFuture future m | m -> future where
-- 'get's are possible, unlike 'takeMVar' for example.
get :: future a -> m a
-- | Spawn a concurrent pure (non-monadic) computation.
--
-- > spawnP = spawn . return
spawnP :: a -> m (future a)
spawnP = spawn . return
instance ConcFuture MVar IO where
spawn ma = do
mvar <- newEmptyMVar