packages feed

bluefin 0.4.1.0 → 0.4.2.0

raw patch · 6 files changed

+64/−8 lines, 6 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Bluefin.DslBuilderEff: data DslBuilderEff (h :: Effects -> Type) (es :: Effects) r
+ Bluefin.DslBuilderEff: dslBuilderEff :: forall h (es :: Effects) r. (forall (e :: Effects). () => h e -> Eff (e :& es) r) -> DslBuilderEff h es r
+ Bluefin.DslBuilderEff: runDslBuilderEff :: forall h (es :: Effects) r. h es -> DslBuilderEff h es r -> Eff es r
+ Bluefin.Prim: data Prim (e :: Effects)
+ Bluefin.Prim: data PrimStateEff (es :: k)
+ Bluefin.Prim: primitive :: forall (e1 :: Effects) (es :: Effects) (e2 :: Effects) a. (e1 :> es, e2 :> es) => Prim e1 -> (State# (PrimStateEff e2) -> (# State# (PrimStateEff e2), a #)) -> Eff es a
- Bluefin.Consume: takeConsume :: forall (ea :: Effects) (es :: Effects) (eb :: Effects) a. (ea :> es, eb :> es) => Int -> Consume a ea -> Stream a eb -> Eff es ()
+ Bluefin.Consume: takeConsume :: forall (e1 :: Effects) (es :: Effects) (e2 :: Effects) a. (e1 :> es, e2 :> es) => Int -> Consume a e1 -> Stream a e2 -> Eff es ()
- Bluefin.Stream: cycleToStream :: forall f (ea :: Effects) (es :: Effects) a. (Foldable f, ea :> es) => f a -> Stream a ea -> Eff es ()
+ Bluefin.Stream: cycleToStream :: forall f (e1 :: Effects) (es :: Effects) a. (Foldable f, e1 :> es) => f a -> Stream a e1 -> Eff es ()
- Bluefin.Stream: takeConsume :: forall (ea :: Effects) (es :: Effects) (eb :: Effects) a. (ea :> es, eb :> es) => Int -> Consume a ea -> Stream a eb -> Eff es ()
+ Bluefin.Stream: takeConsume :: forall (e1 :: Effects) (es :: Effects) (e2 :: Effects) a. (e1 :> es, e2 :> es) => Int -> Consume a e1 -> Stream a e2 -> Eff es ()

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+# 0.4.2.0++* Add `Bluefin.DslBuilderEff`++* Add `Bluefin.Prim`+ # 0.4.1.0  * Depend on `bluefin-internal >= 0.4.1.0` to pick up `MonadFix`
bluefin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               bluefin-version:            0.4.1.0+version:            0.4.2.0 license:            MIT license-file:       LICENSE author:             Tom Ellis@@ -26,6 +26,7 @@       Bluefin.Coroutine,       Bluefin.CloneableHandle,       Bluefin.DslBuilder,+      Bluefin.DslBuilderEff,       Bluefin.EarlyReturn,       Bluefin.Eff,       Bluefin.Exception,@@ -35,6 +36,7 @@       Bluefin.Jump,       Bluefin.Pipes,       Bluefin.Pipes.Prelude,+      Bluefin.Prim,       Bluefin.Reader,       Bluefin.State,       Bluefin.StateSource,
+ src/Bluefin/DslBuilderEff.hs view
@@ -0,0 +1,11 @@+-- | Like "Bluefin.DslBuilder", but when you want to be able to run+-- additional effects as well.++module Bluefin.DslBuilderEff (+    DslBuilderEff,+    dslBuilderEff,+    runDslBuilderEff,+  )+where++import Bluefin.Internal.DslBuilderEff
src/Bluefin/Pipes.hs view
@@ -1,7 +1,13 @@ -- | Reimplementation of the @pipes@ (@Pipes@) ecosystem in Bluefin.--- It primarily serves as an example of what you can do with Bluefin--- and you probably won't want to use it directly.  Instead you are--- recommended to use+--+-- You should not use this module.  It will be deprecated and removed+-- in future versions.+--+-- This module is just an example of what you can do with Bluefin and+-- as such it should be obtained from+-- [@bluefin-examples@](https://github.com/tomjaguarpaw/bluefin/tree/master/bluefin-examples)+-- if you want it.  Instead of using it directly you are recommended+-- to use -- -- * 'Bluefin.Stream', 'Bluefin.Stream.yield' -- * 'Bluefin.Consume', 'Bluefin.Consume.await'
src/Bluefin/Pipes/Prelude.hs view
@@ -1,7 +1,13 @@--- | Reimplementation of the @pipes@ prelude (@Pipes.Prelude@) in--- Bluefin.  It primarily serves as an example of what you can do with--- Bluefin and you probably won't want to use it directly.  Instead--- you are recommended to use+-- | Reimplementation of the @pipes@ (@Pipes@) ecosystem in Bluefin.+--+-- You should not use this module.  It will be deprecated and removed+-- in future versions.+--+-- This module is just an example of what you can do with Bluefin and+-- as such it should be obtained from+-- [@bluefin-examples@](https://github.com/tomjaguarpaw/bluefin/tree/master/bluefin-examples)+-- if you want it.  Instead of using it directly you are recommended+-- to use -- -- * 'Bluefin.Stream', 'Bluefin.Stream.yield' -- * 'Bluefin.Consume', 'Bluefin.Consume.await'
+ src/Bluefin/Prim.hs view
@@ -0,0 +1,25 @@+-- | For defining @PrimMonad@ instances, for example:+--+-- @+-- -- Define a handle which includes Prim+-- data ExAndPrim e = MkExAndPrim (Exception String e) (Prim e)+--   -- Give it a Handle instance, as per Bluefin.Compound+--   deriving (Handle) via OneWayCoercibleHandle ExAndPrim+--   deriving stock (Generic)+--+-- instance (e :> es) => OneWayCoercible (ExAndPrim e) (ExAndPrim es) where+--   oneWayCoercibleImpl = gOneWayCoercible+--+-- -- Define a monad M containing the Prim handle+-- newtype M es a = MkM (DslBuilderEff ExAndPrim es a)+--   deriving newtype (Functor, Applicative, Monad)+--+-- -- Give M a PrimMonad instance+-- instance PrimMonad (M es) where+--   type PrimState (M es) = PrimStateEff es+--   primitive f =+--     MkM (dslBuilderEff (\\(MkExAndPrim _ prim) -> P.primitive prim f))+-- @+module Bluefin.Prim (Prim, PrimStateEff, primitive) where++import Bluefin.Internal.Prim