-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
IOHK
committed
Aug 21, 2024
1 parent
643e962
commit 11b43aa
Showing
18 changed files
with
751 additions
and
1 deletion.
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
52 changes: 52 additions & 0 deletions
52
...gBottoms-1.3.1.15-r0-ec835aef5cf64ce4bdcde58a525ef6038213e77b858ca64b4e3f01bb2e7e7887.nix
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,52 @@ | ||
{ system | ||
, compiler | ||
, flags | ||
, pkgs | ||
, hsPkgs | ||
, pkgconfPkgs | ||
, errorHandler | ||
, config | ||
, ... }: | ||
{ | ||
flags = {}; | ||
package = { | ||
specVersion = "1.10"; | ||
identifier = { name = "ChasingBottoms"; version = "1.3.1.15"; }; | ||
license = "MIT"; | ||
copyright = "Copyright (c) Nils Anders Danielsson 2004-2022, 2024."; | ||
maintainer = "http://www.cse.chalmers.se/~nad/"; | ||
author = "Nils Anders Danielsson"; | ||
homepage = ""; | ||
url = ""; | ||
synopsis = "For testing partial and infinite values."; | ||
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 { approxDepth = Just 5, timeOutLimit = Just 2 }\n\\> semanticEq tweak (reverse [1..], [1..]) (bottom :: [Int], [1..] :: [Int])\nTrue\n@\n\n@\n\\> let tweak = noTweak { timeOutLimit = Just 2 }\n\\> semanticJoin tweak (reverse [1..], True) ([] :: [Int], bottom)\nJust ([],True)\n@\n\nThis can of course be dangerous:\n\n@\n\\> let tweak = noTweak { timeOutLimit = Just 0 }\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."; | ||
buildType = "Simple"; | ||
}; | ||
components = { | ||
"library" = { | ||
depends = [ | ||
(hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) | ||
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."containers" or (errorHandler.buildDepError "containers")) | ||
(hsPkgs."random" or (errorHandler.buildDepError "random")) | ||
(hsPkgs."syb" or (errorHandler.buildDepError "syb")) | ||
]; | ||
buildable = true; | ||
}; | ||
tests = { | ||
"ChasingBottomsTestSuite" = { | ||
depends = [ | ||
(hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) | ||
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."containers" or (errorHandler.buildDepError "containers")) | ||
(hsPkgs."random" or (errorHandler.buildDepError "random")) | ||
(hsPkgs."syb" or (errorHandler.buildDepError "syb")) | ||
(hsPkgs."array" or (errorHandler.buildDepError "array")) | ||
]; | ||
buildable = true; | ||
}; | ||
}; | ||
}; | ||
} |
76 changes: 76 additions & 0 deletions
76
...age/cabal-add-0.1-r0-d3e923be1dc0d5deb1d402f11f435d0278576925688a9d4dd60229e3b36d6597.nix
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,76 @@ | ||
{ system | ||
, compiler | ||
, flags | ||
, pkgs | ||
, hsPkgs | ||
, pkgconfPkgs | ||
, errorHandler | ||
, config | ||
, ... }: | ||
{ | ||
flags = { cabal-syntax = false; }; | ||
package = { | ||
specVersion = "3.0"; | ||
identifier = { name = "cabal-add"; version = "0.1"; }; | ||
license = "BSD-3-Clause"; | ||
copyright = ""; | ||
maintainer = "andrew.lelechenko@gmail.com"; | ||
author = "Bodigrim"; | ||
homepage = ""; | ||
url = ""; | ||
synopsis = "Extend Cabal build-depends from the command line"; | ||
description = "Extend Cabal @build-depends@ from the command line.\nIt works on any sectioned Cabal file,\nsupports stanzas and conditional blocks,\nand preserves original formatting."; | ||
buildType = "Simple"; | ||
}; | ||
components = { | ||
"library" = { | ||
depends = [ | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) | ||
(hsPkgs."Cabal" or (errorHandler.buildDepError "Cabal")) | ||
(hsPkgs."containers" or (errorHandler.buildDepError "containers")) | ||
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) | ||
] ++ [ | ||
(hsPkgs."Cabal-syntax" or (errorHandler.buildDepError "Cabal-syntax")) | ||
(hsPkgs."Cabal" or (errorHandler.buildDepError "Cabal")) | ||
]; | ||
buildable = true; | ||
}; | ||
exes = { | ||
"cabal-add" = { | ||
depends = [ | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) | ||
(hsPkgs."cabal-add" or (errorHandler.buildDepError "cabal-add")) | ||
(hsPkgs."cabal-install-parsers" or (errorHandler.buildDepError "cabal-install-parsers")) | ||
(hsPkgs."directory" or (errorHandler.buildDepError "directory")) | ||
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) | ||
(hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative")) | ||
(hsPkgs."process" or (errorHandler.buildDepError "process")) | ||
] ++ (if flags.cabal-syntax | ||
then [ | ||
(hsPkgs."Cabal-syntax" or (errorHandler.buildDepError "Cabal-syntax")) | ||
] | ||
else [ (hsPkgs."Cabal" or (errorHandler.buildDepError "Cabal")) ]); | ||
buildable = true; | ||
}; | ||
}; | ||
tests = { | ||
"cabal-add-tests" = { | ||
depends = [ | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."Diff" or (errorHandler.buildDepError "Diff")) | ||
(hsPkgs."directory" or (errorHandler.buildDepError "directory")) | ||
(hsPkgs."process" or (errorHandler.buildDepError "process")) | ||
(hsPkgs."string-qq" or (errorHandler.buildDepError "string-qq")) | ||
(hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) | ||
(hsPkgs."temporary" or (errorHandler.buildDepError "temporary")) | ||
]; | ||
build-tools = [ | ||
(hsPkgs.pkgsBuildBuild.cabal-add.components.exes.cabal-add or (pkgs.pkgsBuildBuild.cabal-add or (errorHandler.buildToolDepError "cabal-add:cabal-add"))) | ||
]; | ||
buildable = true; | ||
}; | ||
}; | ||
}; | ||
} |
147 changes: 147 additions & 0 deletions
147
...age/cryptol-3.2.0-r0-e569809e6abe464c4f2fbca22daf2feca6b33149b78ca8e12fca941d8228c5bd.nix
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,147 @@ | ||
{ system | ||
, compiler | ||
, flags | ||
, pkgs | ||
, hsPkgs | ||
, pkgconfPkgs | ||
, errorHandler | ||
, config | ||
, ... }: | ||
{ | ||
flags = { static = false; relocatable = true; ffi = true; }; | ||
package = { | ||
specVersion = "2.4"; | ||
identifier = { name = "cryptol"; version = "3.2.0"; }; | ||
license = "BSD-3-Clause"; | ||
copyright = "2013-2022 Galois Inc."; | ||
maintainer = "cryptol@galois.com"; | ||
author = "Galois, Inc."; | ||
homepage = "http://www.cryptol.net/"; | ||
url = ""; | ||
synopsis = "Cryptol: The Language of Cryptography"; | ||
description = "Cryptol is a domain-specific language for specifying cryptographic algorithms. A Cryptol implementation of an algorithm resembles its mathematical specification more closely than an implementation in a general purpose language. For more, see <http://www.cryptol.net/>."; | ||
buildType = "Simple"; | ||
}; | ||
components = { | ||
"library" = { | ||
depends = ([ | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."arithmoi" or (errorHandler.buildDepError "arithmoi")) | ||
(hsPkgs."async" or (errorHandler.buildDepError "async")) | ||
(hsPkgs."base-compat" or (errorHandler.buildDepError "base-compat")) | ||
(hsPkgs."bv-sized" or (errorHandler.buildDepError "bv-sized")) | ||
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) | ||
(hsPkgs."array" or (errorHandler.buildDepError "array")) | ||
(hsPkgs."containers" or (errorHandler.buildDepError "containers")) | ||
(hsPkgs."criterion-measurement" or (errorHandler.buildDepError "criterion-measurement")) | ||
(hsPkgs."cryptohash-sha1" or (errorHandler.buildDepError "cryptohash-sha1")) | ||
(hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) | ||
(hsPkgs."directory" or (errorHandler.buildDepError "directory")) | ||
(hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions")) | ||
(hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) | ||
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) | ||
(hsPkgs."gitrev" or (errorHandler.buildDepError "gitrev")) | ||
(hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) | ||
(hsPkgs."GraphSCC" or (errorHandler.buildDepError "GraphSCC")) | ||
(hsPkgs."language-c99" or (errorHandler.buildDepError "language-c99")) | ||
(hsPkgs."language-c99-simple" or (errorHandler.buildDepError "language-c99-simple")) | ||
(hsPkgs."libBF" or (errorHandler.buildDepError "libBF")) | ||
(hsPkgs."MemoTrie" or (errorHandler.buildDepError "MemoTrie")) | ||
(hsPkgs."monad-control" or (errorHandler.buildDepError "monad-control")) | ||
(hsPkgs."monadLib" or (errorHandler.buildDepError "monadLib")) | ||
(hsPkgs."parameterized-utils" or (errorHandler.buildDepError "parameterized-utils")) | ||
(hsPkgs."pretty" or (errorHandler.buildDepError "pretty")) | ||
(hsPkgs."prettyprinter" or (errorHandler.buildDepError "prettyprinter")) | ||
(hsPkgs."pretty-show" or (errorHandler.buildDepError "pretty-show")) | ||
(hsPkgs."process" or (errorHandler.buildDepError "process")) | ||
(hsPkgs."sbv" or (errorHandler.buildDepError "sbv")) | ||
(hsPkgs."simple-smt" or (errorHandler.buildDepError "simple-smt")) | ||
(hsPkgs."stm" or (errorHandler.buildDepError "stm")) | ||
(hsPkgs."strict" or (errorHandler.buildDepError "strict")) | ||
(hsPkgs."text" or (errorHandler.buildDepError "text")) | ||
(hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) | ||
(hsPkgs."transformers-base" or (errorHandler.buildDepError "transformers-base")) | ||
(hsPkgs."vector" or (errorHandler.buildDepError "vector")) | ||
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) | ||
(hsPkgs."time" or (errorHandler.buildDepError "time")) | ||
(hsPkgs."panic" or (errorHandler.buildDepError "panic")) | ||
(hsPkgs."what4" or (errorHandler.buildDepError "what4")) | ||
] ++ (if compiler.isGhc && compiler.version.ge "9.0" | ||
then [ | ||
(hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) | ||
] | ||
else [ | ||
(hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) | ||
])) ++ pkgs.lib.optionals (flags.ffi) ([ | ||
(hsPkgs."hgmp" or (errorHandler.buildDepError "hgmp")) | ||
(hsPkgs."libffi" or (errorHandler.buildDepError "libffi")) | ||
] ++ (if system.isWindows | ||
then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] | ||
else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ])); | ||
build-tools = [ | ||
(hsPkgs.pkgsBuildBuild.alex.components.exes.alex or (pkgs.pkgsBuildBuild.alex or (errorHandler.buildToolDepError "alex:alex"))) | ||
(hsPkgs.pkgsBuildBuild.happy.components.exes.happy or (pkgs.pkgsBuildBuild.happy or (errorHandler.buildToolDepError "happy:happy"))) | ||
]; | ||
buildable = true; | ||
}; | ||
exes = { | ||
"cryptol" = { | ||
depends = [ | ||
(hsPkgs."ansi-terminal" or (errorHandler.buildDepError "ansi-terminal")) | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."base-compat" or (errorHandler.buildDepError "base-compat")) | ||
(hsPkgs."containers" or (errorHandler.buildDepError "containers")) | ||
(hsPkgs."cryptol" or (errorHandler.buildDepError "cryptol")) | ||
(hsPkgs."directory" or (errorHandler.buildDepError "directory")) | ||
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) | ||
(hsPkgs."haskeline" or (errorHandler.buildDepError "haskeline")) | ||
(hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions")) | ||
(hsPkgs."monad-control" or (errorHandler.buildDepError "monad-control")) | ||
(hsPkgs."text" or (errorHandler.buildDepError "text")) | ||
(hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) | ||
]; | ||
buildable = true; | ||
}; | ||
"cryptol-html" = { | ||
depends = [ | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."text" or (errorHandler.buildDepError "text")) | ||
(hsPkgs."cryptol" or (errorHandler.buildDepError "cryptol")) | ||
(hsPkgs."blaze-html" or (errorHandler.buildDepError "blaze-html")) | ||
]; | ||
buildable = true; | ||
}; | ||
"check-exercises" = { | ||
depends = [ | ||
(hsPkgs."ansi-terminal" or (errorHandler.buildDepError "ansi-terminal")) | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."containers" or (errorHandler.buildDepError "containers")) | ||
(hsPkgs."directory" or (errorHandler.buildDepError "directory")) | ||
(hsPkgs."extra" or (errorHandler.buildDepError "extra")) | ||
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) | ||
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) | ||
(hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative")) | ||
(hsPkgs."process" or (errorHandler.buildDepError "process")) | ||
(hsPkgs."temporary" or (errorHandler.buildDepError "temporary")) | ||
(hsPkgs."text" or (errorHandler.buildDepError "text")) | ||
]; | ||
buildable = true; | ||
}; | ||
}; | ||
benchmarks = { | ||
"cryptol-bench" = { | ||
depends = [ | ||
(hsPkgs."base" or (errorHandler.buildDepError "base")) | ||
(hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) | ||
(hsPkgs."cryptol" or (errorHandler.buildDepError "cryptol")) | ||
(hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) | ||
(hsPkgs."directory" or (errorHandler.buildDepError "directory")) | ||
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) | ||
(hsPkgs."sbv" or (errorHandler.buildDepError "sbv")) | ||
(hsPkgs."text" or (errorHandler.buildDepError "text")) | ||
]; | ||
buildable = true; | ||
}; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.