diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f75fb7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +dist/ +.cabal-sandbox +cabal.sandbox.config +.stack* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7a4f3ee --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +See https://github.com/haskell-distributed/cloud-haskell/blob/master/CONTRIBUTING.md. diff --git a/Makefile b/Makefile deleted file mode 100644 index ed740f0..0000000 --- a/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# CI build - -GHC ?= $(shell which ghc) -CABAL ?= $(shell which cabal) - -BASE_GIT := git://github.com/haskell-distributed -REPOS=$(shell cat REPOS | sed '/^$$/d') - -.PHONY: all -all: $(REPOS) - -$(REPOS): - git clone $(BASE_GIT)/$@.git - -.PHONY: install -install: $(REPOS) - $(CABAL) install --with-ghc=$(GHC) $(REPOS) --reinstall - $(CABAL) install - -.PHONY: ci -ci: install test - -.PHONY: test -test: - $(CABAL) configure --enable-tests - $(CABAL) build - $(CABAL) test --show-details=always diff --git a/README.md b/README.md index c31fb38..27a37cf 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,16 @@ -### distributed-process-demos +# distributed-process-demos +[![travis](https://secure.travis-ci.org/haskell-distributed/distributed-process-demos.png)](http://travis-ci.org/haskell-distributed/distributed-process-demos) +[![Release](https://img.shields.io/hackage/v/distributed-process-demos.svg)](https://hackage.haskell.org/package/distributed-process-demos) This repository is part of Cloud Haskell. See http://haskell-distributed.github.com for documentation, user guides, tutorials and assistance. -### Getting Help / Raising Issues +## Getting Help / Raising Issues -Please visit our [bug tracker](http://cloud-haskell.atlassian.net) to submit -issues. Anyone can browse, although you'll need to provide an email address -and create an account in order to submit new issues. +Please visit the [bug tracker](https://github.com/haskell-distributed/distributed-process-demos/issues) to submit issues. You can contact the distributed-haskell@googlegroups.com mailing list for help and comments. -If you'd like to talk to a human, please contact us at the parallel-haskell -mailing list in the first instance - parallel-haskell@googlegroups.com. +## License -### License - -distributed-process-demos is made available under a BSD-3 license. +This package is made available under a 3-clause BSD-style license. diff --git a/distributed-process-demos.cabal b/distributed-process-demos.cabal index d29bb68..b2b7436 100644 --- a/distributed-process-demos.cabal +++ b/distributed-process-demos.cabal @@ -1,10 +1,10 @@ --- Initial distributed-process-demos.cabal generated by cabal init. For +-- Initial distributed-process-demos.cabal generated by cabal init. For -- further documentation, see http://haskell.org/cabal/users-guide/ name: distributed-process-demos version: 0.1.0.0 synopsis: Cloud Haskell Demo Applications --- description: +-- description: homepage: http://haskell-distributed.github.com license: BSD3 license-file: LICENSE @@ -17,7 +17,7 @@ cabal-version: >=1.8 flag use-simplelocalnet description: Use the SimpleLocalnet backend - default: True + default: True flag use-azure description: Use the Azure backend @@ -25,25 +25,25 @@ flag use-azure executable distributed-process-simplelocalnet-masterslave main-is: SimpleLocalnet.hs - other-modules: MasterSlave + other-modules: MasterSlave PrimeFactors hs-source-dirs: src/MasterSlave src/Common - build-depends: base ==4.5.*, + build-depends: base >=4.5 && <5, distributed-process >= 0.3.2 extensions: BangPatterns, CPP, TemplateHaskell ghc-options: -Wall if flag(use-simplelocalnet) build-depends: distributed-process-simplelocalnet cpp-options: -DUSE_SIMPLELOCALNET - else + else buildable: False executable distributed-process-azure-masterslave main-is: Azure.hs - other-modules: MasterSlave + other-modules: MasterSlave PrimeFactors hs-source-dirs: src/MasterSlave src/Common - build-depends: base ==4.5.*, + build-depends: base >=4.5 && <5, distributed-process >= 0.3.2 extensions: BangPatterns, CPP, TemplateHaskell ghc-options: -Wall @@ -58,14 +58,14 @@ executable distributed-process-simplelocalnet-workpushing other-modules: WorkPushing PrimeFactors hs-source-dirs: src/WorkPushing src/Common - build-depends: base ==4.5.*, + build-depends: base >=4.5 && <5, distributed-process >= 0.3.2 extensions: BangPatterns, CPP, TemplateHaskell ghc-options: -Wall if flag(use-simplelocalnet) build-depends: distributed-process-simplelocalnet cpp-options: -DUSE_SIMPLELOCALNET - else + else buildable: False executable distributed-process-azure-workpushing @@ -73,7 +73,7 @@ executable distributed-process-azure-workpushing other-modules: WorkPushing PrimeFactors hs-source-dirs: src/WorkPushing src/Common - build-depends: base ==4.5.*, + build-depends: base >=4.5 && <5, distributed-process >= 0.3.2 extensions: BangPatterns, CPP, TemplateHaskell ghc-options: -Wall @@ -88,14 +88,14 @@ executable distributed-process-simplelocalnet-typedworkpushing other-modules: TypedWorkPushing PrimeFactors hs-source-dirs: src/TypedWorkPushing src/Common - build-depends: base ==4.5.*, + build-depends: base >=4.5 && <5, distributed-process >= 0.3.2 extensions: BangPatterns, CPP, TemplateHaskell ghc-options: -Wall if flag(use-simplelocalnet) build-depends: distributed-process-simplelocalnet cpp-options: -DUSE_SIMPLELOCALNET - else + else buildable: False executable distributed-process-azure-typedworkpushing @@ -103,7 +103,7 @@ executable distributed-process-azure-typedworkpushing other-modules: TypedWorkPushing PrimeFactors hs-source-dirs: src/TypedWorkPushing src/Common - build-depends: base ==4.5.*, + build-depends: base >=4.5 && <5, distributed-process >= 0.3.2 extensions: BangPatterns, CPP, TemplateHaskell ghc-options: -Wall @@ -118,14 +118,14 @@ executable distributed-process-simplelocalnet-workstealing other-modules: WorkStealing PrimeFactors hs-source-dirs: src/WorkStealing src/Common - build-depends: base ==4.5.*, + build-depends: base >=4.5 && <5, distributed-process >= 0.3.2 extensions: BangPatterns, CPP, TemplateHaskell ghc-options: -Wall if flag(use-simplelocalnet) build-depends: distributed-process-simplelocalnet cpp-options: -DUSE_SIMPLELOCALNET - else + else buildable: False executable distributed-process-simplelocalnet-mapreduce @@ -136,19 +136,22 @@ executable distributed-process-simplelocalnet-mapreduce MonoDistrMapReduce PolyDistrMapReduce hs-source-dirs: src/MapReduce - build-depends: base ==4.5.*, + build-depends: base >=4.5 && <5, distributed-process >= 0.3.2, - distributed-static >= 0.2.0 && < 0.3, + distributed-static >= 0.2.0, containers >= 0.4 && < 0.6, bytestring >= 0.9 && < 0.11, - binary >= 0.5 && < 0.7, - array >= 0.4 && < 0.5, - random >= 1.0 && < 1.1 - extensions: BangPatterns, CPP, TemplateHaskell, ScopedTypeVariables + binary >= 0.5 && < 0.8, + array >= 0.4 && < 0.6, + random >= 1.0 && < 1.2 + extensions: BangPatterns + CPP + KindSignatures + ScopedTypeVariables + TemplateHaskell ghc-options: -Wall -rtsopts -with-rtsopts=-K64M if flag(use-simplelocalnet) build-depends: distributed-process-simplelocalnet cpp-options: -DUSE_SIMPLELOCALNET - else + else buildable: False - diff --git a/src/MapReduce/CountWords.hs b/src/MapReduce/CountWords.hs index a343837..7885685 100644 --- a/src/MapReduce/CountWords.hs +++ b/src/MapReduce/CountWords.hs @@ -10,6 +10,7 @@ import Control.Distributed.Process import Control.Distributed.Process.Closure import MapReduce import MonoDistrMapReduce hiding (__remoteTable) +import Prelude hiding (Word) type Document = String type Word = String @@ -31,4 +32,3 @@ remotable ['countWords_] distrCountWords :: [NodeId] -> Map FilePath Document -> Process (Map Word Frequency) distrCountWords = distrMapReduce ($(mkClosure 'countWords_) ()) -