distributed-closure 0.4.1.1 → 0.4.2.0
raw patch · 4 files changed
+34/−8 lines, 4 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Control.Distributed.Closure: instance (Control.Distributed.Closure.Static c1, Control.Distributed.Closure.Static c2, Control.Distributed.Closure.Static c3, Control.Distributed.Closure.Static c4, Control.Distributed.Closure.Static c5, Control.Distributed.Closure.Static c6, Data.Typeable.Internal.Typeable c1, Data.Typeable.Internal.Typeable c2, Data.Typeable.Internal.Typeable c3, Data.Typeable.Internal.Typeable c4, Data.Typeable.Internal.Typeable c5, Data.Typeable.Internal.Typeable c6, (c1, c2, c3, c4, c5, c6)) => Control.Distributed.Closure.Static (c1, c2, c3, c4, c5, c6)
+ Control.Distributed.Closure: instance (Control.Distributed.Closure.Static c1, Control.Distributed.Closure.Static c2, Control.Distributed.Closure.Static c3, Control.Distributed.Closure.Static c4, Control.Distributed.Closure.Static c5, Data.Typeable.Internal.Typeable c1, Data.Typeable.Internal.Typeable c2, Data.Typeable.Internal.Typeable c3, Data.Typeable.Internal.Typeable c4, Data.Typeable.Internal.Typeable c5, (c1, c2, c3, c4, c5)) => Control.Distributed.Closure.Static (c1, c2, c3, c4, c5)
+ Control.Distributed.Closure: instance (Control.Distributed.Closure.Static c1, Control.Distributed.Closure.Static c2, Control.Distributed.Closure.Static c3, Control.Distributed.Closure.Static c4, Data.Typeable.Internal.Typeable c1, Data.Typeable.Internal.Typeable c2, Data.Typeable.Internal.Typeable c3, Data.Typeable.Internal.Typeable c4, (c1, c2, c3, c4)) => Control.Distributed.Closure.Static (c1, c2, c3, c4)
+ Control.Distributed.Closure: instance (Control.Distributed.Closure.Static c1, Control.Distributed.Closure.Static c2, Control.Distributed.Closure.Static c3, Data.Typeable.Internal.Typeable c1, Data.Typeable.Internal.Typeable c2, Data.Typeable.Internal.Typeable c3, (c1, c2, c3)) => Control.Distributed.Closure.Static (c1, c2, c3)
Files
- README.md +1/−1
- distributed-closure.cabal +2/−2
- src/Control/Distributed/Closure.hs +30/−4
- src/Control/Distributed/Closure/TH.hs +1/−1
README.md view
@@ -1,6 +1,6 @@ # distributed-closure -[](https://travis-ci.org/tweag/distributed-closure)+[](https://buildkite.com/tweag-1/distributed-closure) Leverage the `-XStaticPointers` [extension][staticpointers-extension] from GHC 7.10 onwards for distributed programming using lightweight
distributed-closure.cabal view
@@ -1,5 +1,5 @@ name: distributed-closure-version: 0.4.1.1+version: 0.4.2.0 synopsis: Serializable closures for distributed programming. description: See README. homepage: https://github.com/tweag/distributed-closure@@ -28,7 +28,7 @@ Data.Profunctor.Choice.Static Data.Profunctor.Strong.Static Data.Functor.Static- build-depends: base >=4.8 && <5+ build-depends: base >=4.11 && <5 , binary >= 0.7.5 , bytestring >= 0.10 , constraints >= 0.4
src/Control/Distributed/Closure.hs view
@@ -62,11 +62,37 @@ closureDict :: Closure (Dict c) instance (Static c1, Static c2, Typeable c1, Typeable c2, (c1, c2)) => Static (c1, c2) where- closureDict = static pairDict `cap` closureDict `cap` closureDict+ closureDict = static f `cap` closureDict `cap` closureDict+ where+ f :: Dict c1 -> Dict c2 -> Dict (c1, c2)+ f Dict Dict = Dict --- Needs to be defined at top-level for GHC <8.4 compat.-pairDict :: Dict c1 -> Dict c2 -> Dict (c1, c2)-pairDict Dict Dict = Dict+instance (Static c1, Static c2, Static c3, Typeable c1, Typeable c2, Typeable c3, (c1, c2, c3)) => Static (c1, c2, c3) where+ closureDict = static f `cap` closureDict `cap` closureDict `cap` closureDict+ where+ f :: Dict c1 -> Dict c2 -> Dict c3 -> Dict (c1, c2, c3)+ f Dict Dict Dict = Dict++instance (Static c1, Static c2, Static c3, Static c4, Typeable c1, Typeable c2, Typeable c3, Typeable c4, (c1, c2, c3, c4)) => Static (c1, c2, c3, c4) where+ closureDict = static f `cap` closureDict `cap` closureDict `cap` closureDict `cap` closureDict+ where+ f :: Dict c1 -> Dict c2 -> Dict c3 -> Dict c4 -> Dict (c1, c2, c3, c4)+ f Dict Dict Dict Dict = Dict++instance (Static c1, Static c2, Static c3, Static c4, Static c5, Typeable c1, Typeable c2, Typeable c3, Typeable c4, Typeable c5, (c1, c2, c3, c4, c5)) => Static (c1, c2, c3, c4, c5) where+ closureDict = static f `cap` closureDict `cap` closureDict `cap` closureDict `cap` closureDict `cap` closureDict+ where+ f :: Dict c1 -> Dict c2 -> Dict c3 -> Dict c4 -> Dict c5 -> Dict (c1, c2, c3, c4, c5)+ f Dict Dict Dict Dict Dict = Dict++instance (Static c1, Static c2, Static c3, Static c4, Static c5, Static c6, Typeable c1, Typeable c2, Typeable c3, Typeable c4, Typeable c5, Typeable c6, (c1, c2, c3, c4, c5, c6)) => Static (c1, c2, c3, c4, c5, c6) where+ closureDict = static f `cap` closureDict `cap` closureDict `cap` closureDict `cap` closureDict `cap` closureDict `cap` closureDict+ where+ f :: Dict c1 -> Dict c2 -> Dict c3 -> Dict c4 -> Dict c5 -> Dict c6 -> Dict (c1, c2, c3, c4, c5, c6)+ f Dict Dict Dict Dict Dict Dict = Dict++-- instance (Static c1, Static c2, Typeable c1, Typeable c2, (c1, c2)) => Static (c1, c2) where+-- closureDict = static pairDict `cap` closureDict `cap` closureDict -- | A newtype-wrapper useful for defining instances of classes indexed by -- higher-kinded types.
src/Control/Distributed/Closure/TH.hs view
@@ -75,7 +75,7 @@ TH.NameU u -> TH.Name (mangle_occ u) fl _ -> name where- mangle_occ :: Int -> TH.OccName+ mangle_occ :: TH.Uniq -> TH.OccName mangle_occ uniq = TH.mkOccName (TH.occString occ ++ "_" ++ show uniq) -- | Auto-generates the 'Static' instances corresponding to the given class