polysemy-conc 0.6.0.0 → 0.6.0.1
raw patch · 5 files changed
+20/−20 lines, 5 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Polysemy.Conc: type UninterruptipleMask resource = Scoped (UninterruptipleMaskResource resource) RestoreMask
- Polysemy.Conc.Effect.Mask: type UninterruptipleMask resource = Scoped (UninterruptipleMaskResource resource) RestoreMask
+ Polysemy.Conc: type UninterruptibleMask resource = Scoped (UninterruptibleMaskResource resource) RestoreMask
+ Polysemy.Conc.Effect.Mask: type UninterruptibleMask resource = Scoped (UninterruptibleMaskResource resource) RestoreMask
- Polysemy.Conc: interpretUninterruptibleMaskFinal :: Member (Final IO) r => InterpreterFor (UninterruptipleMask Restoration) r
+ Polysemy.Conc: interpretUninterruptibleMaskFinal :: Member (Final IO) r => InterpreterFor (UninterruptibleMask Restoration) r
- Polysemy.Conc: type ConcStack = [UninterruptipleMask Restoration, Mask Restoration, Race, Async, Resource, Embed IO, Final IO]
+ Polysemy.Conc: type ConcStack = [UninterruptibleMask Restoration, Mask Restoration, Race, Async, Resource, Embed IO, Final IO]
- Polysemy.Conc: uninterruptibleMask :: forall resource r. Member (UninterruptipleMask resource) r => InterpreterFor RestoreMask r
+ Polysemy.Conc: uninterruptibleMask :: forall resource r. Member (UninterruptibleMask resource) r => InterpreterFor RestoreMask r
- Polysemy.Conc.Effect.Mask: uninterruptibleMask :: forall resource r. Member (UninterruptipleMask resource) r => InterpreterFor RestoreMask r
+ Polysemy.Conc.Effect.Mask: uninterruptibleMask :: forall resource r. Member (UninterruptibleMask resource) r => InterpreterFor RestoreMask r
- Polysemy.Conc.Interpreter.Mask: interpretUninterruptibleMaskFinal :: Member (Final IO) r => InterpreterFor (UninterruptipleMask Restoration) r
+ Polysemy.Conc.Interpreter.Mask: interpretUninterruptibleMaskFinal :: Member (Final IO) r => InterpreterFor (UninterruptibleMask Restoration) r
- Polysemy.Conc.Interpreter.Stack: type ConcStack = [UninterruptipleMask Restoration, Mask Restoration, Race, Async, Resource, Embed IO, Final IO]
+ Polysemy.Conc.Interpreter.Stack: type ConcStack = [UninterruptibleMask Restoration, Mask Restoration, Race, Async, Resource, Embed IO, Final IO]
Files
- lib/Polysemy/Conc.hs +3/−3
- lib/Polysemy/Conc/Effect/Mask.hs +6/−6
- lib/Polysemy/Conc/Interpreter/Mask.hs +7/−7
- lib/Polysemy/Conc/Interpreter/Stack.hs +3/−3
- polysemy-conc.cabal +1/−1
lib/Polysemy/Conc.hs view
@@ -85,7 +85,7 @@ -- * Masking Mask,- UninterruptipleMask,+ UninterruptibleMask, mask, uninterruptibleMask, restore,@@ -147,7 +147,7 @@ import Polysemy.Conc.Effect.Critical (Critical) import Polysemy.Conc.Effect.Events (EventResource, Events, consume, publish, subscribe) import Polysemy.Conc.Effect.Interrupt (Interrupt)-import Polysemy.Conc.Effect.Mask (Mask, UninterruptipleMask, mask, restore, uninterruptibleMask)+import Polysemy.Conc.Effect.Mask (Mask, UninterruptibleMask, mask, restore, uninterruptibleMask) import Polysemy.Conc.Effect.Monitor ( Monitor, MonitorResource (MonitorResource),@@ -229,7 +229,7 @@ -- $mask -- #mask#--- The two effects 'Mask' and 'UninterruptipleMask' use the 'Polysemy.Conc.Effect.Scoped' pattern, which allow an effect+-- The two effects 'Mask' and 'UninterruptibleMask' use the 'Polysemy.Conc.Effect.Scoped' pattern, which allow an effect -- with resources to be constrained to a region of code. -- The actual effect is 'Polysemy.Conc.Effect.Mask.RestoreMask', with `mask` and 'uninterruptibleMask' only specializing -- 'Polysemy.Conc.Effect.scoped' to the appropriate resource type.
lib/Polysemy/Conc/Effect/Mask.hs view
@@ -22,16 +22,16 @@ newtype MaskResource resource = MaskResource { unMaskResource :: resource } -newtype UninterruptipleMaskResource resource =- UninterruptipleMaskResource { unUninterruptipleMaskResource :: resource }+newtype UninterruptibleMaskResource resource =+ UninterruptibleMaskResource { unUninterruptibleMaskResource :: resource } -- |The scoped masking effect. type Mask resource = Scoped (MaskResource resource) RestoreMask -- |The scoped uninterruptible masking effect.-type UninterruptipleMask resource =- Scoped (UninterruptipleMaskResource resource) RestoreMask+type UninterruptibleMask resource =+ Scoped (UninterruptibleMaskResource resource) RestoreMask -- |Mark a region as masked. -- Uses the 'Scoped' pattern.@@ -46,7 +46,7 @@ -- Uses the 'Scoped' pattern. uninterruptibleMask :: ∀ resource r .- Member (UninterruptipleMask resource) r =>+ Member (UninterruptibleMask resource) r => InterpreterFor RestoreMask r uninterruptibleMask =- scoped @(UninterruptipleMaskResource resource)+ scoped @(UninterruptibleMaskResource resource)
lib/Polysemy/Conc/Interpreter/Mask.hs view
@@ -10,8 +10,8 @@ Mask, MaskResource (MaskResource), RestoreMask (Restore),- UninterruptipleMask,- UninterruptipleMaskResource (UninterruptipleMaskResource),+ UninterruptibleMask,+ UninterruptibleMaskResource (UninterruptibleMaskResource), ) import Polysemy.Conc.Interpreter.Scoped (runScoped) @@ -28,11 +28,11 @@ uninterruptibleMask :: Member (Final IO) r =>- (UninterruptipleMaskResource Restoration -> Sem r a) ->+ (UninterruptibleMaskResource Restoration -> Sem r a) -> Sem r a uninterruptibleMask f = withWeavingToFinal @IO \ s lower _ ->- Base.uninterruptibleMask \ restore -> (lower (f (UninterruptipleMaskResource (Restoration restore)) <$ s))+ Base.uninterruptibleMask \ restore -> (lower (f (UninterruptibleMaskResource (Restoration restore)) <$ s)) interpretRestoreMask :: ∀ r .@@ -55,9 +55,9 @@ interpretMaskFinal = runScoped mask \ (MaskResource r) -> interpretRestoreMask r --- |Interpret 'UninterruptipleMask' in 'IO'.+-- |Interpret 'UninterruptibleMask' in 'IO'. interpretUninterruptibleMaskFinal :: Member (Final IO) r =>- InterpreterFor (UninterruptipleMask Restoration) r+ InterpreterFor (UninterruptibleMask Restoration) r interpretUninterruptibleMaskFinal =- runScoped uninterruptibleMask \ (UninterruptipleMaskResource r) -> interpretRestoreMask r+ runScoped uninterruptibleMask \ (UninterruptibleMaskResource r) -> interpretRestoreMask r
lib/Polysemy/Conc/Interpreter/Stack.hs view
@@ -3,7 +3,7 @@ -- |Description: Convenience Interpreters for all Conc Effects, Internal module Polysemy.Conc.Interpreter.Stack where -import Polysemy.Conc.Effect.Mask (Mask, UninterruptipleMask)+import Polysemy.Conc.Effect.Mask (Mask, UninterruptibleMask) import Polysemy.Conc.Effect.Race (Race) import Polysemy.Conc.Interpreter.Mask (Restoration, interpretMaskFinal, interpretUninterruptibleMaskFinal) import Polysemy.Conc.Interpreter.Race (interpretRace)@@ -11,7 +11,7 @@ -- |A default basic stack with 'Final' for _polysemy-conc_. type ConcStack = [- UninterruptipleMask Restoration,+ UninterruptibleMask Restoration, Mask Restoration, Race, Async,@@ -20,7 +20,7 @@ Final IO ] --- |Interprets 'UninterruptipleMask', 'Mask' and 'Race' in terms of @'Final' 'IO'@ and runs the entire rest of the+-- |Interprets 'UninterruptibleMask', 'Mask' and 'Race' in terms of @'Final' 'IO'@ and runs the entire rest of the -- stack. runConc :: Sem ConcStack a ->
polysemy-conc.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: polysemy-conc-version: 0.6.0.0+version: 0.6.0.1 synopsis: Polysemy Effects for Concurrency description: See <https://hackage.haskell.org/package/polysemy-conc/docs/Polysemy-Conc.html> category: Concurrency