Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase verifies Compilation #6379

Merged
merged 190 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
7db7e37
Trace removal re-implemented as a IR rewrite rule (#5907)
Unisay Apr 17, 2024
d32bc7e
CIP-0057 Howto: exporting a Plutus contract blueprint (#5817)
Unisay Apr 18, 2024
3e00141
[Release] 1.26.0.0 (#5914)
ana-pantilie Apr 19, 2024
7707aab
A quick isabelle experiment. (#5913)
ramsay-t Apr 19, 2024
9d0a9cf
PLT-8171: Combine PIR, PLC, and UPLC into a single executable (#5699)
bezirg Apr 21, 2024
83fe75f
chore(deps): bump slackapi/slack-github-action from 1.25.0 to 1.26.0 …
dependabot[bot] Apr 22, 2024
2e2a7fb
Kwxm/plc spec/bitwise conversions (#5911)
Apr 22, 2024
bcce392
Use Int64 in CostModelParams (#5920)
zliu41 Apr 23, 2024
b97e8be
Change CMTooFewParamsError to a warning (#5912)
zliu41 Apr 23, 2024
3944e09
[Costing] Provide support for multiple 'CostModel's (#5851)
effectfully Apr 25, 2024
0567ef7
CaseOfCase kind mismatch error fix (#5923)
Unisay Apr 26, 2024
2748f90
Fix some Notes so they pass the check (#5930)
Apr 29, 2024
4a29380
Restore old cost model param names (#5932)
Apr 29, 2024
d64be66
Tidy up SimpleJSON.hs (#5936)
Apr 30, 2024
6912db2
chore: formatting (#5937)
Unisay Apr 30, 2024
d10d5df
1.27.0.0 (#5938)
zliu41 Apr 30, 2024
d319fe5
Do not build the plutus executable if GHC <9.6 (#5940)
zliu41 Apr 30, 2024
f1eae1c
Update CONTRIBUTING.adoc (#5950)
zliu41 May 3, 2024
619ddbc
Add 'Note [Table of all possible ledger's states w.r.t. cost model pa…
effectfully May 3, 2024
067e74f
Remove annoying error message (#5956)
May 4, 2024
ca60dad
Add plutus-tx-template Release Instructions and GH Workflow (#5952)
zeme-wana May 6, 2024
ef40c38
[StdLib] Strictify 'fix' (#5939)
effectfully May 6, 2024
16be7da
[PIR] Don't generate 'fixBy' if you don't need to (#5954)
effectfully May 6, 2024
34fa7c5
Chore: formatting, imports, pragmas. (#5965)
Unisay May 8, 2024
b6e82b6
CaseOfCase UPLC transformation tests. (#5960)
Unisay May 8, 2024
253004f
Avoid evaluating `nilCase` strictly in `matchList`, and rename the or…
zliu41 May 9, 2024
1df52aa
Improvements to plutus-metatheory site (#5959)
zeme-wana May 11, 2024
774616b
chore(deps): bump nixbuild/nix-quick-install-action from 27 to 28 (#5…
dependabot[bot] May 13, 2024
59d4b04
[Build] Remove the doctests runner of 'prettyprinter-configurable' (#…
effectfully May 14, 2024
6e3da00
Kwxm/mainnet script budgets (#5973)
May 14, 2024
5f207e5
Release 1.28.0.0 (#5975)
Unisay May 15, 2024
92d94ca
[PlutusTx] [Builtins] Split 'FromBuiltin' and 'ToBuiltin' (#5971)
effectfully May 15, 2024
d99ba33
Update README.md (#5997)
May 15, 2024
802cf4f
chore(deps): bump cachix/install-nix-action from 26 to 27 (#5999)
dependabot[bot] May 16, 2024
5ee2936
Script to prepare binary executables for uploading to the github rele…
Unisay May 17, 2024
0d8149c
Kwxm/mainnet script budgets 2 (#6057)
May 20, 2024
1529ef8
Add integerToByteString and byteStringToInteger to PlutusV2 at PV10 (…
zliu41 May 20, 2024
9326493
[Refactoring] Remove 'UnknownBuiltin' and 'UnknownBuiltinType' (#6064)
effectfully May 20, 2024
ef97537
Conditionally add 'triage' label to new issues (#6061)
zeme-wana May 21, 2024
0b670f7
Fix bug in add-triage-label.yml (#6067)
zeme-wana May 21, 2024
5eb57a5
chore(deps): bump benchmark-action/github-action-benchmark (#6058)
dependabot[bot] May 21, 2024
0ce328c
Add integerToByteString and byteStringToInteger to V2.ParamName (#6065)
zliu41 May 21, 2024
acdaeb2
Add PlutusTx Map backed by Data (#5927)
ana-pantilie May 21, 2024
794bf9d
Let nightly.yml accept hedgehog-tests input (#6062)
zeme-wana May 22, 2024
5771700
Remove obsolete defer-plugin-errors flag (#6080)
zeme-wana May 22, 2024
252b634
Add a Plutus Tx test utility package (#6086)
ana-pantilie May 23, 2024
6c6918c
[Errors] polish evaluation errors (#6043)
effectfully May 23, 2024
1afe001
[Test] Add do-notation support for 'TestNested' (#5948)
effectfully May 23, 2024
85cf1ed
Run nightly tests on plutus-benchmark (#6091)
zeme-wana May 24, 2024
d7a5c76
[Exe] Generalize 'withL' to 'withLangGeneral' (#5918)
effectfully May 29, 2024
00beff4
Kwxm/provisional conway cost model (#6087)
May 29, 2024
f63f3ca
Update issue templates (#6037)
zliu41 May 30, 2024
e675e65
Remove reference to benching.csv in plutus-core.cabal (#6149)
May 30, 2024
7b3fd3e
PlutusV3: Datum/Redeemer in ScriptContext, Datum Optional, Unified Sc…
zliu41 May 30, 2024
20e418e
Kwxm/costing/reduce CEK CPU step costs B (#6153)
May 30, 2024
cd20770
[Test] Dump UPLC for 'strictLetRec' (#5963)
effectfully May 30, 2024
7411e14
Use the most recent evaluation context for most of the benchmarks (#6…
May 30, 2024
0d26761
[Builtins] Polish handling of integral types (#6036)
effectfully May 31, 2024
f34e999
Tests for the `preserve-logging` flag. (#6162)
Unisay Jun 3, 2024
d34e4d3
Require PlutusV3 scripts to evaluate to BuiltinUnit (#6159)
zliu41 Jun 3, 2024
50c6cb0
Quadratic costing for integer division functions (#6161)
Jun 3, 2024
bbeb1a4
Fix V2's costModelParamsForTesting (#6166)
zliu41 Jun 3, 2024
c013014
Release 1.29.0.0 (#6170)
Jun 4, 2024
f601fb9
Update update-version.sh to match package names less greedily (#6174)
Jun 5, 2024
a2c6bc0
More error checking (#6179)
Jun 5, 2024
f1f2e9f
Reorganized Plutus user guide on the Docusaurus platform initial depl…
joseph-fajen Jun 5, 2024
88ad493
Initial version of new combined-haddock.yml workflow (#6182)
zeme-wana Jun 6, 2024
a43d8f9
[Builtins] Make 'BuiltinSuccess' the first constructor (#5885)
effectfully Jun 6, 2024
1848101
[PlutusLedgerApi] [Refactoring] Polish imports and exports (#6178)
effectfully Jun 6, 2024
3656505
Adding link to Haddock documentation to index.md (#6187)
joseph-fajen Jun 6, 2024
4d68254
removing outdated and incorrect content from the Plutus platform page…
joseph-fajen Jun 7, 2024
3f2e83b
Add `Data.Value` to `PlutusLedgerAPI` (#6143)
ana-pantilie Jun 7, 2024
c9b77f5
added the term Haddock where the public Plutus code libraries are men…
joseph-fajen Jun 7, 2024
be0aa25
Refactored Serialise/Flat-Via. Fixes #6083 (#6144)
bezirg Jun 8, 2024
37e681c
Add Redeemer to V3 ScriptContext Pretty instance (#6191)
ana-pantilie Jun 8, 2024
f6b9bdc
Logical operations (#5970)
kozross Jun 9, 2024
811f9fc
Combined Haddock Generation (#6146)
zeme-wana Jun 10, 2024
5894525
Run nightly tests on plutus-shared instead of plutus-benchmark (#6195)
zeme-wana Jun 10, 2024
a9a8315
Run combined-haddock.yml workflow on plutus-shared instead of plutus-…
zeme-wana Jun 10, 2024
7b70ab0
Fix combined_haddock.sh script (#6199)
zeme-wana Jun 10, 2024
8a0dacd
[Test] [Builtins] Add golden tests with unlifting errors (#6189)
effectfully Jun 10, 2024
c8450b5
Changed the term "Documentation" to "User guide" in the upper left ar…
joseph-fajen Jun 10, 2024
eed1426
Update Alert Message in longitudinal-benchmark.yml (#6201)
zeme-wana Jun 11, 2024
69eff87
[Test] Add missing bitwise builtins golden files (#6204)
effectfully Jun 11, 2024
6910d70
[Errors] Preserve operational unlifting errors (#6181)
effectfully Jun 12, 2024
56c90bf
Docs raise visibility code libraries (#6203)
joseph-fajen Jun 12, 2024
7d6dbc1
[Test] [Builtin] Polish 'MakeRead' tests (#6202)
effectfully Jun 12, 2024
294eaca
Remove AssocMap comparison instances (#6173)
ana-pantilie Jun 13, 2024
4ea8b3d
Update README.adoc (#6206)
joseph-fajen Jun 13, 2024
3b20c63
Remove PyF as it depends on GHC and causes depenecy conflicts downstr…
Unisay Jun 13, 2024
2ec9bf3
Bitwise operations (#6090)
kozross Jun 13, 2024
62ba600
Reduce coverage limits for signature verification tests (#6209)
Jun 13, 2024
72fa971
moved the Getting Started page to immediately follow the Introduction…
joseph-fajen Jun 14, 2024
9e3147c
Haskell Eq for AssocMap (#6213)
ana-pantilie Jun 14, 2024
5dffbd7
Shorten some filenames in the conformance tests (#6214)
Jun 14, 2024
3a36126
MK-5422 move getting started page fixing link (#6215)
joseph-fajen Jun 14, 2024
cc05625
[Evaluation] Move stuff under `enterComputeCek` (#6156)
effectfully Jun 14, 2024
bc8c3a7
Release 1.30.0.0 (#6216)
Unisay Jun 17, 2024
623c715
plutus-ir: fix redundant imports (#6218)
disassembler Jun 18, 2024
23edce1
Fix incorrect Note reference (#6217)
Jun 18, 2024
cc12361
Add documentation to `Data.Value` (#6220)
ana-pantilie Jun 18, 2024
a94bffd
[Builtins] Replace 'EvaluationResult' with 'BuiltinResult' (#5926)
effectfully Jun 18, 2024
7dbbd7f
New `./scripts/combined-haddock.sh` (#6205)
zeme-wana Jun 19, 2024
8c17ae4
Add workflow for publishing Agda Metatheory site (#6223)
zeme-wana Jun 20, 2024
1091562
Fixes to `metatheory-site.yml` workflow (#6228)
zeme-wana Jun 20, 2024
f9dfec2
Final changes to `metatheory-site.yml` workflow (#6229)
zeme-wana Jun 21, 2024
c33af07
Update RELEASE.adoc with instructions to delete unused branches and t…
zeme-wana Jun 21, 2024
151887d
Complete Migration from RDT to Docusaurus (#6227)
zeme-wana Jun 21, 2024
af578b5
Fix broken links in docusaurus docs (#6232)
zeme-wana Jun 21, 2024
8845e12
Add flake.nix for doc/docusaurus (#6233)
zeme-wana Jun 21, 2024
b9ad1dd
making a spelling correction on the doc/docusaurus README file (#6235)
joseph-fajen Jun 21, 2024
3ab37c5
[Builtins] Remove 'Emitter' and 'MonadEmitter' (#6224)
effectfully Jun 22, 2024
45ab436
Refactor GitHub Workflows (#6124)
zeme-wana Jun 24, 2024
84ad029
Fix & simplify SOP encoding example comment (#6231)
klntsky Jun 24, 2024
8f3c74f
Update github-action-benchmark version (#6238)
zeme-wana Jun 25, 2024
6357d23
Make it build with ghc 9.10 (#6079)
erikd Jun 25, 2024
6900c42
Update version of github-action-benchmark to v1.20.3 (#6240)
zeme-wana Jun 25, 2024
5579d34
Add workflows to check broken links and deploy papers to GH Pages (#6…
zeme-wana Jun 26, 2024
d3a42f2
Publish papers and specs on push to master only (#6246)
zeme-wana Jun 26, 2024
89a8aa1
Cabal project to compile docusaurus examples. (#6239)
Unisay Jun 26, 2024
dcd6f5d
Added cardano-constitution package (#6234)
bezirg Jun 26, 2024
b63c544
[Test] Turn off CSE for problematic tests (#6249)
effectfully Jun 26, 2024
91b4ed6
[Test] Turn off CSE for the 'patternMatching' test (#6251)
effectfully Jun 27, 2024
a156996
[Optimization] Remove case-of-case (#6248)
effectfully Jun 27, 2024
30402a4
Spec that verifies various script sizes (#6247)
Unisay Jun 27, 2024
e8f9389
Add cardano-constitution-tests and slack-message-broker workflows (#6…
zeme-wana Jun 27, 2024
3cdfbca
Updates to slack-message-broker.yml (#6258)
zeme-wana Jun 27, 2024
ed71a3d
Update slackapi/slack-github-action version -> v1.26.0 (#6259)
zeme-wana Jun 27, 2024
3df47ef
Improve messages in slack-message-broker.yml (#6260)
zeme-wana Jun 27, 2024
29eabaf
Fix error message in slack-message-broker.yml (#6261)
zeme-wana Jun 27, 2024
e3c3fd2
Fix another error in slack-message-broker.yml (#6262)
zeme-wana Jun 27, 2024
d0d77dc
Fix "un-rolling" a list type. (#6165)
Unisay Jun 28, 2024
115c3df
constitution: Add executable that creates json envelope (#6267)
bezirg Jun 28, 2024
c74136f
Fix bug in ./script/combined-haddock.sh (#6263)
zeme-wana Jul 1, 2024
b34d6ca
Update baseUrl in docusaurus.config.ts (#6275)
zeme-wana Jul 2, 2024
cabfc01
Improvements to haddock-site.yml (support auto-publish on push to mas…
zeme-wana Jul 2, 2024
cb791cd
Better messages in slack-message-broker.yml (#6280)
zeme-wana Jul 2, 2024
f616b87
Remove --ignore-url's from linkchecker step in combined-haddock.sh (#…
zeme-wana Jul 2, 2024
32a7336
Add cabal update step in combined-haddock.sh (#6283)
zeme-wana Jul 4, 2024
e5c0e76
Fix CsvTable.tsx and LiteralInclde.tsx in docusaurus (#6282)
zeme-wana Jul 4, 2024
7a24d97
Fix haddock documentation for cardano-constitution (#6284)
zeme-wana Jul 5, 2024
3f60557
Stronger docusaurus builds and general QOL improvements (#6287)
zeme-wana Jul 5, 2024
db89d22
Move package-lock.json from top-level to scripts/blueprints (#6289)
zeme-wana Jul 5, 2024
ee7de68
Fix editUrl in docusaurus.config.ts (#6291)
zeme-wana Jul 6, 2024
79fc117
chore(deps): bump JamesIves/github-pages-deploy-action (#6292)
dependabot[bot] Jul 8, 2024
317b63d
Fix typos (#6288)
omahs Jul 8, 2024
92f390c
Detect broken links for haddock,metatheory,docusaurus + local repo fi…
zeme-wana Jul 8, 2024
c1b9208
Fix broken linkchecker workflows (#6295)
zeme-wana Jul 8, 2024
db5cabb
Add .github/linkchecker/action.yml
zeme-wana Jul 9, 2024
55861af
Add support for ghc910 to hydraJobs (#6293)
zeme-wana Jul 9, 2024
ceb91aa
Disable linkchecker on live sites (#6298)
zeme-wana Jul 9, 2024
42d08e0
[Bug] Fix 'isNormalType' and add 'prop_normalizedTypeIsNormal' (#6272)
effectfully Jul 10, 2024
8ec1b64
Analyse script events supports PlutusLedgerLanguage V3 (#6300)
Unisay Jul 11, 2024
51ae3da
fix: parameter 33 should be a Rational (#6302)
RSoulatIOHK Jul 11, 2024
19f192d
Address guardrail script audit comments (#6305)
zliu41 Jul 12, 2024
0c02489
All names are printed with their unique values by default. (#5972)
Unisay Jul 12, 2024
5c06051
fix: types in defaultConstitution (#6307)
RSoulatIOHK Jul 17, 2024
b49bd63
Fix overflow bug in shiftByteString, rotateByteString, add tests to e…
kozross Jul 18, 2024
de7339b
Release 1.31.0.0 (#6312)
Unisay Jul 18, 2024
903e383
Re-export bitwise builtins from PlutusTx.Prelude (#6313)
kozross Jul 18, 2024
d89a339
[Costing] Increase the cost of constructors of '[]' (#6285)
effectfully Jul 18, 2024
0da4c4b
Change writeBits to take changelists as two separate lists (#6317)
kozross Jul 19, 2024
514d521
[Costing] Remove the 'ExMemoryUsage' instance for 'SomeTypeIn' (#6318)
effectfully Jul 19, 2024
db11987
feat: New version of VT-CC-01 (#6320)
RSoulatIOHK Jul 22, 2024
8c7a5f6
[Test] Make tests take reasonable time (#6286)
effectfully Jul 23, 2024
65f6714
fix: haddock error (#6323)
Unisay Jul 23, 2024
3461df2
Reverse hunk test_multiSplitSound (#6324)
bezirg Jul 23, 2024
39ae101
Kwxm/costing/bitwise 4 (#6301)
Jul 24, 2024
7f02fab
8-queens using bitwise primops benchmark (#6311)
kozross Jul 25, 2024
d510d24
[Plinth] [Builtins] Fix 'writeBits' (#6329)
effectfully Jul 25, 2024
bfac69f
[Plinth] Ban using 'toBuiltin' and 'fromBuiltin' (#6342)
effectfully Jul 26, 2024
5571f53
Kwxm/bitwise/enable nqueens benchmark (#6343)
Jul 26, 2024
c7eb24c
[plc] Support for `Natural` numbers in the default universe, backed b…
bezirg Jul 26, 2024
f74023e
nothunks ^>= 0.2 (#6349)
Unisay Jul 27, 2024
613ab5f
Make NumBytesCostedAsNumWords use Integer instead of Int (#6350)
Jul 29, 2024
ffe41b8
[Benchmark] Reduce the number of benchmarks (#6328)
effectfully Jul 30, 2024
ed76af5
[Test] Improve distribution of generated integers (#6315)
effectfully Jul 31, 2024
a4b0f43
[Plinth] [Builtins] Add a general 'mkNil' (#6347)
effectfully Jul 31, 2024
88c7e23
[Refactoring] Use 'KnownBuiltinTypeIn' instead of 'HasConstant' consi…
effectfully Aug 1, 2024
d3cf117
Restore auto generation of compiler option table (#6373)
zliu41 Aug 2, 2024
36311fe
Add the bitwise builtins to the metatheory (#6368)
Aug 5, 2024
5947b18
Restore CI checks for doc site code (#6376)
zliu41 Aug 5, 2024
e90e9f0
andByteString conformance cases (#6356)
kozross Aug 6, 2024
cd73651
Conformance cases for complementByteString (#6359)
kozross Aug 6, 2024
966b420
Conformance for orByteString (#6357)
kozross Aug 6, 2024
922c9c1
Conformance cases for readBit (#6360)
kozross Aug 6, 2024
0b6a695
Conformance for shiftByteString (#6363)
kozross Aug 6, 2024
8dcfa54
Conformance for findFirstSetBit (#6366)
kozross Aug 6, 2024
3d489da
Conformance for xorByteString (#6358)
kozross Aug 6, 2024
51a9f16
Conformance for countSetBits (#6365)
kozross Aug 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Test] Add do-notation support for 'TestNested' (#5948)
This refactors the `TestNested` machinery, so that

1. it supports listing tests in a `do`-block, which is something that I need in a different PR to update a huge `do`-block so that some of the tests there become golden
2. the API is more granular and pushes the user in the right direction

I've also improved some of the tests while I was there and unified the formatting. Most of the tests we have use 4 spaces instead of 2, so I preserved that, we're probably going to run `fourmolu` over all the files eventually anyway and that'll make the indentation 2-space-based.
  • Loading branch information
effectfully authored May 23, 2024
commit 1afe0015f2160f4757094318a4fd8a9724a33721
8 changes: 4 additions & 4 deletions plutus-benchmark/lists/test/Lookup/Spec.hs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
module Lookup.Spec (tests) where

import Test.Tasty
import Test.Tasty.Extras (TestNested, runTestGroupNestedGhc)
import Test.Tasty.Extras (TestNested, runTestNested, testNestedGhc)

import PlutusBenchmark.Lists.Lookup.Compiled qualified as Compiled

import PlutusTx.Test qualified as Tx

-- Make a set of golden tests with results stored in a given subdirectory
-- inside a subdirectory determined by the GHC version.
testGroupGhcIn :: [FilePath] -> [TestNested] -> TestTree
testGroupGhcIn dir = runTestGroupNestedGhc (["lists", "test"] ++ dir)
runTestGhc :: [FilePath] -> [TestNested] -> TestTree
runTestGhc path = runTestNested (["lists", "test"] ++ path) . pure . testNestedGhc

tests :: TestTree
tests =
testGroupGhcIn ["Lookup"] $
runTestGhc ["Lookup"] $
flip concatMap sizes $ \sz ->
[ Tx.goldenBudget ("match-scott-list-" ++ show sz) $
Compiled.mkMatchWithListsCode (Compiled.workloadOfSize sz)
Expand Down
8 changes: 4 additions & 4 deletions plutus-benchmark/lists/test/Sum/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module Sum.Spec (tests) where

import Test.Tasty
import Test.Tasty.Extras (TestNested, runTestGroupNestedGhc)
import Test.Tasty.Extras (TestNested, runTestNested, testNestedGhc)
import Test.Tasty.QuickCheck

import PlutusBenchmark.Common (Term, cekResultMatchesHaskellValue)
Expand All @@ -14,8 +14,8 @@ import PlutusTx.Test qualified as Tx

-- Make a set of golden tests with results stored in a given subdirectory
-- inside a subdirectory determined by the GHC version.
testGroupGhcIn :: [FilePath] -> [TestNested] -> TestTree
testGroupGhcIn dir = runTestGroupNestedGhc (["lists", "test"] ++ dir)
runTestGhc :: [FilePath] -> [TestNested] -> TestTree
runTestGhc path = runTestNested (["lists", "test"] ++ path) . pure . testNestedGhc

-- | Check that the various summation functions all give the same result as 'sum'

Expand All @@ -37,7 +37,7 @@ tests =
, testProperty "Compiled left fold (built-in lists)" $ prop_sum Compiled.mkSumLeftBuiltinTerm
, testProperty "Compiled left fold (data lists)" $ prop_sum Compiled.mkSumLeftDataTerm
]
, testGroupGhcIn ["Sum"]
, runTestGhc ["Sum"]
[ Tx.goldenBudget "right-fold-scott" $ Compiled.mkSumRightScottCode input
, Tx.goldenBudget "right-fold-built-in" $ Compiled.mkSumRightBuiltinCode input
, Tx.goldenBudget "right-fold-data" $ Compiled.mkSumRightDataCode input
Expand Down
10 changes: 5 additions & 5 deletions plutus-benchmark/marlowe/test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Main (main) where

import Test.Tasty
import Test.Tasty.Extras (TestNested, runTestGroupNestedGhc)
import Test.Tasty.Extras (TestNested, runTestNested, testNestedGhc)

import PlutusBenchmark.Marlowe.BenchUtil (benchmarkToUPLC, rolePayoutBenchmarks,
semanticsBenchmarks)
Expand All @@ -30,8 +30,8 @@ mkBudgetTest validator bm@M.Benchmark{..} =

-- Make a set of golden tests with results stored in a given subdirectory
-- inside a subdirectory determined by the GHC version.
testGroupGhcIn :: [FilePath] -> [TestNested] -> TestTree
testGroupGhcIn path = runTestGroupNestedGhc (["marlowe", "test"] ++ path)
runTestGhc :: [FilePath] -> [TestNested] -> TestTree
runTestGhc path = runTestNested (["marlowe", "test"] ++ path) . pure . testNestedGhc

main :: IO ()
main = do
Expand All @@ -45,13 +45,13 @@ main = do
let allTests :: TestTree
allTests =
testGroup "plutus-benchmark Marlowe tests"
[ testGroupGhcIn ["semantics"] $
[ runTestGhc ["semantics"] $
goldenSize "semantics" marloweValidator
: [ goldenUEvalBudget name [value]
| bench <- semanticsMBench
, let (name, value) = mkBudgetTest marloweValidator bench
]
, testGroupGhcIn ["role-payout"] $
, runTestGhc ["role-payout"] $
goldenSize "role-payout" rolePayoutValidator
: [ goldenUEvalBudget name [value]
| bench <- rolePayoutMBench
Expand Down
14 changes: 7 additions & 7 deletions plutus-benchmark/nofib/test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ run to completion. -}
module Main where

import Test.Tasty
import Test.Tasty.Extras (TestNested, runTestGroupNestedGhc)
import Test.Tasty.Extras (TestNested, runTestNested, testNestedGhc)
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck

Expand All @@ -26,8 +26,8 @@ import PlutusTx.Test qualified as Tx

-- Make a set of golden tests with results stored in subdirectories determined
-- by the GHC version.
testGroupGhc :: [TestNested] -> TestTree
testGroupGhc = runTestGroupNestedGhc ["nofib", "test"]
runTestGhc :: [TestNested] -> TestTree
runTestGhc = runTestNested ["nofib", "test"] . pure . testNestedGhc

-- Unit tests comparing PLC and Haskell computations on given inputs

Expand All @@ -47,7 +47,7 @@ testClausify = testGroup "clausify"
, testCase "formula3" $ mkClausifyTest Clausify.F3
, testCase "formula4" $ mkClausifyTest Clausify.F4
, testCase "formula5" $ mkClausifyTest Clausify.F5
, testGroupGhc
, runTestGhc
[ Tx.goldenPirReadable "clausify-F5" formula5example
, Tx.goldenSize "clausify-F5" formula5example
, Tx.goldenBudget "clausify-F5" formula5example
Expand All @@ -70,7 +70,7 @@ testKnights = testGroup "knights" -- Odd sizes call "error" because there are n
, testCase "depth 100, 4x4" $ mkKnightsTest 100 4
, testCase "depth 100, 6x6" $ mkKnightsTest 100 6
, testCase "depth 100, 8x8" $ mkKnightsTest 100 8
, testGroupGhc
, runTestGhc
[ Tx.goldenPirReadable "knights10-4x4" knightsExample
, Tx.goldenSize "knights10-4x4" knightsExample
, Tx.goldenBudget "knights10-4x4" knightsExample
Expand All @@ -93,7 +93,7 @@ testQueens = testGroup "queens"
, testCase "Bjbt1" $ mkQueensTest 4 Queens.Bjbt1
, testCase "Bjbt2" $ mkQueensTest 4 Queens.Bjbt2
, testCase "Fc" $ mkQueensTest 4 Queens.Fc
, testGroupGhc
, runTestGhc
[ Tx.goldenPirReadable "queens4-bt" queens4btExample
, Tx.goldenSize "queens4-bt" queens4btExample
, Tx.goldenBudget "queens4-bt" queens4btExample
Expand All @@ -106,7 +106,7 @@ testQueens = testGroup "queens"
, testCase "Bjbt1" $ mkQueensTest 5 Queens.Bjbt1
, testCase "Bjbt2" $ mkQueensTest 5 Queens.Bjbt2
, testCase "Fc" $ mkQueensTest 5 Queens.Fc
, testGroupGhc
, runTestGhc
[ Tx.goldenPirReadable "queens5-fc" queens5fcExample
, Tx.goldenSize "queens5-fc" queens5fcExample
, Tx.goldenBudget "queens5-fc" queens5fcExample
Expand Down
12 changes: 6 additions & 6 deletions plutus-benchmark/script-contexts/test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Main (main) where
import Data.Text qualified as Text

import Test.Tasty
import Test.Tasty.Extras (TestNested, runTestGroupNestedGhc)
import Test.Tasty.Extras (TestNested, runTestNested, testNestedGhc)
import Test.Tasty.HUnit

import PlutusBenchmark.Common (Term, compiledCodeToTerm, runTermCek, unsafeRunTermCek)
Expand All @@ -17,8 +17,8 @@ import PlutusTx.Test qualified as Tx

-- Make a set of golden tests with results stored in subdirectories determined
-- by the GHC version.
testGroupGhc :: [TestNested] -> TestTree
testGroupGhc = runTestGroupNestedGhc ["script-contexts", "test"]
runTestGhc :: [TestNested] -> TestTree
runTestGhc = runTestNested ["script-contexts", "test"] . pure . testNestedGhc

assertSucceeded :: Term -> Assertion
assertSucceeded t =
Expand All @@ -43,7 +43,7 @@ testCheckSc1 = testGroup "checkScriptContext1"
compiledCodeToTerm $ mkCheckScriptContext1Code (mkScriptContext 4)
, testCase "fails on 5" . assertFailed $
compiledCodeToTerm $ mkCheckScriptContext1Code (mkScriptContext 5)
, testGroupGhc [ Tx.goldenSize "checkScriptContext1" $
, runTestGhc [ Tx.goldenSize "checkScriptContext1" $
mkCheckScriptContext1Code (mkScriptContext 1)
, Tx.goldenPirReadable "checkScriptContext1" $
mkCheckScriptContext1Code (mkScriptContext 1)
Expand All @@ -64,7 +64,7 @@ testCheckSc2 = testGroup "checkScriptContext2"
compiledCodeToTerm $ mkCheckScriptContext2Code (mkScriptContext 4)
, testCase "succeed on 5" . assertSucceeded $
compiledCodeToTerm $ mkCheckScriptContext2Code (mkScriptContext 5)
, testGroupGhc [ Tx.goldenSize "checkScriptContext2" $
, runTestGhc [ Tx.goldenSize "checkScriptContext2" $
mkCheckScriptContext2Code (mkScriptContext 1)
, Tx.goldenPirReadable "checkScriptContext2" $
mkCheckScriptContext2Code (mkScriptContext 1)
Expand All @@ -81,7 +81,7 @@ testCheckSc2 = testGroup "checkScriptContext2"

testCheckScEquality :: TestTree
testCheckScEquality = testGroup "checkScriptContextEquality"
[ testGroupGhc [ Tx.goldenBudget "checkScriptContextEqualityData-20" $
[ runTestGhc [ Tx.goldenBudget "checkScriptContextEqualityData-20" $
mkScriptContextEqualityDataCode (mkScriptContext 20)
, Tx.goldenEvalCekCatch "checkScriptContextEqualityData-20" $
[mkScriptContextEqualityDataCode (mkScriptContext 20)]
Expand Down
2 changes: 1 addition & 1 deletion plutus-core/executables/plutus/AnyProgram/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ compileProgram = curry $ \case
(SUplc _ _, SPir SName _) -> throwingPIR "Cannot compile uplc to pir"

embedProgram :: PLC.Program tyname name uni fun ann -> PIR.Program tyname name uni fun ann
embedProgram (PLC.Program a v t) = PIR.Program a v $ embed t
embedProgram (PLC.Program a v t) = PIR.Program a v $ embedTerm t

toOutAnn :: (Functor f, PIR.AsError e uni fun a, MonadError e m)
=> SAnn s1
Expand Down
1 change: 0 additions & 1 deletion plutus-core/executables/plutus/AnyProgram/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import Types
import UntypedPlutusCore as UPLC
import UntypedPlutusCore.Evaluation.Machine.Cek as UPLC

import Data.Foldable
import Data.Text as Text

runRun :: (?opts :: Opts)
Expand Down
1 change: 0 additions & 1 deletion plutus-core/executables/plutus/Debugger/TUI/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import Control.Concurrent
import Control.Monad.Except (runExcept)
import Control.Monad.Primitive (unsafeIOToPrim)
import Control.Monad.ST (RealWorld)
import Data.Foldable
import Data.Maybe
import GHC.IO (stToIO)
import Graphics.Vty qualified as Vty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ import PlutusIR.Parser qualified as PIR (parse, program)
import Control.Monad.Except
import Data.Aeson qualified as Aeson
import Data.ByteString.Lazy qualified as BSL
import Data.Foldable (traverse_)
import Data.HashMap.Monoidal qualified as H
import Data.Kind (Type)
import Data.List (intercalate)
Expand Down
1 change: 1 addition & 0 deletions plutus-core/plutus-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ library plutus-core-testlib
, data-default-class
, dependent-map >=0.4.0.0
, filepath
, free
, hashable
, hedgehog >=1.0
, lazy-search
Expand Down
1 change: 0 additions & 1 deletion plutus-core/plutus-core/src/PlutusCore/Check/Normal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import PlutusCore.Core
import PlutusCore.Error

import Control.Monad.Except
import Data.Foldable (traverse_)

-- | Ensure that all types in the 'Program' are normalized.
checkProgram
Expand Down
2 changes: 0 additions & 2 deletions plutus-core/plutus-core/src/PlutusCore/Core/Instance/Eq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import PlutusCore.Rename.Monad

import Universe

import Data.Foldable (for_)

instance (GEq uni, Eq ann) => Eq (Type TyName uni ann) where
ty1 == ty2 = runEqRename @TypeRenaming $ eqTypeM ty1 ty2

Expand Down
22 changes: 11 additions & 11 deletions plutus-core/plutus-core/src/PlutusCore/MkPlc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module PlutusCore.MkPlc
, mkTyVar
, tyDeclVar
, Def (..)
, embed
, embedTerm
, TermDef
, TypeDef
, FunctionType (..)
Expand Down Expand Up @@ -121,20 +121,20 @@ instance TermLike (Term tyname name uni fun) tyname name uni fun where
constr = Constr
kase = Case

embed :: TermLike term tyname name uni fun => Term tyname name uni fun ann -> term ann
embed = \case
embedTerm :: TermLike term tyname name uni fun => Term tyname name uni fun ann -> term ann
embedTerm = \case
Var a n -> var a n
TyAbs a tn k t -> tyAbs a tn k (embed t)
LamAbs a n ty t -> lamAbs a n ty (embed t)
Apply a t1 t2 -> apply a (embed t1) (embed t2)
TyAbs a tn k t -> tyAbs a tn k (embedTerm t)
LamAbs a n ty t -> lamAbs a n ty (embedTerm t)
Apply a t1 t2 -> apply a (embedTerm t1) (embedTerm t2)
Constant a c -> constant a c
Builtin a bi -> builtin a bi
TyInst a t ty -> tyInst a (embed t) ty
TyInst a t ty -> tyInst a (embedTerm t) ty
Error a ty -> error a ty
Unwrap a t -> unwrap a (embed t)
IWrap a ty1 ty2 t -> iWrap a ty1 ty2 (embed t)
Constr a ty i es -> constr a ty i (fmap embed es)
Case a ty arg cs -> kase a ty (embed arg) (fmap embed cs)
Unwrap a t -> unwrap a (embedTerm t)
IWrap a ty1 ty2 t -> iWrap a ty1 ty2 (embedTerm t)
Constr a ty i es -> constr a ty i (fmap embedTerm es)
Case a ty arg cs -> kase a ty (embedTerm arg) (fmap embedTerm cs)

-- | Make a 'Var' referencing the given 'VarDecl'.
mkVar :: TermLike term tyname name uni fun => ann -> VarDecl tyname name uni ann -> term ann
Expand Down
3 changes: 1 addition & 2 deletions plutus-core/plutus-core/test/Pretty/Readable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ test_PrettyReadable =
where
folder :: Pretty fun => PlcFolderContents DefaultUni fun -> TestTree
folder
= runTestNestedIn ["plutus-core", "test", "Pretty", "Golden"]
. testNested "Readable"
= runTestNested ["plutus-core", "test", "Pretty", "Golden", "Readable"]
. foldPlcFolderContents testNested testReadable testReadable

test_Pretty :: TestTree
Expand Down
1 change: 0 additions & 1 deletion plutus-core/plutus-core/test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import PlutusCore.Test

import Control.Monad.Except
import Data.ByteString.Lazy qualified as BSL
import Data.Foldable (for_)
import Data.Proxy
import Data.Text qualified as T
import Data.Text.Encoding (encodeUtf8)
Expand Down
23 changes: 11 additions & 12 deletions plutus-core/plutus-core/test/TypeSynthesis/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ foldAssertWell
-> PlcFolderContents DefaultUni fun
-> TestTree
foldAssertWell semvar
= runTestNestedIn ["plutus-core", "test", "TypeSynthesis"]
. testNested "Golden"
= runTestNested ["plutus-core", "test", "TypeSynthesis", "Golden"]
. foldPlcFolderContents testNested
(\name -> nestedGoldenVsErrorOrThing name . kindcheck)
(\name -> nestedGoldenVsErrorOrThing name . typecheck semvar)
Expand Down Expand Up @@ -128,27 +127,27 @@ test_typecheckIllTyped =
]

test_typecheckAllFun
:: forall fun. (ToBuiltinMeaning DefaultUni fun, Show fun)
:: forall fun. (ToBuiltinMeaning DefaultUni fun, Show fun, Show (BuiltinSemanticsVariant fun))
=> String
-> BuiltinSemanticsVariant fun
-> TestTree
test_typecheckAllFun name semvar
= runTestNestedIn ["plutus-core", "test", "TypeSynthesis", "Golden"]
. testNested name
-> TestNested
test_typecheckAllFun name semVar
= testNestedNamed name (show semVar)
. map testFun
$ enumerate @fun
where
testFun fun =
nestedGoldenVsErrorOrThing (show fun) . kindcheck $ typeOfBuiltinFunction semvar fun
nestedGoldenVsErrorOrThing (show fun) . kindcheck $ typeOfBuiltinFunction semVar fun

test_typecheckDefaultFuns :: TestTree
test_typecheckDefaultFuns =
-- This checks that for each set of builtins the Plutus type of every builtin is the same
-- regardless of versioning.
testGroup "builtins" $ concat
[ map (test_typecheckAllFun @DefaultFun "DefaultFun") enumerate
, map (test_typecheckAllFun @ExtensionFun "ExtensionFun") enumerate
]
testGroup "builtins" . pure $
runTestNested ["plutus-core", "test", "TypeSynthesis", "Golden"] $ concat
[ map (test_typecheckAllFun @DefaultFun "DefaultFun") enumerate
, map (test_typecheckAllFun @ExtensionFun "ExtensionFun") enumerate
]

test_typecheck :: TestTree
test_typecheck =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import PlutusIR.Test
import PlutusPrelude

test_retainedSize :: TestTree
test_retainedSize = runTestNestedIn ["plutus-ir", "test", "PlutusIR", "Analysis"] $
testNested "RetainedSize" $
test_retainedSize =
runTestNested ["plutus-ir", "test", "PlutusIR", "Analysis", "RetainedSize"] $
map
(goldenPir renameAndAnnotate pTerm)
[ "typeLet"
Expand Down
22 changes: 11 additions & 11 deletions plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import Test.Tasty.Extras

test_datatypes :: TestTree
test_datatypes =
runTestNestedIn ["plutus-ir", "test", "PlutusIR", "Compiler"] $ testNested "Datatype"
[ goldenPlcFromPir pTermAsProg "maybe"
, goldenPlcFromPir pTermAsProg "listMatch"
, goldenPlcFromPir pTermAsProg "idleAll"
, goldenPlcFromPir pTermAsProg "some"
, goldenEvalPir pTermAsProg "listMatchEval"
, goldenTypeFromPir topSrcSpan pTerm "dataEscape"
, testNested "scott"
[ goldenPlcFromPirScott pTermAsProg "maybe"
, goldenPlcFromPirScott pTermAsProg "listMatch"
runTestNested ["plutus-ir", "test", "PlutusIR", "Compiler", "Datatype"]
[ goldenPlcFromPir pTermAsProg "maybe"
, goldenPlcFromPir pTermAsProg "listMatch"
, goldenPlcFromPir pTermAsProg "idleAll"
, goldenPlcFromPir pTermAsProg "some"
, goldenEvalPir pTermAsProg "listMatchEval"
, goldenTypeFromPir topSrcSpan pTerm "dataEscape"
, testNested "scott"
[ goldenPlcFromPirScott pTermAsProg "maybe"
, goldenPlcFromPirScott pTermAsProg "listMatch"
]
]
]
Loading