distributed-static 0.3.4.0 → 0.3.5.0
raw patch · 3 files changed
+22/−30 lines, 3 filesdep ~binaryPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: binary
API changes (from Hackage documentation)
- Control.Distributed.Static: closureApply :: (Typeable a, Typeable b) => Closure (a -> b) -> Closure a -> Closure b
+ Control.Distributed.Static: closureApply :: forall a b. Closure (a -> b) -> Closure a -> Closure b
- Control.Distributed.Static: closureApplyStatic :: (Typeable a, Typeable b) => Static (a -> b) -> Closure a -> Closure b
+ Control.Distributed.Static: closureApplyStatic :: Static (a -> b) -> Closure a -> Closure b
- Control.Distributed.Static: closureCompose :: (Typeable a, Typeable b, Typeable c) => Closure (b -> c) -> Closure (a -> b) -> Closure (a -> c)
+ Control.Distributed.Static: closureCompose :: Closure (b -> c) -> Closure (a -> b) -> Closure (a -> c)
- Control.Distributed.Static: closureSplit :: (Typeable a, Typeable a', Typeable b, Typeable b') => Closure (a -> b) -> Closure (a' -> b') -> Closure ((a, a') -> (b, b'))
+ Control.Distributed.Static: closureSplit :: Closure (a -> b) -> Closure (a' -> b') -> Closure ((a, a') -> (b, b'))
- Control.Distributed.Static: staticClosure :: Typeable a => Static a -> Closure a
+ Control.Distributed.Static: staticClosure :: Static a -> Closure a
- Control.Distributed.Static: staticCompose :: (Typeable a, Typeable b, Typeable c) => Static (b -> c) -> Static (a -> b) -> Static (a -> c)
+ Control.Distributed.Static: staticCompose :: Static (b -> c) -> Static (a -> b) -> Static (a -> c)
- Control.Distributed.Static: staticConst :: (Typeable a, Typeable b) => Static a -> Static (b -> a)
+ Control.Distributed.Static: staticConst :: Static a -> Static (b -> a)
- Control.Distributed.Static: staticFlip :: (Typeable a, Typeable b, Typeable c) => Static (a -> b -> c) -> Static (b -> a -> c)
+ Control.Distributed.Static: staticFlip :: Static (a -> b -> c) -> Static (b -> a -> c)
- Control.Distributed.Static: staticPtr :: Typeable a => StaticPtr a -> Static a
+ Control.Distributed.Static: staticPtr :: forall a. Typeable a => StaticPtr a -> Static a
- Control.Distributed.Static: staticSplit :: (Typeable a, Typeable a', Typeable b, Typeable b') => Static (a -> b) -> Static (a' -> b') -> Static ((a, a') -> (b, b'))
+ Control.Distributed.Static: staticSplit :: Static (a -> b) -> Static (a' -> b') -> Static ((a, a') -> (b, b'))
Files
- ChangeLog +4/−0
- distributed-static.cabal +3/−3
- src/Control/Distributed/Static.hs +15/−27
ChangeLog view
@@ -1,3 +1,7 @@+2016-06-01 Facundo Domínguez <facundo.dominguez@tweag.io> 0.3.5.0++* Add compatibility with ghc-8.+ 2016-02-18 Facundo Domínguez <facundo.dominguez@tweag.io> 0.3.4.0 * Support static pointers.
distributed-static.cabal view
@@ -1,5 +1,5 @@ Name: distributed-static-Version: 0.3.4.0+Version: 0.3.5.0 Synopsis: Compositional, type-safe, polymorphic static values and closures Description: /Towards Haskell in the Cloud/ (Epstein et al, Haskell Symposium 2011) introduces the concept of /static/ values:@@ -19,7 +19,7 @@ License-File: LICENSE Author: Edsko de Vries Maintainer: Facundo Domínguez <facundo.dominguez@tweag.io>-Bug-Reports: https://cloud-haskell.atlassian.net/browse/DS+Bug-Reports: https://github.com/haskell-distributed/distributed-static/issues Copyright: Well-Typed LLP Category: Control Build-Type: Simple@@ -36,7 +36,7 @@ rank1dynamic >= 0.1 && < 0.4, containers >= 0.4 && < 0.6, bytestring >= 0.9 && < 0.11,- binary >= 0.5 && < 0.8,+ binary >= 0.5 && < 0.9, deepseq >= 1.3.0.1 && < 1.6 HS-Source-Dirs: src Default-Language: Haskell2010
src/Control/Distributed/Static.hs view
@@ -468,7 +468,7 @@ return (f env) -- | Convert a static value into a closure.-staticClosure :: Typeable a => Static a -> Closure a+staticClosure :: Static a -> Closure a staticClosure dec = closure (staticConst dec) empty --------------------------------------------------------------------------------@@ -476,28 +476,23 @@ -------------------------------------------------------------------------------- -- | Static version of ('Prelude..')-composeStatic :: (Typeable a, Typeable b, Typeable c)- => Static ((b -> c) -> (a -> b) -> a -> c)+composeStatic :: Static ((b -> c) -> (a -> b) -> a -> c) composeStatic = staticLabel "$compose" -- | Static version of 'const'-constStatic :: (Typeable a, Typeable b)- => Static (a -> b -> a)+constStatic :: Static (a -> b -> a) constStatic = staticLabel "$const" -- | Static version of ('Arrow.***')-splitStatic :: (Typeable a, Typeable a', Typeable b, Typeable b')- => Static ((a -> b) -> (a' -> b') -> (a, a') -> (b, b'))+splitStatic :: Static ((a -> b) -> (a' -> b') -> (a, a') -> (b, b')) splitStatic = staticLabel "$split" -- | Static version of 'Arrow.app'-appStatic :: (Typeable a, Typeable b)- => Static ((a -> b, a) -> b)+appStatic :: Static ((a -> b, a) -> b) appStatic = staticLabel "$app" -- | Static version of 'flip'-flipStatic :: (Typeable a, Typeable b, Typeable c)- => Static ((a -> b -> c) -> b -> a -> c)+flipStatic :: Static ((a -> b -> c) -> b -> a -> c) flipStatic = staticLabel "$flip" --------------------------------------------------------------------------------@@ -505,23 +500,19 @@ -------------------------------------------------------------------------------- -- | Static version of ('Prelude..')-staticCompose :: (Typeable a, Typeable b, Typeable c)- => Static (b -> c) -> Static (a -> b) -> Static (a -> c)+staticCompose :: Static (b -> c) -> Static (a -> b) -> Static (a -> c) staticCompose g f = composeStatic `staticApply` g `staticApply` f -- | Static version of ('Control.Arrow.***')-staticSplit :: (Typeable a, Typeable a', Typeable b, Typeable b')- => Static (a -> b) -> Static (a' -> b') -> Static ((a, a') -> (b, b'))+staticSplit :: Static (a -> b) -> Static (a' -> b') -> Static ((a, a') -> (b, b')) staticSplit f g = splitStatic `staticApply` f `staticApply` g -- | Static version of 'Prelude.const'-staticConst :: (Typeable a, Typeable b)- => Static a -> Static (b -> a)+staticConst :: Static a -> Static (b -> a) staticConst x = constStatic `staticApply` x -- | Static version of 'Prelude.flip'-staticFlip :: (Typeable a, Typeable b, Typeable c)- => Static (a -> b -> c) -> Static (b -> a -> c)+staticFlip :: Static (a -> b -> c) -> Static (b -> a -> c) staticFlip f = flipStatic `staticApply` f --------------------------------------------------------------------------------@@ -529,8 +520,7 @@ -------------------------------------------------------------------------------- -- | Apply a static function to a closure-closureApplyStatic :: (Typeable a, Typeable b)- => Static (a -> b) -> Closure a -> Closure b+closureApplyStatic :: Static (a -> b) -> Closure a -> Closure b closureApplyStatic f (Closure decoder env) = closure (f `staticCompose` decoder) env @@ -538,8 +528,8 @@ decodeEnvPairStatic = staticLabel "$decodeEnvPair" -- | Closure application-closureApply :: forall a b. (Typeable a, Typeable b)- => Closure (a -> b) -> Closure a -> Closure b+closureApply :: forall a b . + Closure (a -> b) -> Closure a -> Closure b closureApply (Closure fdec fenv) (Closure xdec xenv) = closure decoder (encode (fenv, xenv)) where@@ -551,11 +541,9 @@ decodeEnvPairStatic -- | Closure composition-closureCompose :: (Typeable a, Typeable b, Typeable c)- => Closure (b -> c) -> Closure (a -> b) -> Closure (a -> c)+closureCompose :: Closure (b -> c) -> Closure (a -> b) -> Closure (a -> c) closureCompose g f = composeStatic `closureApplyStatic` g `closureApply` f -- | Closure version of ('Arrow.***')-closureSplit :: (Typeable a, Typeable a', Typeable b, Typeable b')- => Closure (a -> b) -> Closure (a' -> b') -> Closure ((a, a') -> (b, b'))+closureSplit :: Closure (a -> b) -> Closure (a' -> b') -> Closure ((a, a') -> (b, b')) closureSplit f g = splitStatic `closureApplyStatic` f `closureApply` g