-
Notifications
You must be signed in to change notification settings - Fork 481
Restrict Value quantities to signed 128-bit integer range #7389
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
Changes from all commits
9692271
3ec7279
22d610d
b98b765
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,7 +113,7 @@ instance NonDefaultPrettyBy ConstConfig T.Text where | |
| nonDefaultPrettyListBy conf = Prettyprinter.list . Prelude.map (nonDefaultPrettyBy conf) | ||
| nonDefaultPrettyBy = inContextM $ \t -> pure $ pretty $ "\"" <> escape t <> "\"" | ||
| where | ||
| escape t = T.foldr' prettyChar "" t | ||
Unisay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| escape = T.foldr' prettyChar "" | ||
| prettyChar c acc | ||
| | c == '"' = "\\\"" <> acc -- Not handled by 'showLitChar' | ||
| | c == '\\' = "\\\\" <> acc -- Not handled by 'showLitChar' | ||
|
|
@@ -162,6 +162,9 @@ instance PrettyBy ConstConfig Data where | |
| instance PrettyBy ConstConfig Value.K where | ||
| prettyBy config = prettyBy config . Value.unK | ||
|
|
||
| instance PrettyBy ConstConfig Value.Quantity where | ||
| prettyBy config = prettyBy config . Value.unQuantity | ||
|
|
||
| instance PrettyBy ConstConfig Value where | ||
| prettyBy config = prettyBy config . Value.toList | ||
|
Comment on lines
162
to
169
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not that it matters much, but these should be newtype-derivable.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would require data constructors to be in scope (they aren't).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I see. Yeah I guess that makes sense. |
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.