Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #374 from JonathanLorimer/jonathan/add-nix-shell
Add nix-shell and hie.yaml for development purposes
- Loading branch information
Showing
4 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
dist/ | ||
dist-newstyle/ | ||
.cabal-sandbox | ||
cabal.sandbox.config | ||
.stack* | ||
stack.yaml.lock |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
description = '' | ||
This is an implementation of Cloud Haskell, as described in | ||
/Towards Haskell in the Cloud/ by Jeff Epstein, Andrew Black, | ||
and Simon Peyton Jones | ||
(<http://research.microsoft.com/en-us/um/people/simonpj/papers/parallel/>), | ||
although some of the details are different. The precise message | ||
passing semantics are based on /A unified semantics for future Erlang/ | ||
by Hans Svensson, Lars-Åke Fredlund and Clara Benac Earle. | ||
''; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
rank1dynamic-src = { | ||
flake = false; | ||
url = "github:haskell-distributed/rank1dynamic/53c5453121592453177370daa06f098cb014c0d3"; | ||
}; | ||
}; | ||
|
||
outputs = { | ||
self, | ||
nixpkgs, | ||
rank1dynamic-src | ||
}: let | ||
forAllSystems = function: nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: function rec { | ||
inherit system; | ||
compilerVersion = "ghc945"; | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
hsPkgs = pkgs.haskell.packages.${compilerVersion}.override { | ||
overrides = hfinal: hprev: { | ||
# Internal Packages | ||
distributed-process = hfinal.callCabal2nix "distributed-process" ./. {}; | ||
|
||
# External Packages | ||
rank1dynamic = hfinal.callCabal2nix "rank1dynamic" rank1dynamic-src {}; | ||
}; | ||
}; | ||
}); | ||
in { | ||
formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra); | ||
|
||
# nix develop | ||
devShells = forAllSystems ({hsPkgs, pkgs, ...}: { | ||
default = hsPkgs.shellFor { | ||
name = "distributed-process"; | ||
packages = p: [ | ||
p.distributed-process | ||
]; | ||
buildInputs = with pkgs; | ||
[ | ||
hsPkgs.haskell-language-server | ||
hsPkgs.cabal-install | ||
cabal2nix | ||
haskellPackages.ghcid | ||
]; | ||
}; | ||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
cradle: | ||
cabal: | ||
- path: "./src" | ||
component: "lib:distributed-process" | ||
- path: "./benchmark/Latency.hs" | ||
component: "bench:distributed-process-latency" | ||
- path: "./benchmark/Channels.hs" | ||
component: "bench:distributed-process-channels" | ||
- path: "./benchmark/Spawns.hs" | ||
component: "bench:distributed-process-spawns" | ||
- path: "./benchmark/ProcessRing.hs" | ||
component: "bench:distributed-process-ring" |