packages feed

distributed-static 0.1.0.0 → 0.2.0.0

raw patch · 2 files changed

+12/−6 lines, 2 filesdep ~containersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: containers

API changes (from Hackage documentation)

- Control.Distributed.Static: Closure :: (Static (ByteString -> a)) -> ByteString -> Closure a
+ Control.Distributed.Static: closure :: Static (ByteString -> a) -> ByteString -> Closure a

Files

distributed-static.cabal view
@@ -1,5 +1,5 @@ Name:                distributed-static-Version:             0.1.0.0+Version:             0.2.0.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:@@ -28,7 +28,7 @@   Exposed-Modules:     Control.Distributed.Static   Build-Depends:       base >= 4 && < 5,                        rank1dynamic >= 0.1 && < 0.2,-                       containers >= 0.4 && < 0.5,+                       containers >= 0.4 && < 0.6,                        bytestring >= 0.9 && < 0.11,                        binary >= 0.5 && < 0.6    HS-Source-Dirs:      src
src/Control/Distributed/Static.hs view
@@ -206,7 +206,8 @@   , staticSplit   , staticConst     -- * Closures-  , Closure(Closure)+  , Closure+  , closure     -- * Derived closure combinators   , staticClosure   , closureApplyStatic@@ -345,6 +346,11 @@   put (Closure static env) = put static >> put env   get = Closure <$> get <*> get  +closure :: Static (ByteString -> a) -- ^ Decoder+        -> ByteString               -- ^ Encoded closure environment+        -> Closure a+closure = Closure        + -- | Resolve a closure unclosure :: Typeable a => RemoteTable -> Closure a -> Either String a unclosure rtable (Closure static env) = do @@ -353,7 +359,7 @@  -- | Convert a static value into a closure. staticClosure :: Typeable a => Static a -> Closure a-staticClosure static = Closure (staticConst static) empty+staticClosure static = closure (staticConst static) empty  -------------------------------------------------------------------------------- -- Predefined static values                                                   --@@ -406,7 +412,7 @@ closureApplyStatic :: (Typeable a, Typeable b)                    => Static (a -> b) -> Closure a -> Closure b closureApplyStatic f (Closure decoder env) = -  Closure (f `staticCompose` decoder) env+  closure (f `staticCompose` decoder) env  decodeEnvPairStatic :: Static (ByteString -> (ByteString, ByteString)) decodeEnvPairStatic = staticLabel "$decodeEnvPair"@@ -415,7 +421,7 @@ closureApply :: forall a b. (Typeable a, Typeable b)              => Closure (a -> b) -> Closure a -> Closure b closureApply (Closure fdec fenv) (Closure xdec xenv) = -    Closure decoder (encode (fenv, xenv))+    closure decoder (encode (fenv, xenv))   where     decoder :: Static (ByteString -> b)     decoder = appStatic