packages feed

dejafu 0.3.1.0 → 0.3.1.1

raw patch · 4 files changed

+36/−19 lines, 4 filesdep ~arraydep ~atomic-primopsdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: array, atomic-primops, base, containers, deepseq, dpor, exceptions, monad-control, monad-loops, mtl, semigroups, stm, template-haskell, transformers, transformers-base

API changes (from Hackage documentation)

- Test.DejaFu.Deterministic.Internal.Memory: BufferedWrite :: ThreadId -> CRef r a -> a -> BufferedWrite r
+ Control.Monad.Conc.Class: type family ThreadId m :: *;
+ Control.Monad.Conc.Class: }
+ Control.Monad.STM.Class: type family TVar stm :: * -> *;
+ Control.Monad.STM.Class: }
+ Test.DejaFu.Deterministic.Internal.Memory: [BufferedWrite] :: ThreadId -> CRef r a -> a -> BufferedWrite r
- Control.Monad.Conc.Class: class (Applicative m, Monad m, MonadCatch m, MonadThrow m, MonadMask m, MonadSTM (STM m), Ord (ThreadId m), Show (ThreadId m)) => MonadConc m where type family STM m :: * -> * type family MVar m :: * -> * type family CRef m :: * -> * type family Ticket m :: * -> * type family ThreadId m :: * fork ma = forkWithUnmask (\ _ -> ma) forkWithUnmask = forkWithUnmaskN "" forkWithUnmaskN _ = forkWithUnmask forkOn c ma = forkOnWithUnmask c (\ _ -> ma) forkOnWithUnmask = forkOnWithUnmaskN "" forkOnWithUnmaskN _ = forkOnWithUnmask threadDelay _ = yield newEmptyMVar = newEmptyMVarN "" newEmptyMVarN _ = newEmptyMVar newCRef = newCRefN "" newCRefN _ = newCRef readCRef cref = readForCAS cref >>= peekTicket atomicWriteCRef r a = atomicModifyCRef r $ const (a, ()) modifyCRefCAS_ cref f = modifyCRefCAS cref (\ a -> (f a, ())) readTVarConc = atomically . readTVar _concKnowsAbout _ = pure () _concForgets _ = pure () _concAllKnown = pure () _concMessage _ = pure ()
+ Control.Monad.Conc.Class: class (Applicative m, Monad m, MonadCatch m, MonadThrow m, MonadMask m, MonadSTM (STM m), Ord (ThreadId m), Show (ThreadId m)) => MonadConc m where type STM m :: * -> * type MVar m :: * -> * type CRef m :: * -> * type Ticket m :: * -> * type ThreadId m :: * fork ma = forkWithUnmask (\ _ -> ma) forkWithUnmask = forkWithUnmaskN "" forkWithUnmaskN _ = forkWithUnmask forkOn c ma = forkOnWithUnmask c (\ _ -> ma) forkOnWithUnmask = forkOnWithUnmaskN "" forkOnWithUnmaskN _ = forkOnWithUnmask threadDelay _ = yield newEmptyMVar = newEmptyMVarN "" newEmptyMVarN _ = newEmptyMVar newCRef = newCRefN "" newCRefN _ = newCRef readCRef cref = readForCAS cref >>= peekTicket atomicWriteCRef r a = atomicModifyCRef r $ const (a, ()) modifyCRefCAS_ cref f = modifyCRefCAS cref (\ a -> (f a, ())) readTVarConc = atomically . readTVar _concKnowsAbout _ = pure () _concForgets _ = pure () _concAllKnown = pure () _concMessage _ = pure () where {
- Control.Monad.STM.Class: class MonadCatch stm => MonadSTM stm where type family TVar stm :: * -> * newTVar = newTVarN "" newTVarN _ = newTVar
+ Control.Monad.STM.Class: class MonadCatch stm => MonadSTM stm where type TVar stm :: * -> * newTVar = newTVarN "" newTVarN _ = newTVar where {
- Test.DejaFu.Deterministic.Internal: runFixed' :: (Functor n, Monad n) => Fixed n r s -> (forall x. s x -> IdSource -> n (Result x, IdSource, TTrace)) -> Scheduler ThreadId ThreadAction Lookahead g -> MemType -> g -> IdSource -> M n r s a -> n (Either Failure a, g, IdSource, Trace ThreadId ThreadAction Lookahead)
+ Test.DejaFu.Deterministic.Internal: runFixed' :: forall n r s g a. (Functor n, Monad n) => Fixed n r s -> (forall x. s x -> IdSource -> n (Result x, IdSource, TTrace)) -> Scheduler ThreadId ThreadAction Lookahead g -> MemType -> g -> IdSource -> M n r s a -> n (Either Failure a, g, IdSource, Trace ThreadId ThreadAction Lookahead)

Files

Control/Monad/Conc/Class.hs view
@@ -642,7 +642,7 @@ INSTANCE(RL.RWST r w s, (MonadConc m, Monoid w), (\(a,_,_) -> a)) INSTANCE(RS.RWST r w s, (MonadConc m, Monoid w), (\(a,_,_) -> a)) -#undef INSTANC+#undef INSTANCE  ------------------------------------------------------------------------------- @@ -653,7 +653,12 @@ makeTransConc unstN = do   unstI <- reify unstN   case unstI of+#if MIN_VERSION_template_haskell(2,11,0)+    -- template-haskell-2.11.0.0 drops the 'Fixity' value from 'VarI'+    VarI _ (ForallT _ _ (AppT (AppT ArrowT (AppT (AppT (ConT _) t) _)) _)) _ ->+#else     VarI _ (ForallT _ _ (AppT (AppT ArrowT (AppT (AppT (ConT _) t) _)) _)) _ _ ->+#endif       [d|         instance (MonadConc m) => MonadConc ($(pure t) m) where           type STM      ($(pure t) m) = STM m
Control/Monad/STM/Class.hs view
@@ -146,7 +146,7 @@ INSTANCE(RL.RWST r w s, (MonadSTM stm, Monoid w), (\(a,_,_) -> a)) INSTANCE(RS.RWST r w s, (MonadSTM stm, Monoid w), (\(a,_,_) -> a)) -#undef INSTANC+#undef INSTANCE  ------------------------------------------------------------------------------- @@ -157,7 +157,12 @@ makeTransSTM unstN = do   unstI <- reify unstN   case unstI of+#if MIN_VERSION_template_haskell(2,11,0)+    -- template-haskell-2.11.0.0 drops the 'Fixity' value from 'VarI'+    VarI _ (ForallT _ _ (AppT (AppT ArrowT (AppT (AppT (ConT _) t) _)) _)) _ ->+#else     VarI _ (ForallT _ _ (AppT (AppT ArrowT (AppT (AppT (ConT _) t) _)) _)) _ _ ->+#endif       [d|         instance (MonadSTM stm, MonadTransControl $(pure t)) => MonadSTM ($(pure t) stm) where           type TVar ($(pure t) stm) = TVar stm
Test/DejaFu/Deterministic/Internal.hs view
@@ -226,6 +226,13 @@    where     -- | Start a new thread, assigning it the next 'ThreadId'+    --+    -- Explicit type signature needed for GHC 8. Looks like the+    -- impredicative polymorphism checks got stronger.+    stepFork :: String+             -> ((forall b. M n r s b -> M n r s b) -> Action n r s)+             -> (ThreadId -> Action n r s)+             -> n (Either Failure (Threads n r s, IdSource, ThreadAction, WriteBuffer r, Int))     stepFork n a b = return $ Right (goto (b newtid) tid threads', idSource', Fork newtid, wb, caps) where       threads' = launch tid newtid a threads       (idSource', newtid) = nextTId n idSource
dejafu.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                dejafu-version:             0.3.1.0+version:             0.3.1.1 synopsis:            Overloadable primitives for testable, potentially non-deterministic, concurrency.  description:@@ -75,7 +75,7 @@ source-repository this   type:     git   location: https://github.com/barrucadu/dejafu.git-  tag:      dejafu-0.3.1.0+  tag:      dejafu-0.3.1.1  library   exposed-modules:     Control.Monad.Conc.Class@@ -109,21 +109,21 @@    -- other-modules:          -- other-extensions:    -  build-depends:       base >=4.5 && <5-                     , array-                     , atomic-primops-                     , containers-                     , dpor-                     , deepseq-                     , exceptions >=0.7-                     , monad-control-                     , monad-loops-                     , mtl-                     , semigroups-                     , stm-                     , template-haskell-                     , transformers-                     , transformers-base+  build-depends:       base              >=4.8  && <5+                     , array             >=0.5  && <0.6+                     , atomic-primops    >=0.8  && <0.9+                     , containers        >=0.5  && <0.6+                     , dpor              >=0.1  && <0.2+                     , deepseq           >=1.3  && <1.5+                     , exceptions        >=0.7  && <0.9+                     , monad-control     >=1.0  && <1.1+                     , monad-loops       >=0.4  && <0.5+                     , mtl               >=2.2  && <2.3+                     , semigroups        >=0.16 && <0.19+                     , stm               >=2.4  && <2.5+                     , template-haskell  >=2.10 && <2.12+                     , transformers      >=0.4  && <0.6+                     , transformers-base >=0.4  && <0.5   -- hs-source-dirs:         default-language:    Haskell2010   ghc-options:         -Wall