Skip to content

Commit e5db979

Browse files
author
IOHK
committed
Automatic Update
1 parent 7801e84 commit e5db979

File tree

38 files changed

+1698
-7
lines changed

38 files changed

+1698
-7
lines changed

default.nix

+1
Original file line numberDiff line numberDiff line change
@@ -5703,6 +5703,7 @@ with builtins; mapAttrs (_: mapAttrs (_: data: rec {
57035703
"fibonacci" = import ./nix/fibonacci.nix;
57045704
"ficketed" = import ./nix/ficketed.nix;
57055705
"fields" = import ./nix/fields.nix;
5706+
"fields-and-cases" = import ./nix/fields-and-cases.nix;
57065707
"fields-json" = import ./nix/fields-json.nix;
57075708
"fieldwise" = import ./nix/fieldwise.nix;
57085709
"fig" = import ./nix/fig.nix;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{ system
2+
, compiler
3+
, flags
4+
, pkgs
5+
, hsPkgs
6+
, pkgconfPkgs
7+
, errorHandler
8+
, config
9+
, ... }:
10+
{
11+
flags = {};
12+
package = {
13+
specVersion = "1.10";
14+
identifier = { name = "ChasingBottoms"; version = "1.3.1.14"; };
15+
license = "MIT";
16+
copyright = "Copyright (c) Nils Anders Danielsson 2004-2022, 2024.";
17+
maintainer = "http://www.cse.chalmers.se/~nad/";
18+
author = "Nils Anders Danielsson";
19+
homepage = "";
20+
url = "";
21+
synopsis = "For testing partial and infinite values.";
22+
description = "Do you ever feel the need to test code involving bottoms (e.g. calls to\nthe @error@ function), or code involving infinite values? Then this\nlibrary could be useful for you.\n\nIt is usually easy to get a grip on bottoms by showing a value and\nwaiting to see how much gets printed before the first exception is\nencountered. However, that quickly gets tiresome and is hard to automate\nusing e.g. QuickCheck\n(<http://www.cse.chalmers.se/~rjmh/QuickCheck/>). With this library you\ncan do the tests as simply as the following examples show.\n\nTesting explicitly for bottoms:\n\n> > isBottom (head [])\n> True\n\n> > isBottom bottom\n> True\n\n> > isBottom (\\_ -> bottom)\n> False\n\n> > isBottom (bottom, bottom)\n> False\n\nComparing finite, partial values:\n\n> > ((bottom, 3) :: (Bool, Int)) ==! (bottom, 2+5-4)\n> True\n\n> > ((bottom, bottom) :: (Bool, Int)) <! (bottom, 8)\n> True\n\nShowing partial and infinite values (@\\\\\\/!@ is join and @\\/\\\\!@ is meet):\n\n> > approxShow 4 $ (True, bottom) \\/! (bottom, 'b')\n> \"Just (True, 'b')\"\n\n> > approxShow 4 $ (True, bottom) /\\! (bottom, 'b')\n> \"(_|_, _|_)\"\n\n> > approxShow 4 $ ([1..] :: [Int])\n> \"[1, 2, 3, _\"\n\n> > approxShow 4 $ (cycle [bottom] :: [Bool])\n> \"[_|_, _|_, _|_, _\"\n\nApproximately comparing infinite, partial values:\n\n> > approx 100 [2,4..] ==! approx 100 (filter even [1..] :: [Int])\n> True\n\n> > approx 100 [2,4..] /=! approx 100 (filter even [bottom..] :: [Int])\n> True\n\nThe code above relies on the fact that @bottom@, just as @error\n\\\"...\\\"@, @undefined@ and pattern match failures, yield\nexceptions. Sometimes we are dealing with properly non-terminating\ncomputations, such as the following example, and then it can be nice to\nbe able to apply a time-out:\n\n> > timeOut' 1 (reverse [1..5])\n> Value [5,4,3,2,1]\n\n> > timeOut' 1 (reverse [1..])\n> NonTermination\n\nThe time-out functionality can be used to treat \\\"slow\\\" computations as\nbottoms:\n\n@\n\\> let tweak = Tweak &#x7b; approxDepth = Just 5, timeOutLimit = Just 2 &#x7d;\n\\> semanticEq tweak (reverse [1..], [1..]) (bottom :: [Int], [1..] :: [Int])\nTrue\n@\n\n@\n\\> let tweak = noTweak &#x7b; timeOutLimit = Just 2 &#x7d;\n\\> semanticJoin tweak (reverse [1..], True) ([] :: [Int], bottom)\nJust ([],True)\n@\n\nThis can of course be dangerous:\n\n@\n\\> let tweak = noTweak &#x7b; timeOutLimit = Just 0 &#x7d;\n\\> semanticEq tweak (reverse [1..100000000]) (bottom :: [Integer])\nTrue\n@\n\nTimeouts can also be applied to @IO@ computations:\n\n> > let primes () = unfoldr (\\(x:xs) -> Just (x, filter ((/= 0) . (`mod` x)) xs)) [2..]\n> > timeOutMicro 100 (print $ primes ())\n> [2,NonTermination\n> > timeOutMicro 10000 (print $ take 10 $ primes ())\n> [2,3,5,7,11,13,17,19,23,29]\n> Value ()\n\nFor the underlying theory and a larger example involving use of\nQuickCheck, see the article \\\"Chasing Bottoms, A Case Study in Program\nVerification in the Presence of Partial and Infinite Values\\\"\n(<http://www.cse.chalmers.se/~nad/publications/danielsson-jansson-mpc2004.html>).\n\nThe code has been tested using GHC. Most parts can probably be\nported to other Haskell compilers, but this would require some work.\nThe @TimeOut@ functions require preemptive scheduling, and most of\nthe rest requires @Data.Generics@; @isBottom@ only requires\nexceptions, though.";
23+
buildType = "Simple";
24+
};
25+
components = {
26+
"library" = {
27+
depends = [
28+
(hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck"))
29+
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
30+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
31+
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
32+
(hsPkgs."random" or (errorHandler.buildDepError "random"))
33+
(hsPkgs."syb" or (errorHandler.buildDepError "syb"))
34+
];
35+
buildable = true;
36+
};
37+
tests = {
38+
"ChasingBottomsTestSuite" = {
39+
depends = [
40+
(hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck"))
41+
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
42+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
43+
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
44+
(hsPkgs."random" or (errorHandler.buildDepError "random"))
45+
(hsPkgs."syb" or (errorHandler.buildDepError "syb"))
46+
(hsPkgs."array" or (errorHandler.buildDepError "array"))
47+
];
48+
buildable = true;
49+
};
50+
};
51+
};
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{ system
2+
, compiler
3+
, flags
4+
, pkgs
5+
, hsPkgs
6+
, pkgconfPkgs
7+
, errorHandler
8+
, config
9+
, ... }:
10+
{
11+
flags = {};
12+
package = {
13+
specVersion = "1.12";
14+
identifier = { name = "doctest"; version = "0.22.3"; };
15+
license = "MIT";
16+
copyright = "(c) 2009-2024 Simon Hengel";
17+
maintainer = "Simon Hengel <[email protected]>";
18+
author = "Simon Hengel <[email protected]>";
19+
homepage = "https://github.com/sol/doctest#readme";
20+
url = "";
21+
synopsis = "Test interactive Haskell examples";
22+
description = "`doctest` is a tool that checks [examples](https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810775744)\nand [properties](https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810771856)\nin Haddock comments.\nIt is similar in spirit to the [popular Python module with the same name](https://docs.python.org/3/library/doctest.html).\n\nDocumentation is at <https://github.com/sol/doctest#readme>.";
23+
buildType = "Simple";
24+
};
25+
components = {
26+
"library" = {
27+
depends = [
28+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
29+
(hsPkgs."code-page" or (errorHandler.buildDepError "code-page"))
30+
(hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq"))
31+
(hsPkgs."directory" or (errorHandler.buildDepError "directory"))
32+
(hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions"))
33+
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
34+
(hsPkgs."ghc" or (errorHandler.buildDepError "ghc"))
35+
(hsPkgs."ghc-paths" or (errorHandler.buildDepError "ghc-paths"))
36+
(hsPkgs."process" or (errorHandler.buildDepError "process"))
37+
(hsPkgs."syb" or (errorHandler.buildDepError "syb"))
38+
(hsPkgs."transformers" or (errorHandler.buildDepError "transformers"))
39+
];
40+
buildable = true;
41+
};
42+
exes = {
43+
"doctest" = {
44+
depends = [
45+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
46+
(hsPkgs."code-page" or (errorHandler.buildDepError "code-page"))
47+
(hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq"))
48+
(hsPkgs."directory" or (errorHandler.buildDepError "directory"))
49+
(hsPkgs."doctest" or (errorHandler.buildDepError "doctest"))
50+
(hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions"))
51+
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
52+
(hsPkgs."ghc" or (errorHandler.buildDepError "ghc"))
53+
(hsPkgs."ghc-paths" or (errorHandler.buildDepError "ghc-paths"))
54+
(hsPkgs."process" or (errorHandler.buildDepError "process"))
55+
(hsPkgs."syb" or (errorHandler.buildDepError "syb"))
56+
(hsPkgs."transformers" or (errorHandler.buildDepError "transformers"))
57+
];
58+
buildable = true;
59+
};
60+
};
61+
tests = {
62+
"spec" = {
63+
depends = [
64+
(hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit"))
65+
(hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck"))
66+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
67+
(hsPkgs."code-page" or (errorHandler.buildDepError "code-page"))
68+
(hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq"))
69+
(hsPkgs."directory" or (errorHandler.buildDepError "directory"))
70+
(hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions"))
71+
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
72+
(hsPkgs."ghc" or (errorHandler.buildDepError "ghc"))
73+
(hsPkgs."ghc-paths" or (errorHandler.buildDepError "ghc-paths"))
74+
(hsPkgs."hspec" or (errorHandler.buildDepError "hspec"))
75+
(hsPkgs."hspec-core" or (errorHandler.buildDepError "hspec-core"))
76+
(hsPkgs."mockery" or (errorHandler.buildDepError "mockery"))
77+
(hsPkgs."process" or (errorHandler.buildDepError "process"))
78+
(hsPkgs."setenv" or (errorHandler.buildDepError "setenv"))
79+
(hsPkgs."silently" or (errorHandler.buildDepError "silently"))
80+
(hsPkgs."stringbuilder" or (errorHandler.buildDepError "stringbuilder"))
81+
(hsPkgs."syb" or (errorHandler.buildDepError "syb"))
82+
(hsPkgs."transformers" or (errorHandler.buildDepError "transformers"))
83+
];
84+
build-tools = [
85+
(hsPkgs.buildPackages.hspec-discover.components.exes.hspec-discover or (pkgs.buildPackages.hspec-discover or (errorHandler.buildToolDepError "hspec-discover:hspec-discover")))
86+
];
87+
buildable = true;
88+
};
89+
};
90+
};
91+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{ system
2+
, compiler
3+
, flags
4+
, pkgs
5+
, hsPkgs
6+
, pkgconfPkgs
7+
, errorHandler
8+
, config
9+
, ... }:
10+
{
11+
flags = {};
12+
package = {
13+
specVersion = "1.12";
14+
identifier = { name = "doctest"; version = "0.22.4"; };
15+
license = "MIT";
16+
copyright = "(c) 2009-2024 Simon Hengel";
17+
maintainer = "Simon Hengel <[email protected]>";
18+
author = "Simon Hengel <[email protected]>";
19+
homepage = "https://github.com/sol/doctest#readme";
20+
url = "";
21+
synopsis = "Test interactive Haskell examples";
22+
description = "`doctest` is a tool that checks [examples](https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810775744)\nand [properties](https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810771856)\nin Haddock comments.\nIt is similar in spirit to the [popular Python module with the same name](https://docs.python.org/3/library/doctest.html).\n\nDocumentation is at <https://github.com/sol/doctest#readme>.";
23+
buildType = "Simple";
24+
};
25+
components = {
26+
"library" = {
27+
depends = [
28+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
29+
(hsPkgs."code-page" or (errorHandler.buildDepError "code-page"))
30+
(hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq"))
31+
(hsPkgs."directory" or (errorHandler.buildDepError "directory"))
32+
(hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions"))
33+
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
34+
(hsPkgs."ghc" or (errorHandler.buildDepError "ghc"))
35+
(hsPkgs."ghc-paths" or (errorHandler.buildDepError "ghc-paths"))
36+
(hsPkgs."process" or (errorHandler.buildDepError "process"))
37+
(hsPkgs."syb" or (errorHandler.buildDepError "syb"))
38+
(hsPkgs."transformers" or (errorHandler.buildDepError "transformers"))
39+
];
40+
buildable = true;
41+
};
42+
exes = {
43+
"doctest" = {
44+
depends = [
45+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
46+
(hsPkgs."doctest" or (errorHandler.buildDepError "doctest"))
47+
];
48+
buildable = true;
49+
};
50+
};
51+
tests = {
52+
"spec" = {
53+
depends = [
54+
(hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit"))
55+
(hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck"))
56+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
57+
(hsPkgs."code-page" or (errorHandler.buildDepError "code-page"))
58+
(hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq"))
59+
(hsPkgs."directory" or (errorHandler.buildDepError "directory"))
60+
(hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions"))
61+
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
62+
(hsPkgs."ghc" or (errorHandler.buildDepError "ghc"))
63+
(hsPkgs."ghc-paths" or (errorHandler.buildDepError "ghc-paths"))
64+
(hsPkgs."hspec" or (errorHandler.buildDepError "hspec"))
65+
(hsPkgs."hspec-core" or (errorHandler.buildDepError "hspec-core"))
66+
(hsPkgs."mockery" or (errorHandler.buildDepError "mockery"))
67+
(hsPkgs."process" or (errorHandler.buildDepError "process"))
68+
(hsPkgs."silently" or (errorHandler.buildDepError "silently"))
69+
(hsPkgs."stringbuilder" or (errorHandler.buildDepError "stringbuilder"))
70+
(hsPkgs."syb" or (errorHandler.buildDepError "syb"))
71+
(hsPkgs."transformers" or (errorHandler.buildDepError "transformers"))
72+
];
73+
build-tools = [
74+
(hsPkgs.buildPackages.hspec-discover.components.exes.hspec-discover or (pkgs.buildPackages.hspec-discover or (errorHandler.buildToolDepError "hspec-discover:hspec-discover")))
75+
];
76+
buildable = true;
77+
};
78+
};
79+
};
80+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{ system
2+
, compiler
3+
, flags
4+
, pkgs
5+
, hsPkgs
6+
, pkgconfPkgs
7+
, errorHandler
8+
, config
9+
, ... }:
10+
{
11+
flags = {};
12+
package = {
13+
specVersion = "2.4";
14+
identifier = { name = "fields-and-cases"; version = "0.1.0.0"; };
15+
license = "BSD-3-Clause";
16+
copyright = "";
17+
maintainer = "[email protected]";
18+
author = "Michael Bock";
19+
homepage = "";
20+
url = "";
21+
synopsis = "Codegen Haskell types to other languages";
22+
description = "This package provides a way to generate code for other languages from Haskell types.\nIt's target language agnostic and based on type classes.";
23+
buildType = "Simple";
24+
};
25+
components = {
26+
"library" = {
27+
depends = [
28+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
29+
(hsPkgs."relude" or (errorHandler.buildDepError "relude"))
30+
(hsPkgs."string-conversions" or (errorHandler.buildDepError "string-conversions"))
31+
];
32+
buildable = true;
33+
};
34+
tests = {
35+
"test" = {
36+
depends = [
37+
(hsPkgs."base" or (errorHandler.buildDepError "base"))
38+
(hsPkgs."fields-and-cases" or (errorHandler.buildDepError "fields-and-cases"))
39+
(hsPkgs."lima" or (errorHandler.buildDepError "lima"))
40+
(hsPkgs."process" or (errorHandler.buildDepError "process"))
41+
(hsPkgs."regex-compat" or (errorHandler.buildDepError "regex-compat"))
42+
(hsPkgs."relude" or (errorHandler.buildDepError "relude"))
43+
(hsPkgs."string-conversions" or (errorHandler.buildDepError "string-conversions"))
44+
(hsPkgs."tasty" or (errorHandler.buildDepError "tasty"))
45+
(hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit"))
46+
];
47+
buildable = true;
48+
};
49+
};
50+
};
51+
}

0 commit comments

Comments
 (0)