-
Notifications
You must be signed in to change notification settings - Fork 501
Add deriveEq for Plinth similar to deriving stock Eq #7433
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
base: master
Are you sure you want to change the base?
Conversation
1bdeaab to
956de09
Compare
Execution Budget Golden Diffoutputplutus-benchmark/cardano-loans/test/9.6/main.golden.eval
plutus-benchmark/coop/test/9.6/certMpBurning.golden.eval
plutus-benchmark/coop/test/9.6/certMpMinting.golden.eval
plutus-benchmark/coop/test/9.6/fsMpBurning.golden.eval
plutus-benchmark/coop/test/9.6/fsMpMinting.golden.eval
plutus-benchmark/linear-vesting/test/9.6/main.golden.eval
plutus-benchmark/nofib/test/9.6/clausify-F5.golden.eval
plutus-benchmark/nofib/test/9.6/knights10-4x4.golden.eval
plutus-benchmark/nofib/test/9.6/queens4-bt.golden.eval
plutus-benchmark/nofib/test/9.6/queens5-fc.golden.eval
plutus-benchmark/script-contexts/test/V3/Data/9.6/purposeIsWellFormed-4.golden.eval
This comment will get updated when changes are made. |
956de09 to
d666dea
Compare
5b30be7 to
5d931a0
Compare
5d931a0 to
396e4e9
Compare
396e4e9 to
97a7b4b
Compare
17c33aa to
7593c53
Compare
Add some derived Eq instances
7593c53 to
3ca2a2e
Compare
SeungheonOh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too confident in my ability to review TH code. So perhaps a look from @Unisay would be nice. But everything looks right from what I can tell.
| deriveEq ''() | ||
| deriveEq ''(,) | ||
| deriveEq ''(,,) | ||
| deriveEq ''(,,,) | ||
| deriveEq ''(,,,,) | ||
| deriveEq ''(,,,,,) | ||
| deriveEq ''(,,,,,,) | ||
| deriveEq ''(,,,,,,,) | ||
| deriveEq ''(,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,,,,,,,,,) | ||
| deriveEq ''(,,,,,,,,,,,,,,,,,,,,,,,,,,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The great pyramid
| , testCase "reflexive3" $ (v3 Tx.== v3) @?= (v3 HS.== v3) | ||
| , testCase "shortcircuit" $ (v3 Tx.== v3Error1) @?= (v3 Tx.== v3Error1) -- should not throw an error | ||
| , testCase "throws" $ try @SomeException (evaluate $ v3 Tx.== v3Error2) >>= assertBool "did not throw error" . isLeft -- should throw erro | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also have TH golden. There's a function called goldenCodeGen that will generate golden of the generated haskell code. This probably needs to go to plutus-tx-plugin/tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
|
Also, can you check if this works with polymorphic phantom types? I'm curious as per #4537 |
Pre-submit checklist: