Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit 909f4b6

Browse files
committed
Merge remote-tracking branch 'distributed-process/master'
2 parents de38a1f + 472ee72 commit 909f4b6

File tree

222 files changed

+44044
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+44044
-0
lines changed

.github/workflows/cabal.yml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Continuous integration
2+
3+
on:
4+
push:
5+
branches: ['master']
6+
paths-ignore:
7+
- 'README.md'
8+
- 'CONTRIBUTING.md'
9+
pull_request:
10+
branches: ['master']
11+
12+
jobs:
13+
continuous-integration:
14+
# You can skip continuous integration by writing '[ci skip]' or '[skip ci]' in a commit message,
15+
# which is useful to preserve computing resources
16+
#
17+
# For example:
18+
# > git commit -am "[skip ci] fixed x y z"
19+
if: contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- ghc-version: "8.10.7"
25+
cabal-flags: ""
26+
- ghc-version: "9.0.2"
27+
cabal-flags: ""
28+
- ghc-version: "9.2.8"
29+
cabal-flags: ""
30+
- ghc-version: "9.4.5"
31+
cabal-flags: ""
32+
- ghc-version: "9.6.4"
33+
cabal-flags: ""
34+
- ghc-version: "9.8.2"
35+
cabal-flags: ""
36+
- ghc-version: "9.10.1"
37+
cabal-flags: ""
38+
# Temporary cabal flags until all dependencies are updated
39+
- ghc-version: "9.12.1"
40+
cabal-flags: "--allow-newer=base --allow-newer=template-haskell --allow-newer=ghc-prim"
41+
42+
runs-on: "ubuntu-latest"
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- name: Install cabal/ghc
48+
uses: haskell-actions/setup@v2
49+
id: setup-haskell
50+
with:
51+
ghc-version: ${{ matrix.ghc-version }}
52+
cabal-version: '3.12.1.0'
53+
54+
- name: Generate freeze file
55+
run: |
56+
cabal configure --enable-tests --test-show-details=direct
57+
cabal freeze ${{matrix.cabal-flags}} --minimize-conflict-set
58+
cat cabal.project.freeze
59+
60+
- name: Cache cabal work
61+
uses: actions/cache@v4
62+
with:
63+
path: |
64+
dist-newstyle
65+
${{ steps.setup-haskell.outputs.cabal-store }}
66+
# We are using the hash of 'cabal.project.local' so that different levels
67+
# of optimizations are cached separately
68+
key: ${{ runner.os }}-${{ hashFiles('cabal.project', 'cabal.project.local') }}-cabal-install
69+
70+
- name: Build dependencies only
71+
run: cabal build all --only-dependencies ${{matrix.cabal-flags}}
72+
73+
- name: Build all packages
74+
run: cabal build all ${{matrix.cabal-flags}}
75+
76+
- name: Run all tests
77+
run: cabal test all ${{matrix.cabal-flags}}

.gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
dist
2+
dist-*
3+
cabal-dev
4+
*.o
5+
*.hi
6+
*.hie
7+
*.chi
8+
*.chs.h
9+
*.dyn_o
10+
*.dyn_hi
11+
.hpc
12+
.hsenv
13+
.cabal-sandbox/
14+
cabal.sandbox.config
15+
*.prof
16+
*.aux
17+
*.hp
18+
*.eventlog
19+
.stack-work/
20+
cabal.project.local
21+
cabal.project.local~
22+
.HTF/
23+
.ghc.environment.*
24+
.*.swo
25+
.*.swp
26+
_site
27+
.DS_Store

CONTRIBUTING.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Cloud Haskell contributor guidelines
2+
3+
## Building
4+
5+
After cloning, you should be able to build all packages in this repository like so:
6+
7+
```
8+
$ cabal build all
9+
```
10+
11+
You can also build a specific package like so:
12+
13+
```
14+
cabal build <some-package>
15+
```
16+
17+
You can have more control over the behavior of `cabal` by configuring, first. For example, if you want to disable optimizations for faster compilation:
18+
19+
```
20+
$ cabal configure --disable-optimization
21+
$ cabal build all
22+
```
23+
24+
The allowed arguments for `cabal configure` are [documented here](https://cabal.readthedocs.io/en/stable/cabal-project-description-file.html#global-configuration-options).
25+
26+
Tests for all packages can be run with:
27+
28+
```
29+
$ cabal test all
30+
```
31+
32+
or again, you can test a specific package `<some-package>` using:
33+
34+
```
35+
$ cabal test <some-package>
36+
```
37+
38+
### Building with specific dependencies
39+
40+
Often, we want to build a package with a specific version of a dependency, for testing or debugging purposes. In this case, recall that you can always constrain cabal using the `--constraint` flag. For example, if I want to build `distributed-process-async` with `async==2.2.5`:
41+
42+
```
43+
$ cabal build distributed-process-async --constraint="async==2.2.5"
44+
```
45+
46+
## Contributing changes upstream
47+
48+
To contribute changes, you first need a fork. First, fork the `distributed-process` repository following the [instructions here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo).
49+
50+
Then publish branches:
51+
52+
```
53+
$ cabal test all # Check that everything works before proceeding.
54+
$ git push --set-upstream <username> <branch-name>
55+
```
56+
57+
Then you can [create a pull-request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) to contribute changes back to `distributed-process`.

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# distributed-process
2+
[![Release](https://img.shields.io/hackage/v/distributed-process.svg)](https://hackage.haskell.org/package/distributed-process)
3+
4+
This repository contains an implementation of Cloud Haskell. This includes the core library, `distributed-process`, as well as many other supporting libraries.
5+
6+
See http://haskell-distributed.github.io for documentation, user guides, tutorials and assistance.
7+
8+
## Getting Help / Raising Issues
9+
10+
Please visit the [bug tracker](https://github.com/haskell-distributed/distributed-process/issues) to submit issues and ask questions.
11+
12+
## Contributing
13+
14+
Contributions are very welcome! See `CONTRIBUTING.md` for more information.
15+
Do not hesitate to [raise an issue]((https://github.com/haskell-distributed/distributed-process/issues)) if instructions are unclear; we want to make it as easy as possible for the community to get involved.
16+
17+
## License
18+
19+
This package is made available under a 3-clause BSD-style license.

cabal.project

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
packages: packages/*/**.cabal
2+
3+
package distributed-process-tests
4+
flags: +tcp

flake.lock

+45
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
description = ''
3+
This is an implementation of Cloud Haskell, as described in
4+
/Towards Haskell in the Cloud/ by Jeff Epstein, Andrew Black,
5+
and Simon Peyton Jones
6+
(<http://research.microsoft.com/en-us/um/people/simonpj/papers/parallel/>),
7+
although some of the details are different. The precise message
8+
passing semantics are based on /A unified semantics for future Erlang/
9+
by Hans Svensson, Lars-&#xc5;ke Fredlund and Clara Benac Earle.
10+
'';
11+
12+
inputs = {
13+
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
14+
rank1dynamic-src = {
15+
flake = false;
16+
url = "github:haskell-distributed/rank1dynamic/53c5453121592453177370daa06f098cb014c0d3";
17+
};
18+
};
19+
20+
outputs = {
21+
self,
22+
nixpkgs,
23+
rank1dynamic-src
24+
}: let
25+
forAllSystems = function: nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: function rec {
26+
inherit system;
27+
compilerVersion = "ghc945";
28+
pkgs = nixpkgs.legacyPackages.${system};
29+
hsPkgs = pkgs.haskell.packages.${compilerVersion}.override {
30+
overrides = hfinal: hprev: {
31+
# Internal Packages
32+
distributed-process = hfinal.callCabal2nix "distributed-process" ./. {};
33+
34+
# External Packages
35+
rank1dynamic = hfinal.callCabal2nix "rank1dynamic" rank1dynamic-src {};
36+
};
37+
};
38+
});
39+
in {
40+
formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra);
41+
42+
# nix develop
43+
devShells = forAllSystems ({hsPkgs, pkgs, ...}: {
44+
default = hsPkgs.shellFor {
45+
name = "distributed-process";
46+
packages = p: [
47+
p.distributed-process
48+
];
49+
buildInputs = with pkgs;
50+
[
51+
hsPkgs.haskell-language-server
52+
hsPkgs.cabal-install
53+
cabal2nix
54+
haskellPackages.ghcid
55+
];
56+
};
57+
});
58+
};
59+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2025-02-04 Laurent P. René de Cotret <[email protected]> 0.2.11
2+
3+
* Ported test suite to use `tasty` rather than `test-framework`.
4+
* Removed unused dependencies (#467)
5+
6+
2024-10-30 David Simmons-Duffin <[email protected]> 0.2.10
7+
8+
* Bump dependency bound for ansi-terminal
9+
10+
2024-10-30 Laurent P. René de Cotret <[email protected]> 0.2.9
11+
12+
* Removed dependency on `rematch` (#459)
13+
14+
2024-09-03 Laurent P. René de Cotret <[email protected]> 0.2.8
15+
16+
* Bumped dependency bounds to support GHC 8.10.7 - GHC 9.10.1
17+
* Updated links to point to Distributed Haskell monorepo
18+
19+
2024-03-25 David Simmons-Duffin <[email protected]> 0.2.7
20+
21+
* Bump dependencies to build with ghc-9.8.
22+
23+
2018-06-14 Alexander Vershilov <[email protected]> 0.2.6
24+
25+
* Update dependency bounds
26+
* Export all documented functions (Issue #9)
27+
28+
2016-02-16 Facundo Domínguez <[email protected]> 0.2.3
29+
30+
* Update dependency bounds.
31+
32+
# HEAD
33+
34+
* Added initial GenServer module
35+
* Added Timer Module
36+
* Moved time functions into Time.hs
37+
* Added Async API
38+
* Added GenProcess API (subsumes lower level GenServer API)
39+
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Copyright Tim Watson, 2012-2013.
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above
12+
copyright notice, this list of conditions and the following
13+
disclaimer in the documentation and/or other materials provided
14+
with the distribution.
15+
16+
* Neither the name of the author nor the names of other
17+
contributors may be used to endorse or promote products derived
18+
from this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MAJOR TODOs (in no particular order)
2+
3+
- implement Observable for Mailbox
4+
- implement PCopy / pcopy :: PCopy a -> Process () and precv :: Process (Maybe (PCopy a))
5+
- provide InputChannel for PCopy data, i.e.:
6+
7+
data InputChannel a = ReadChan (ReceivePort a) | ReadSTM (STM a)
8+
9+
read (ReadChan rp) = expectChan rp
10+
read (ReadSTM stm) = liftIO $ atomically stm
11+
12+
offer
13+
14+
- implement RoundRobinRouter, ContentBasedRouter
15+
- finish off ResourcePool
16+
- double check we're using NFSerializable where possible/necessary
17+
18+
- implement LocalRegistry (?)
19+
- possibly rationalise Registry with LocalRegistry (?)
20+
- Health checks for services
21+
- Service Monitoring
22+

0 commit comments

Comments
 (0)