-
Notifications
You must be signed in to change notification settings - Fork 107
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
Pact Aeson2 #1242
Pact Aeson2 #1242
Conversation
Resolved my comments cuz we got |
-- on chain 0 at block height 1720161 (txid 2475483). So, we would have | ||
-- to do this in a fork. | ||
denom :: UTCTime -> Integer | ||
denom = denominator . (% 1000) . fromIntegral . toPosixTimestampMicros |
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.
Note: still needs fixing.
src/Pact/Types/KeySet.hs
Outdated
@@ -131,6 +136,10 @@ instance Arbitrary KeySet where | |||
-- | allow `{ "keys": [...], "pred": "..." }`, `{ "keys": [...] }`, and just `[...]`, | |||
-- | the latter cases defaulting to "keys-all" | |||
instance FromJSON KeySet where | |||
|
|||
-- Aeson failures: | |||
-- aeson-1: "read-keyset: parse failed: parsing [] failed, expected Array, but encountered Object: {\"pred\": \"\" ,\"keys\":\n[\"48acfef8d60e90a7c3675cbe7cb4162c15b80d196a5586962cb8a789f1c79fe2\"]}" |
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.
Need to follow up on this as well
(TNative n _fn tys _exs d tl i) -> J.object | ||
[ prop TermNatFunTypes J..= J.Array tys | ||
, prop TermName J..= n | ||
, prop TermFun J..= J.null {- TODO fn -} |
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.
Not Todo, this is just unlawful and doesn't serialize.
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.
Approved. Incredible effort @jmcardon and @larskuhtz
instance ToJSON FullyQualifiedName where | ||
toJSON (FullyQualifiedName n (ModuleName m ns) hsh) = | ||
toJSON $ maybe "" ((<> ".") . _namespaceName) ns <> m <> "." <> n <> ".{" <> hashToText hsh <> "}" | ||
fqdnJsonText :: FullyQualifiedName -> T.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.
minor nit, not sure why this is toplevel, only used once
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.
Will fix in followup PR
PR checklist:
cabal run tests
. If they pass locally, docs are generated.pact -t
), make sure pact-lsp is in sync.Additionally, please justify why you should or should not do the following: