distributed-closure 0.4.2.0 → 0.5.0.0
raw patch · 6 files changed
+121/−84 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Control.Applicative.Static: instance Control.Applicative.Static.StaticApplicative Control.Distributed.Closure.Internal.Closure
- Control.Applicative.Static: staticPure :: (StaticApplicative f, Typeable a) => a -> f a
+ Control.Applicative.Static: staticPure :: (StaticApplicative f, Typeable a) => Closure a -> f a
- Control.Monad.Static: staticReturn :: (StaticApplicative m, Typeable a) => a -> m a
+ Control.Monad.Static: staticReturn :: (StaticApplicative m, Typeable a) => Closure a -> m a
Files
- LICENSE +0/−30
- LICENSE.md +30/−0
- distributed-closure.cabal +78/−51
- src/Control/Applicative/Static.hs +4/−1
- src/Control/Distributed/Closure/TH.hs +8/−1
- src/Control/Monad/Static.hs +1/−1
− LICENSE
@@ -1,30 +0,0 @@-Copyright (c) 2015, Tweag I/O Limited--All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:-- * Redistributions of source code must retain the above copyright- notice, this list of conditions and the following disclaimer.-- * Redistributions in binary form must reproduce the above- copyright notice, this list of conditions and the following- disclaimer in the documentation and/or other materials provided- with the distribution.-- * Neither the name of Mathieu Boespflug nor the names of other- contributors may be used to endorse or promote products derived- from this software without specific prior written permission.--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ LICENSE.md view
@@ -0,0 +1,30 @@+Copyright (c) 2015, Tweag I/O Limited++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of Mathieu Boespflug nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
distributed-closure.cabal view
@@ -1,62 +1,89 @@-name: distributed-closure-version: 0.4.2.0-synopsis: Serializable closures for distributed programming.-description: See README.-homepage: https://github.com/tweag/distributed-closure-license: BSD3-license-file: LICENSE-author: Mathieu Boespflug-maintainer: m@tweag.io-copyright: © Tweag I/O Limited-category: Control-build-type: Simple-extra-source-files: README.md-cabal-version: >=1.10+name: distributed-closure+version: 0.5.0.0+synopsis: Serializable closures for distributed programming.+description: See README.+homepage: https://github.com/tweag/distributed-closure+license: BSD3+license-file: LICENSE.md+author: Mathieu Boespflug+maintainer: m@tweag.io+copyright: © Tweag I/O Limited+category: Control+build-type: Simple+extra-source-files: README.md+cabal-version: >=1.10 source-repository head- type: git+ type: git location: https://github.com/tweag/distributed-closure +flag dev+ description: Turn on development settings.+ manual: True+ default: False+ library- exposed-modules: Control.Applicative.Static- Control.Comonad.Static- Control.Distributed.Closure- Control.Distributed.Closure.Internal- Control.Distributed.Closure.TH- Control.Monad.Static- Data.Profunctor.Static- Data.Profunctor.Choice.Static- Data.Profunctor.Strong.Static- Data.Functor.Static- build-depends: base >=4.11 && <5- , binary >= 0.7.5- , bytestring >= 0.10- , constraints >= 0.4- , syb >= 0.5- , template-haskell >= 2.10- hs-source-dirs: src- default-language: Haskell2010- ghc-options: -Wall+ exposed-modules:+ Control.Applicative.Static+ Control.Comonad.Static+ Control.Distributed.Closure+ Control.Distributed.Closure.Internal+ Control.Distributed.Closure.TH+ Control.Monad.Static+ Data.Profunctor.Static+ Data.Profunctor.Choice.Static+ Data.Profunctor.Strong.Static+ Data.Functor.Static+ build-depends:+ base >=4.11 && <5,+ binary >= 0.7.5,+ bytestring >= 0.10,+ constraints >= 0.4,+ syb >= 0.5,+ template-haskell >= 2.10+ hs-source-dirs: src+ default-language: Haskell2010+ if flag(dev)+ ghc-options: -Wall -Werror -Wcompat+ -Wincomplete-record-updates+ -Wincomplete-uni-patterns+ -Wnoncanonical-monad-instances+ else+ ghc-options: -Wall test-suite tests- type: exitcode-stdio-1.0+ type: exitcode-stdio-1.0 default-language: Haskell2010- hs-source-dirs: tests- main-is: test.hs- ghc-options: -Wall- Build-Depends: base >= 4.8,- binary >= 0.7,- distributed-closure,- hspec >= 2.1,- QuickCheck >= 2.8+ hs-source-dirs: tests+ main-is: test.hs+ build-depends:+ base >= 4.8,+ binary >= 0.7,+ distributed-closure,+ hspec >= 2.1,+ QuickCheck >= 2.8+ if flag(dev)+ ghc-options: -Wall -Werror -Wcompat+ -Wincomplete-record-updates+ -Wincomplete-uni-patterns+ -Wnoncanonical-monad-instances+ else+ ghc-options: -Wall executable example-client-server- main-is: ClientServer.hs- hs-source-dirs: examples+ main-is: ClientServer.hs+ hs-source-dirs: examples default-language: Haskell2010- ghc-options: -Wall- build-depends: base >= 4.8- , async >= 2.1- , binary >= 0.7- , bytestring >= 0.10- , distributed-closure+ build-depends:+ base >= 4.8,+ async >= 2.1,+ binary >= 0.7,+ bytestring >= 0.10,+ distributed-closure+ if flag(dev)+ ghc-options: -Wall -Werror -Wcompat+ -Wincomplete-record-updates+ -Wincomplete-uni-patterns+ -Wnoncanonical-monad-instances+ else+ ghc-options: -Wall
src/Control/Applicative/Static.hs view
@@ -20,7 +20,10 @@ -> f b class StaticApply f => StaticApplicative f where- staticPure :: Typeable a => a -> f a+ staticPure :: Typeable a => Closure a -> f a instance StaticApply Closure where staticApply = cap++instance StaticApplicative Closure where+ staticPure = id
src/Control/Distributed/Closure/TH.hs view
@@ -117,7 +117,14 @@ f <- mangleName <$> TH.newName "static_helper" fbody <- foldr (\_ body -> [| \Dict -> $body |]) [| Dict |] cxt let tyf = foldr (\a b -> TH.ArrowT `TH.AppT` a `TH.AppT` b) retsig dictsigs- sigf = TH.SigD f (TH.ForallT (map TH.PlainTV (fvT tyf)) [] tyf)+#if MIN_VERSION_template_haskell(2,16,0)+ specifiedPlainTV :: TH.Name -> TH.TyVarBndr TH.Specificity+ specifiedPlainTV n = TH.PlainTV n TH.SpecifiedSpec+#else+ specifiedPlainTV :: TH.Name -> TH.TyVarBndr+ specifiedPlainTV = TH.PlainTV+#endif+ sigf = TH.SigD f (TH.ForallT (map specifiedPlainTV (fvT tyf)) [] tyf) declf = TH.ValD (TH.VarP f) (TH.NormalB fbody) [] methods <- (:[]) <$> TH.valD
src/Control/Monad/Static.hs view
@@ -36,7 +36,7 @@ class (StaticApplicative m, StaticBind m) => StaticMonad m instance (StaticApplicative m, StaticBind m) => StaticMonad m -staticReturn :: (StaticApplicative m, Typeable a) => a -> m a+staticReturn :: (StaticApplicative m, Typeable a) => Closure a -> m a staticReturn = staticPure instance StaticBind Closure where