packages feed

auto 0.3.0.0 → 0.4.0.0

raw patch · 7 files changed

+45/−26 lines, 7 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Control.Auto.Blip: forkB :: (a -> Bool) -> Auto m (Blip a) (Blip a, Blip a)
+ Control.Auto.Blip: splitB :: (a -> Bool) -> Auto m (Blip a) (Blip a, Blip a)

Files

CHANGELOG.md view
@@ -1,7 +1,24 @@+0.4.0.0+-------+<https://github.com/mstksg/auto/releases/tag/v0.4.0.0>++*   Bug fix version *reverting* breaking changes from `0.3.0.0`.  `0.4.x`+    should be able to run all `0.2.x` programs with full backwards+    compatibility.+*   **Control.Auto.Effects**: Reverted back to lazy `StateT` and `WriterT`,+    because of situations where *auto* cannot resolve fixed points for+    recursive bindings.+*   **Control.Auto.Blip**: `forkB` renamed to `splitB` to prevent confusion+    with "fork", usually used in Haskell to refer to concurrency.  Also+    anticipating adding concurrency-based `Auto`s, so this is a move to clear+    the way for any possible conflicts.+ 0.3.0.0 ------- <https://github.com/mstksg/auto/releases/tag/v0.3.0.0> +**DEPRECATED:** Please use `0.4.0.0`!+ *   **Control.Auto.Effects**: Breaking change: switched to strict `StateT`     and `WriterT`. *   **Control.Auto.Effects**: Added `readerA` and `writerA`, for convenience@@ -64,6 +81,8 @@ ------- <https://github.com/mstksg/auto/releases/tag/v0.2.0.2> +**DEPRECATED:** Please use `0.2.0.3`!+ *   **Control.Auto.Collection**: `dynZipF` and `dynMapF`, implicit-serialization     dynamic collections. @@ -81,4 +100,5 @@ ------- <https://github.com/mstksg/auto/releases/tag/v0.2.0.0> -*   First official release.  No backwards-incompatible changes until 0.3.0.0.+*   First official release.  No backwards-incompatible changes until+    `0.3.0.0`.
auto.cabal view
@@ -1,5 +1,5 @@ name:                auto-version:             0.3.0.0+version:             0.4.0.0 synopsis:            Denotative, locally stateful programming DSL & platform description:         (Up to date documentation is maintained at                      <https://mstksg.github.com/auto>)@@ -25,9 +25,9 @@                      static relationships between quantities.                      .                      Instead of a "state monad" type solution, where all-                     functions have access to a global state, /auto/ works by-                     specifying relationships which each exist independently-                     and on their own, without any global state.+                     functions have access to a rigid global state, /auto/+                     works by specifying relationships which each exist+                     independently and on their own, without any global state.                      .                      A more fuller exposition is in the `README.md`, in this                      project directory and also online at
src/Control/Auto/Blip.hs view
@@ -57,7 +57,7 @@   , lagBlips   , lagBlips_   , filterB-  , forkB+  , splitB   , joinB   , mapMaybeB   , takeB@@ -448,16 +448,16 @@                              Blip x' | p x' -> x                              _              -> NoBlip --- | "Forks" a blip stream based on a predicate.  Takes in one blip stream+-- | "Splits" a blip stream based on a predicate.  Takes in one blip stream -- and produces two: the first emits whenever the input emits with a value -- that passes the predicate, and the second emits whenever the input emits -- with a value that doesn't.-forkB :: (a -> Bool)+splitB :: (a -> Bool)       -> Auto m (Blip a) (Blip a, Blip a)-forkB p = mkFunc $ \x -> case x of-                           Blip x' | p x'      -> (x, NoBlip)-                                   | otherwise -> (NoBlip, x)-                           _                   -> (NoBlip, NoBlip)+splitB p = mkFunc $ \x -> case x of+                            Blip x' | p x'      -> (x, NoBlip)+                                    | otherwise -> (NoBlip, x)+                            _                   -> (NoBlip, NoBlip)  -- | "Collapses" a blip stream of blip streams into single blip stream. -- that emits whenever the inner-nested stream emits.
src/Control/Auto/Core.hs view
@@ -209,10 +209,8 @@ -- | Re-structure 'Auto' internals to use the 'Arb' ("arbitrary") -- constructors, as recursion-based mealy machines. ----- Almost always a bad idea in every conceivable situation.  Why is it even--- here?+-- Mostly here for performance comparisons and benchmarking purposes. ----- I'm sorry. toArb :: Monad m => Auto m a b -> Auto m a b toArb a = a_   where
src/Control/Auto/Effects.hs view
@@ -71,15 +71,15 @@ import Control.Auto.Generate import Control.Category import Control.Exception-import Control.Monad hiding              (mapM, mapM_)-import Control.Monad.Trans.Reader        (ReaderT(ReaderT), runReaderT)-import Control.Monad.Trans.State.Strict  (StateT(StateT), runStateT)-import Control.Monad.Trans.Writer.Strict (WriterT(WriterT), runWriterT)+import Control.Monad hiding       (mapM, mapM_)+import Control.Monad.Trans.Reader (ReaderT(ReaderT), runReaderT)+import Control.Monad.Trans.State  (StateT(StateT), runStateT)+import Control.Monad.Trans.Writer (WriterT(WriterT), runWriterT) import Data.Foldable import Data.Monoid import Data.Serialize import Data.Traversable-import Prelude hiding                    ((.), id, mapM, mapM_)+import Prelude hiding             ((.), id, mapM, mapM_)  -- | The very first output executes a monadic action and uses the result as -- the output, ignoring all input.  From then on, it persistently outputs
src/Control/Auto/Run.hs view
@@ -552,11 +552,12 @@ -- working with transformers for /value/ streams, and not effect streams or -- streams of effects.  Using this, you can potentially have the best of -- both worlds.+-- streamAutoEffects :: (Monad m, MonadTrans t, MonadPlus (t m), Monad m')-                  => (forall c. m' c -> m c)-                  -> [a]-                  -> Auto m' a b-                  -> t m b+                  => (forall c. m' c -> m c)   -- ^ function to change the underyling monad from @m'@ to @m@+                  -> [a]                       -- ^ inputs to stream on+                  -> Auto m' a b               -- ^ 'Auto' to stream+                  -> t m b                     -- ^ "ListT"-like structure sequencing effects streamAutoEffects nt = go   where     go [] _      = mzero
tutorial/tutorial.md view
@@ -802,7 +802,7 @@ has different modes of behavior, which you can represent with a different `Auto` for each mode...and you can switch between them with these switches! -See the documentation for these at the *[Control.Auto.Swtich][]* module for+See the documentation for these at the *[Control.Auto.Switch][]* module for more information!  #### Collections@@ -843,7 +843,7 @@                                         -- 0 if matches                                         -- -1 if smaller -        x <- sumFromD 0 -< step+        x <- sumFromD x0 -< step      id -< x ~~~