-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
This potentially saves some work (and some gas!) if not all arguments are used in the format string.
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.
nice work 👍
@@ -96,7 +96,7 @@ round: 50 | |||
scalar-mult: 360225 | |||
select: 100383581 | |||
shift: 4 | |||
show: 101 | |||
show: 4002 |
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.
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 |
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.
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.
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 point, I agree the current name is slightly misleading.
PR checklist:
Additionally, please justify why you should or should not do the following: