apropos-tx setup

This commit is contained in:
Emily Martins 2022-03-09 19:32:13 +01:00
parent b9094499ff
commit 5bae354268
17 changed files with 695 additions and 54 deletions

View file

@ -8,6 +8,15 @@ import Test.Tasty (defaultMain, testGroup)
--------------------------------------------------------------------------------
import Spec.Int
main :: IO ()
main =
defaultMain $ testGroup "Suites" []
defaultMain $
testGroup
"apropos-tx"
[ testGroup
"Int"
[ intPlutarchTests
]
]

88
agora-test/Spec/Int.hs Normal file
View file

@ -0,0 +1,88 @@
module Spec.Int (HasLogicalModel (..), IntProp (..), intGenTests, intPureTests, intPlutarchTests) where
import Apropos
import Apropos.Script
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.Hedgehog (fromGroup)
import Plutarch (compile)
data IntProp
= IsNegative
| IsPositive
| IsZero
| IsLarge
| IsSmall
| IsMaxBound
| IsMinBound
deriving stock (Eq, Ord, Enum, Show, Bounded)
instance Enumerable IntProp where
enumerated = [minBound .. maxBound]
instance LogicalModel IntProp where
logic =
ExactlyOne [Var IsNegative, Var IsPositive, Var IsZero]
:&&: ExactlyOne [Var IsLarge, Var IsSmall]
:&&: (Var IsZero :->: Var IsSmall)
:&&: (Var IsMaxBound :->: (Var IsLarge :&&: Var IsPositive))
:&&: (Var IsMinBound :->: (Var IsLarge :&&: Var IsNegative))
instance HasLogicalModel IntProp Int where
satisfiesProperty IsNegative i = i < 0
satisfiesProperty IsPositive i = i > 0
satisfiesProperty IsMaxBound i = i == maxBound
satisfiesProperty IsMinBound i = i == minBound
satisfiesProperty IsZero i = i == 0
satisfiesProperty IsLarge i = i > 10 || i < -10
satisfiesProperty IsSmall i = i <= 10 && i >= -10
instance HasParameterisedGenerator IntProp Int where
parameterisedGenerator s = do
i <-
if IsZero `elem` s
then pure 0
else
if IsSmall `elem` s
then int (linear 1 10)
else
if IsMaxBound `elem` s
then pure maxBound
else int (linear 11 (maxBound - 1))
if IsNegative `elem` s
then
if IsMinBound `elem` s
then pure minBound
else pure (-i)
else pure i
intGenTests :: TestTree
intGenTests =
testGroup "intGenTests" $
fromGroup
<$> [ runGeneratorTestsWhere (Apropos :: Int :+ IntProp) "Int Generator" Yes
]
instance HasPureRunner IntProp Int where
expect _ = Var IsSmall :&&: Var IsNegative
script _ i = i < 0 && i >= -10
intPureTests :: TestTree
intPureTests =
testGroup "intPureTests" $
fromGroup
<$> [ runPureTestsWhere (Apropos :: Int :+ IntProp) "AcceptsSmallNegativeInts" Yes
]
instance HasScriptRunner IntProp Int where
expect _ = Var IsSmall :&&: Var IsNegative
script _ i =
let ii = fromIntegral i :: Integer
in compile (pif ((fromInteger ii #< (0 :: Term s PInteger)) #&& ((fromInteger (-10) :: Term s PInteger) #<= fromInteger ii)) (pcon PUnit) perror)
intPlutarchTests :: TestTree
intPlutarchTests =
testGroup "intPlutarchTests" $
fromGroup
<$> [ runScriptTestsWhere (Apropos :: Int :+ IntProp) "AcceptsSmallNegativeInts" Yes
]

View file

@ -110,7 +110,8 @@ common test-deps
, QuickCheck
, quickcheck-instances
, tasty
, tasty-quickcheck
, tasty-hedgehog
, apropos-tx
library
import: lang, deps
@ -128,7 +129,7 @@ library
Plutarch.Api.V1.These
Plutarch.These
hs-source-dirs: src
hs-source-dirs: agora
library pprelude
build-depends:
@ -136,18 +137,20 @@ library pprelude
, plutarch
exposed-modules: PPrelude
hs-source-dirs: src
hs-source-dirs: agora
default-language: Haskell2010
test-suite agora-test
import: lang, deps, test-deps
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs: test
hs-source-dirs: agora-test
other-modules:
Spec.Int
benchmark agora-bench
import: lang, deps
hs-source-dirs: bench
hs-source-dirs: agora-bench
main-is: Main.hs
type: exitcode-stdio-1.0
build-depends:

616
flake.lock generated
View file

@ -16,6 +16,22 @@
"type": "github"
}
},
"HTTP_2": {
"flake": false,
"locked": {
"lastModified": 1451647621,
"narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=",
"owner": "phadej",
"repo": "HTTP",
"rev": "9bc0996d412fef1787449d841277ef663ad9a915",
"type": "github"
},
"original": {
"owner": "phadej",
"repo": "HTTP",
"type": "github"
}
},
"Shrinker": {
"flake": false,
"locked": {
@ -49,6 +65,33 @@
"type": "github"
}
},
"apropos-tx": {
"inputs": {
"flake-compat": "flake-compat",
"flake-compat-ci": "flake-compat-ci",
"haskell-nix": "haskell-nix",
"nixpkgs": [
"plutarch",
"haskell-nix",
"nixpkgs-unstable"
],
"plutus": "plutus"
},
"locked": {
"lastModified": 1646436508,
"narHash": "sha256-4QevdgeSSHfOyJEqdiNx6SovGpLZv1vw9i6r0XbpQ3U=",
"owner": "mlabs-haskell",
"repo": "apropos-tx",
"rev": "5b74ba897a6f02718c163bf588a08c5e3e9de204",
"type": "github"
},
"original": {
"owner": "mlabs-haskell",
"repo": "apropos-tx",
"rev": "5b74ba897a6f02718c163bf588a08c5e3e9de204",
"type": "github"
}
},
"autodocodec": {
"flake": false,
"locked": {
@ -83,6 +126,23 @@
"type": "github"
}
},
"cabal-32_2": {
"flake": false,
"locked": {
"lastModified": 1603716527,
"narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=",
"owner": "haskell",
"repo": "cabal",
"rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "3.2",
"repo": "cabal",
"type": "github"
}
},
"cabal-34": {
"flake": false,
"locked": {
@ -100,6 +160,23 @@
"type": "github"
}
},
"cabal-34_2": {
"flake": false,
"locked": {
"lastModified": 1622475795,
"narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=",
"owner": "haskell",
"repo": "cabal",
"rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "3.4",
"repo": "cabal",
"type": "github"
}
},
"cabal-36": {
"flake": false,
"locked": {
@ -183,6 +260,22 @@
"type": "github"
}
},
"cardano-repo-tool_2": {
"flake": false,
"locked": {
"lastModified": 1624584417,
"narHash": "sha256-YSepT97PagR/1jTYV/Yer8a2GjFe9+tTwaTCHxuK50M=",
"owner": "input-output-hk",
"repo": "cardano-repo-tool",
"rev": "30e826ed8f00e3e154453b122a6f3d779b2f73ec",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "cardano-repo-tool",
"type": "github"
}
},
"cardano-shell": {
"flake": false,
"locked": {
@ -199,6 +292,22 @@
"type": "github"
}
},
"cardano-shell_2": {
"flake": false,
"locked": {
"lastModified": 1608537748,
"narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=",
"owner": "input-output-hk",
"repo": "cardano-shell",
"rev": "9392c75087cb9a3d453998f4230930dea3a95725",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "cardano-shell",
"type": "github"
}
},
"cryptonite": {
"flake": false,
"locked": {
@ -247,24 +356,55 @@
"type": "github"
}
},
"flake-compat-ci_2": {
"locked": {
"lastModified": 1641672839,
"narHash": "sha256-Bdwv+DKeEMlRNPDpZxSz0sSrqQBvdKO5fZ8LmvrgCOU=",
"owner": "hercules-ci",
"repo": "flake-compat-ci",
"rev": "e832114bc18376c0f3fa13c19bf5ff253cc6570a",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-compat-ci",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1606424373,
"narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=",
"lastModified": 1641205782,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"type": "github"
},
"original": {
"owner": "edolstra",
"ref": "master",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1606424373,
"narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf",
"type": "github"
},
"original": {
"owner": "edolstra",
"ref": "master",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1606424373,
@ -295,6 +435,21 @@
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1623875721,
"narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flat": {
"flake": false,
"locked": {
@ -346,6 +501,23 @@
"type": "github"
}
},
"ghc-8.6.5-iohk_2": {
"flake": false,
"locked": {
"lastModified": 1600920045,
"narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=",
"owner": "input-output-hk",
"repo": "ghc",
"rev": "95713a6ecce4551240da7c96b6176f980af75cae",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"ref": "release/8.6.5-iohk",
"repo": "ghc",
"type": "github"
}
},
"gitignore-nix": {
"flake": false,
"locked": {
@ -362,14 +534,30 @@
"type": "github"
}
},
"gitignore-nix_2": {
"flake": false,
"locked": {
"lastModified": 1611672876,
"narHash": "sha256-qHu3uZ/o9jBHiA3MEKHJ06k7w4heOhA+4HCSIvflRxo=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "211907489e9f198594c0eb0ca9256a1949c9d412",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hackage": {
"flake": false,
"locked": {
"lastModified": 1642554756,
"narHash": "sha256-1+SN+z80HgKYshlCf8dRxwRojQzuwwsQ5uq14N/JP1Y=",
"lastModified": 1639357972,
"narHash": "sha256-NvVn00YOYZMqDUSiBbghJk/rm/nJItBEUJulWRGTgvk=",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "f9d5e67ca90926b244c0ad68815371d37582a149",
"rev": "54adf6e47e20831d9c49a2b62e12f7f218fd7752",
"type": "github"
},
"original": {
@ -394,7 +582,56 @@
"type": "github"
}
},
"hackage-nix_2": {
"flake": false,
"locked": {
"lastModified": 1637291070,
"narHash": "sha256-hTX2Xo36i9MR6PNwA/89C8daKjxmx5ZS5lwR2Cbp8Yo=",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "6ea4ad5f4a5e2303cd64974329ba90ccc410a012",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "hackage.nix",
"type": "github"
}
},
"hackage_2": {
"flake": false,
"locked": {
"lastModified": 1642554756,
"narHash": "sha256-1+SN+z80HgKYshlCf8dRxwRojQzuwwsQ5uq14N/JP1Y=",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "f9d5e67ca90926b244c0ad68815371d37582a149",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "hackage.nix",
"type": "github"
}
},
"haskell-language-server": {
"flake": false,
"locked": {
"lastModified": 1638136578,
"narHash": "sha256-Reo9BQ12O+OX7tuRfaDPZPBpJW4jnxZetm63BxYncoM=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "745ef26f406dbdd5e4a538585f8519af9f1ccb09",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "1.5.1",
"repo": "haskell-language-server",
"type": "github"
}
},
"haskell-language-server_2": {
"flake": false,
"locked": {
"lastModified": 1642772345,
@ -410,7 +647,7 @@
"type": "github"
}
},
"haskell-language-server_2": {
"haskell-language-server_3": {
"flake": false,
"locked": {
"lastModified": 1638136578,
@ -432,7 +669,6 @@
"HTTP": "HTTP",
"cabal-32": "cabal-32",
"cabal-34": "cabal-34",
"cabal-36": "cabal-36",
"cardano-shell": "cardano-shell",
"flake-utils": "flake-utils",
"ghc-8.6.5-iohk": "ghc-8.6.5-iohk",
@ -440,28 +676,27 @@
"hpc-coveralls": "hpc-coveralls",
"nix-tools": "nix-tools",
"nixpkgs": [
"plutarch",
"apropos-tx",
"haskell-nix",
"nixpkgs-2111"
"nixpkgs-2105"
],
"nixpkgs-2003": "nixpkgs-2003",
"nixpkgs-2105": "nixpkgs-2105",
"nixpkgs-2111": "nixpkgs-2111_2",
"nixpkgs-2111": "nixpkgs-2111",
"nixpkgs-unstable": "nixpkgs-unstable",
"old-ghc-nix": "old-ghc-nix",
"stackage": "stackage"
},
"locked": {
"lastModified": 1642811877,
"narHash": "sha256-7YbbFF4ISWMcs5hHDfH7GkCSccvwEwhvKZ5D74Cuajo=",
"owner": "L-as",
"lastModified": 1639371915,
"narHash": "sha256-i5kW3hPptzXwzkpI2FAkfdDA/9QEDl/9mrwwoeBxDJg=",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "ac825b91c202947ec59b1a477003564cc018fcec",
"rev": "e95a1f0dacbc64603c31d11e36e4ba1af8f0eb43",
"type": "github"
},
"original": {
"owner": "L-as",
"ref": "master",
"owner": "input-output-hk",
"repo": "haskell.nix",
"type": "github"
}
@ -482,13 +717,68 @@
"type": "github"
}
},
"haskell-nix_3": {
"inputs": {
"HTTP": "HTTP_2",
"cabal-32": "cabal-32_2",
"cabal-34": "cabal-34_2",
"cabal-36": "cabal-36",
"cardano-shell": "cardano-shell_2",
"flake-utils": "flake-utils_2",
"ghc-8.6.5-iohk": "ghc-8.6.5-iohk_2",
"hackage": "hackage_2",
"hpc-coveralls": "hpc-coveralls_2",
"nix-tools": "nix-tools_2",
"nixpkgs": [
"plutarch",
"haskell-nix",
"nixpkgs-2111"
],
"nixpkgs-2003": "nixpkgs-2003_2",
"nixpkgs-2105": "nixpkgs-2105_2",
"nixpkgs-2111": "nixpkgs-2111_3",
"nixpkgs-unstable": "nixpkgs-unstable_2",
"old-ghc-nix": "old-ghc-nix_2",
"stackage": "stackage_2"
},
"locked": {
"lastModified": 1642811877,
"narHash": "sha256-7YbbFF4ISWMcs5hHDfH7GkCSccvwEwhvKZ5D74Cuajo=",
"owner": "L-as",
"repo": "haskell.nix",
"rev": "ac825b91c202947ec59b1a477003564cc018fcec",
"type": "github"
},
"original": {
"owner": "L-as",
"ref": "master",
"repo": "haskell.nix",
"type": "github"
}
},
"haskell-nix_4": {
"flake": false,
"locked": {
"lastModified": 1629380841,
"narHash": "sha256-gWOWCfX7IgVSvMMYN6rBGK6EA0pk6pmYguXzMvGte+Q=",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "7215f083b37741446aa325b20c8ba9f9f76015eb",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "haskell.nix",
"type": "github"
}
},
"hercules-ci-agent": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"nix-darwin": "nix-darwin",
"nixos-20_09": "nixos-20_09",
"nixos-unstable": "nixos-unstable",
"pre-commit-hooks-nix": "pre-commit-hooks-nix"
"pre-commit-hooks-nix": "pre-commit-hooks-nix_2"
},
"locked": {
"lastModified": 1642766877,
@ -507,9 +797,9 @@
},
"hercules-ci-effects": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_3",
"hercules-ci-agent": "hercules-ci-agent",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"nixpkgs-nixops": "nixpkgs-nixops"
},
"locked": {
@ -542,6 +832,22 @@
"type": "github"
}
},
"hpc-coveralls_2": {
"flake": false,
"locked": {
"lastModified": 1607498076,
"narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=",
"owner": "sevanspowell",
"repo": "hpc-coveralls",
"rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430",
"type": "github"
},
"original": {
"owner": "sevanspowell",
"repo": "hpc-coveralls",
"type": "github"
}
},
"hs-memory": {
"flake": false,
"locked": {
@ -575,9 +881,25 @@
"type": "github"
}
},
"iohk-nix_2": {
"flake": false,
"locked": {
"lastModified": 1626953580,
"narHash": "sha256-iEI9aTOaZMGsjWzcrctrC0usmiagwKT2v1LSDe9/tMU=",
"owner": "input-output-hk",
"repo": "iohk-nix",
"rev": "cbd497f5844249ef8fe617166337d59f2a6ebe90",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "iohk-nix",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1622060422,
@ -609,6 +931,22 @@
"type": "github"
}
},
"nix-tools_2": {
"flake": false,
"locked": {
"lastModified": 1636018067,
"narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=",
"owner": "input-output-hk",
"repo": "nix-tools",
"rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "nix-tools",
"type": "github"
}
},
"nixos-20_09": {
"locked": {
"lastModified": 1623585158,
@ -642,17 +980,20 @@
}
},
"nixpkgs": {
"flake": false,
"locked": {
"lastModified": 1602411953,
"narHash": "sha256-gbupmxRpoQZqL5NBQCJN2GI5G7XDEHHHYKhVwEj5+Ps=",
"owner": "LnL7",
"lastModified": 1628785280,
"narHash": "sha256-2B5eMrEr6O8ff2aQNeVxTB+9WrGE80OB4+oM6T7fOcc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f780534ea2d0c12e62607ff254b6b45f46653f7a",
"rev": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2003": {
@ -671,7 +1012,39 @@
"type": "github"
}
},
"nixpkgs-2003_2": {
"locked": {
"lastModified": 1620055814,
"narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-20.03-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2105": {
"locked": {
"lastModified": 1639202042,
"narHash": "sha256-xEMgCsIcDUQ0kw9xvqU0wObns580kpdcr1ACz83+gHs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "499ca2a9f6463ce119e40361f4329afa921a1d13",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-21.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2105_2": {
"locked": {
"lastModified": 1640283157,
"narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=",
@ -688,6 +1061,22 @@
}
},
"nixpkgs-2111": {
"locked": {
"lastModified": 1639213685,
"narHash": "sha256-Evuobw7o9uVjAZuwz06Al0fOWZ5JMKOktgXR0XgWBtg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "453bcb8380fd1777348245b3c44ce2a2b93b2e2d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-21.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2111_2": {
"locked": {
"lastModified": 1644793108,
"narHash": "sha256-MN/ElRTuE7pWuf99Hr1pbAxA3ApDLYuK6hIsA5sagjc=",
@ -703,7 +1092,7 @@
"type": "github"
}
},
"nixpkgs-2111_2": {
"nixpkgs-2111_3": {
"locked": {
"lastModified": 1640283207,
"narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=",
@ -736,6 +1125,22 @@
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1639239143,
"narHash": "sha256-9fFMUs6m3/4ZMflSqRgO4iEkBtFBnDyLWa3AB2tOvfs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e6df26a654b7fdd59a068c57001eab5736b1363c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable_2": {
"locked": {
"lastModified": 1641285291,
"narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=",
@ -752,6 +1157,20 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1602411953,
"narHash": "sha256-gbupmxRpoQZqL5NBQCJN2GI5G7XDEHHHYKhVwEj5+Ps=",
"owner": "LnL7",
"repo": "nixpkgs",
"rev": "f780534ea2d0c12e62607ff254b6b45f46653f7a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1633463774,
"narHash": "sha256-y3GjapcRzd42NgebQ4sx5GFJ53dYqNdF3UQu7/t6mUg=",
@ -767,7 +1186,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"flake": false,
"locked": {
"lastModified": 1628785280,
@ -801,6 +1220,23 @@
"type": "github"
}
},
"old-ghc-nix_2": {
"flake": false,
"locked": {
"lastModified": 1631092763,
"narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=",
"owner": "angerman",
"repo": "old-ghc-nix",
"rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8",
"type": "github"
},
"original": {
"owner": "angerman",
"ref": "master",
"repo": "old-ghc-nix",
"type": "github"
}
},
"plutarch": {
"inputs": {
"Shrinker": "Shrinker",
@ -810,12 +1246,12 @@
"cardano-crypto": "cardano-crypto",
"cardano-prelude": "cardano-prelude",
"cryptonite": "cryptonite",
"flake-compat": "flake-compat",
"flake-compat-ci": "flake-compat-ci",
"flake-compat": "flake-compat_2",
"flake-compat-ci": "flake-compat-ci_2",
"flat": "flat",
"foundation": "foundation",
"haskell-language-server": "haskell-language-server",
"haskell-nix": "haskell-nix",
"haskell-language-server": "haskell-language-server_2",
"haskell-nix": "haskell-nix_3",
"hercules-ci-effects": "hercules-ci-effects",
"hs-memory": "hs-memory",
"nixpkgs": [
@ -823,7 +1259,7 @@
"haskell-nix",
"nixpkgs-unstable"
],
"plutus": "plutus",
"plutus": "plutus_2",
"protolude": "protolude",
"safe-coloured-text": "safe-coloured-text",
"sized-functors": "sized-functors",
@ -850,14 +1286,41 @@
"cardano-repo-tool": "cardano-repo-tool",
"gitignore-nix": "gitignore-nix",
"hackage-nix": "hackage-nix",
"haskell-language-server": "haskell-language-server_2",
"haskell-language-server": "haskell-language-server",
"haskell-nix": "haskell-nix_2",
"iohk-nix": "iohk-nix",
"nixpkgs": "nixpkgs_3",
"pre-commit-hooks-nix": "pre-commit-hooks-nix_2",
"nixpkgs": "nixpkgs",
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"sphinxcontrib-haddock": "sphinxcontrib-haddock",
"stackage-nix": "stackage-nix"
},
"locked": {
"lastModified": 1639153959,
"narHash": "sha256-tz8wEV5oO2yu2WFl3+wAPHedJJUP/NMFYgfcsbcyji4=",
"owner": "input-output-hk",
"repo": "plutus",
"rev": "da4f85cdd2a3a261ce540e8dc51d2a3c5fa89ed2",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "plutus",
"type": "github"
}
},
"plutus_2": {
"inputs": {
"cardano-repo-tool": "cardano-repo-tool_2",
"gitignore-nix": "gitignore-nix_2",
"hackage-nix": "hackage-nix_2",
"haskell-language-server": "haskell-language-server_3",
"haskell-nix": "haskell-nix_4",
"iohk-nix": "iohk-nix_2",
"nixpkgs": "nixpkgs_4",
"pre-commit-hooks-nix": "pre-commit-hooks-nix_3",
"sphinxcontrib-haddock": "sphinxcontrib-haddock_2",
"stackage-nix": "stackage-nix_2"
},
"locked": {
"lastModified": 1642004499,
"narHash": "sha256-LMAMixBJRYZ5wgINjp4rb8hifEGkXptX8Z5e2Ip8HeM=",
@ -874,6 +1337,22 @@
}
},
"pre-commit-hooks-nix": {
"flake": false,
"locked": {
"lastModified": 1624971177,
"narHash": "sha256-Amf/nBj1E77RmbSSmV+hg6YOpR+rddCbbVgo5C7BS0I=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "397f0713d007250a2c7a745e555fa16c5dc8cadb",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks-nix_2": {
"flake": false,
"locked": {
"lastModified": 1622650193,
@ -889,7 +1368,7 @@
"type": "github"
}
},
"pre-commit-hooks-nix_2": {
"pre-commit-hooks-nix_3": {
"flake": false,
"locked": {
"lastModified": 1624971177,
@ -924,6 +1403,7 @@
},
"root": {
"inputs": {
"apropos-tx": "apropos-tx",
"haskell-nix": [
"plutarch",
"haskell-nix"
@ -932,7 +1412,7 @@
"plutarch",
"nixpkgs"
],
"nixpkgs-2111": "nixpkgs-2111",
"nixpkgs-2111": "nixpkgs-2111_2",
"plutarch": "plutarch"
}
},
@ -986,14 +1466,30 @@
"type": "github"
}
},
"sphinxcontrib-haddock_2": {
"flake": false,
"locked": {
"lastModified": 1594136664,
"narHash": "sha256-O9YT3iCUBHP3CEF88VDLLCO2HSP3HqkNA2q2939RnVY=",
"owner": "michaelpj",
"repo": "sphinxcontrib-haddock",
"rev": "f3956b3256962b2d27d5a4e96edb7951acf5de34",
"type": "github"
},
"original": {
"owner": "michaelpj",
"repo": "sphinxcontrib-haddock",
"type": "github"
}
},
"stackage": {
"flake": false,
"locked": {
"lastModified": 1642468901,
"narHash": "sha256-+Hu4m9i8v8Moey/C8fy8juyxB729JdsXz02cK8nJXLk=",
"lastModified": 1639185224,
"narHash": "sha256-ZBL0Lvqq8/Iwl8F5sT2N9J8+HTh0OY+09LkkUVtuUtY=",
"owner": "input-output-hk",
"repo": "stackage.nix",
"rev": "7544f8fd16bb92b7cf90cb51cb4ddc43173526de",
"rev": "14819f5c85a92e5fb6e322cc809c803fa6419bd4",
"type": "github"
},
"original": {
@ -1018,6 +1514,38 @@
"type": "github"
}
},
"stackage-nix_2": {
"flake": false,
"locked": {
"lastModified": 1597712578,
"narHash": "sha256-c/pcfZ6w5Yp//7oC0hErOGVVphBLc5vc4IZlWKZ/t6E=",
"owner": "input-output-hk",
"repo": "stackage.nix",
"rev": "e32c8b06d56954865725514ce0d98d5d1867e43a",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "stackage.nix",
"type": "github"
}
},
"stackage_2": {
"flake": false,
"locked": {
"lastModified": 1642468901,
"narHash": "sha256-+Hu4m9i8v8Moey/C8fy8juyxB729JdsXz02cK8nJXLk=",
"owner": "input-output-hk",
"repo": "stackage.nix",
"rev": "7544f8fd16bb92b7cf90cb51cb4ddc43173526de",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "stackage.nix",
"type": "github"
}
},
"sydtest": {
"flake": false,
"locked": {

View file

@ -4,6 +4,12 @@
inputs.nixpkgs.follows = "plutarch/nixpkgs";
inputs.haskell-nix.follows = "plutarch/haskell-nix";
# https://github.com/mlabs-haskell/apropos-tx/pull/28
inputs.apropos-tx.url =
"github:mlabs-haskell/apropos-tx?rev=5b74ba897a6f02718c163bf588a08c5e3e9de204";
inputs.apropos-tx.inputs.nixpkgs.follows =
"plutarch/haskell-nix/nixpkgs-unstable";
# temporary fix for nix versions that have the transitive follows bug
# see https://github.com/NixOS/nix/issues/6013
inputs.nixpkgs-2111 = { url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin"; };
@ -40,10 +46,16 @@
src = ./.;
compiler-nix-name = ghcVersion;
inherit (plutarch) cabalProjectLocal;
extraSources = plutarch.extraSources ++ [{
src = inputs.plutarch;
subdirs = [ "." "plutarch-benchmark" ];
}];
extraSources = plutarch.extraSources ++ [
{
src = inputs.plutarch;
subdirs = [ "." "plutarch-benchmark" ];
}
{
src = inputs.apropos-tx;
subdirs = [ "." ];
}
];
modules = [ (plutarch.haskellModule system) ];
shell = {
withHoogle = true;
@ -69,6 +81,7 @@
ps.plutarch
ps.plutarch-benchmark
ps.tasty-quickcheck
ps.apropos-tx
];
};
};