packages feed

distributed-closure 0.3.1.0 → 0.3.2.0

raw patch · 4 files changed

+35/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

README.md view
@@ -2,5 +2,33 @@  [![Build Status](https://travis-ci.org/tweag/distributed-closure.svg)](https://travis-ci.org/tweag/distributed-closure) -Leverage the `-XStaticPointers` extension from GHC 7.10 onwards for-distributed programming using lightweight serializable closures.+Leverage the `-XStaticPointers` [extension][staticpointers-extension]+from GHC 7.10 onwards for distributed programming using lightweight+serializable closures. This package implements a *serializable+closure* abstraction on top of static pointers. Serializable closures+can be shipped around a computer cluster. This is useful for+implementing intuitive and modular distributed applications. See+[this blog post][ocharles-static-pointers] for a hands on introduction+and [this paper][ch-paper] for the original motivation.++[staticpointers-extension]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#static-pointers+[ocharles-static-pointers]: https://ocharles.org.uk/blog/guest-posts/2014-12-23-static-pointers.html+[ch-paper]: http://research.microsoft.com/en-us/um/people/simonpj/papers/parallel/remote.pdf++# Example++In GHC 8 and above, remoting a computation on another node using this+library goes along the lines of++```Haskell+hello :: String -> IO ()+hello name = putStrLn ("Hello, " ++ name)++main = do+  name <- getLine+  spawn "someAddress" (static hello `cap` name)+```++`distributed-closure` does not implement sending/receiving/spawning+closures - that's left for higher-level frameworks. Only closure+composition and (de)serialization.
distributed-closure.cabal view
@@ -1,5 +1,5 @@ name:                distributed-closure-version:             0.3.1.0+version:             0.3.2.0 synopsis:            Serializable closures for distributed programming. description:         See README. homepage:            https://github.com/tweag/distributed-closure
src/Control/Distributed/Closure.hs view
@@ -1,6 +1,6 @@ -- | Serializable closures for distributed programming. This package builds -- a "remotable closure" abstraction on top of--- <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/static-pointers.html static pointers>.+-- <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#static-pointers static pointers>. -- See -- <https://ocharles.org.uk/blog/guest-posts/2014-12-23-static-pointers.html this blog post> -- for a longer introduction.
src/Control/Distributed/Closure/Internal.hs view
@@ -10,7 +10,9 @@ -- guarantees whatsoever. Use at your own risks.  {-# OPTIONS_GHC -funbox-strict-fields #-}+#if !MIN_VERSION_binary(0,7,6) {-# OPTIONS_GHC -fno-warn-orphans #-} -- for binary < 0.7.6 compat.+#endif #if __GLASGOW_HASKELL__ >= 800 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} #endif@@ -32,7 +34,7 @@ import Data.Typeable (Typeable) import Data.ByteString.Lazy (ByteString) import GHC.Base (Any)-#if __GLASGOW_HASKELL__ < 800+#if !MIN_VERSION_binary(0,7,6) import GHC.Fingerprint #endif import GHC.StaticPtr