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

Show via pretty + tweaks #142

Merged
merged 12 commits into from
Jun 6, 2024
Merged

Show via pretty + tweaks #142

merged 12 commits into from
Jun 6, 2024

Conversation

0xd34df00d
Copy link
Contributor

PR checklist:

  • Test coverage for the proposed changes
  • PR description contains example output from repl interaction or a snippet from unit test output
  • Any changes that could be relevant to users have been recorded in the changelog

Additionally, please justify why you should or should not do the following:

  • Confirm replay/back compat
  • Benchmark regressions
  • (For Kadena engineers) Run integration-tests against a Chainweb built with this version of Pact

Copy link
Member

@rsoeldner rsoeldner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work 👍

pact/Pact/Core/IR/Eval/CoreBuiltin.hs Outdated Show resolved Hide resolved
@@ -96,7 +96,7 @@ round: 50
scalar-mult: 360225
select: 100383581
shift: 4
show: 101
show: 4002
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow that's a big jump

showPactValue info pv = do
sz <- sizeOf SizeOfV0 pv
chargeGasArgs info $ GConcat $ TextConcat $ GasTextLength $ fromIntegral sz
pure $ Pretty.renderCompactText pv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small bikesheddey nitpick: if i'm calling showPactValue, i don't assume any rendering or compaction: I assume it's using the show instance on pact values. Maybe we keep renderPactValue as a name, because it implies there's work being done on the value to produce text.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I agree the current name is slightly misleading.

@0xd34df00d 0xd34df00d merged commit ea205f4 into master Jun 6, 2024
3 checks passed
@0xd34df00d 0xd34df00d deleted the gr/show-via-pretty branch June 6, 2024 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants