-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ldfi2): introduce ormolu and nixpkgs-fmt and reformat all ld…
…fi2 files
- Loading branch information
1 parent
1d4e7ca
commit f9958c1
Showing
16 changed files
with
272 additions
and
226 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
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,2 +1,3 @@ | ||
import Distribution.Simple | ||
|
||
main = defaultMain |
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
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 |
---|---|---|
|
@@ -2,20 +2,22 @@ | |
, compiler ? "ghc8103" | ||
}: | ||
let | ||
inherit (import sources.gitignore {}) gitignoreSource; | ||
inherit (import sources.gitignore { }) gitignoreSource; | ||
nixpkgs = import sources.nixpkgs { | ||
config = { | ||
allowUnfree = true; | ||
packageOverrides = super: let pkgs = super.pkgs; in | ||
packageOverrides = super: | ||
let pkgs = super.pkgs; in | ||
{ | ||
haskell = super.haskell // { | ||
packages = super.haskell.packages // { | ||
${compiler} = super.haskell.packages.${compiler}.override { | ||
overrides = self: super: { | ||
z3 = self.callCabal2nix "z3" (builtins.fetchGit { | ||
url = "[email protected]:stevana/haskell-z3"; | ||
rev = "b984d0451969428f6fbc00d65f4d958c8998d05a"; | ||
}) | ||
z3 = self.callCabal2nix "z3" | ||
(builtins.fetchGit { | ||
url = "[email protected]:stevana/haskell-z3"; | ||
rev = "b984d0451969428f6fbc00d65f4d958c8998d05a"; | ||
}) | ||
{ z3 = pkgs.z3; }; | ||
}; | ||
}; | ||
|
@@ -24,14 +26,14 @@ let | |
}; | ||
}; | ||
}; | ||
pkg = nixpkgs.pkgs.haskell.packages.${compiler}.callCabal2nix "ldfi" (./.) {}; | ||
in pkg.overrideAttrs(attrs: { | ||
pkg = nixpkgs.pkgs.haskell.packages.${compiler}.callCabal2nix "ldfi" (./.) { }; | ||
in | ||
pkg.overrideAttrs (attrs: { | ||
pname = "detsys-ldfi2"; | ||
src = gitignoreSource ./.; | ||
preBuild = '' | ||
export DETSYS_LDFI_VERSION="${nixpkgs.lib.commitIdFromGitRepo ./../../.git}" | ||
''; | ||
src = gitignoreSource ./.; | ||
# this should probably check that attrs.checkInputs doesn't exist | ||
checkInputs = [ nixpkgs.pkgs.haskell.packages.${compiler}.tasty-discover ]; | ||
pname = "detsys-ldfi2"; | ||
checkPhase = ""; | ||
}) |
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,5 +1,5 @@ | ||
{ sources ? import ./../../nix/sources.nix | ||
, nixpkgs ? import sources.nixpkgs {} | ||
, compiler ? "ghc8103" }: | ||
, compiler ? "ghc8103" | ||
}: | ||
|
||
(import ./default.nix { inherit nixpkgs compiler; }).env | ||
(import ./default.nix { inherit sources compiler; }).env |
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
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,15 +1,17 @@ | ||
module Ldfi.FailureSpec where | ||
|
||
import Numeric.Natural | ||
|
||
import Ldfi.Traces (Time) | ||
import Numeric.Natural | ||
|
||
------------------------------------------------------------------------ | ||
|
||
-- * Failure specification | ||
|
||
data FailureSpec = FailureSpec | ||
{ endOfFiniteFailures :: Time -- ^ When finite failures, i.e. omissions, | ||
-- stop (a.k.a. EOF). | ||
, maxCrashes :: Natural -- ^ The maximum amount of crashes allowed. | ||
, endOfTime :: Time -- ^ When the test stops (a.k.a. EOT). | ||
{ -- | When finite failures, i.e. omissions, stop (a.k.a. EOF). | ||
endOfFiniteFailures :: Time, | ||
-- | The maximum amount of crashes allowed. | ||
maxCrashes :: Natural, | ||
-- | When the test stops (a.k.a. EOT). | ||
endOfTime :: Time | ||
} |
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
Oops, something went wrong.