summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieuBoespflug <>2017-03-20 18:34:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-03-20 18:34:00 (GMT)
commite0a8744831782d070417a39c1b2e55e6bd6ff0ad (patch)
tree2522b58422eeecbae8d663c94f7d300692e3ea98
parentdb9912a70f2f403730d16c37c6ba06e0d1a61c3e (diff)
version 0.3.4.0HEAD0.3.4.0master
-rw-r--r--distributed-closure.cabal2
-rw-r--r--src/Control/Distributed/Closure/Internal.hs5
2 files changed, 6 insertions, 1 deletions
diff --git a/distributed-closure.cabal b/distributed-closure.cabal
index 10d8bc0..681e94b 100644
--- a/distributed-closure.cabal
+++ b/distributed-closure.cabal
@@ -1,5 +1,5 @@
name: distributed-closure
-version: 0.3.3.0
+version: 0.3.4.0
synopsis: Serializable closures for distributed programming.
description: See README.
homepage: https://github.com/tweag/distributed-closure
diff --git a/src/Control/Distributed/Closure/Internal.hs b/src/Control/Distributed/Closure/Internal.hs
index 553102b..ce31a12 100644
--- a/src/Control/Distributed/Closure/Internal.hs
+++ b/src/Control/Distributed/Closure/Internal.hs
@@ -56,6 +56,11 @@ data Closure a where
-- Cache the value a closure resolves to.
Closure :: a -> !(Closure a) -> Closure a
+#if MIN_VERSION_base(4,9,0)
+instance IsStatic Closure where
+ fromStaticPtr = closure
+#endif
+
-- Will be obsoleted by https://ghc.haskell.org/trac/ghc/wiki/Typeable. We use
-- our own datatype instead of Dynamic in order to support dynClosureApply.
newtype DynClosure = DynClosure Any -- invariant: only values of type Closure.