Skip to content

Commit

Permalink
Fix data-default use
Browse files Browse the repository at this point in the history
Without this change, I fail to build pact-5 while building chainweb,
because the Default instances for functions disappeared. I don't know
why Pact 5 proper builds fine without this, probably a version bound
thing.
  • Loading branch information
edmundnoble committed Dec 12, 2024
1 parent c2f5fb7 commit 4738d8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pact/Pact/Core/Serialise.hs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ serialisePact_repl_spaninfo = serialisePact
{ _encodeModuleData = docEncode V1.encodeModuleData_repl_spaninfo
, _decodeModuleData =
\bs ->
(LegacyDocument . fmap def . liftReplBuiltin <$> LegacyPact.decodeModuleData bs)
(LegacyDocument . fmap (\_ -> def) . liftReplBuiltin <$> LegacyPact.decodeModuleData bs)
<|> docDecode bs (\case
V1_CBOR -> V1.decodeModuleData_repl_spaninfo
)
Expand All @@ -181,7 +181,7 @@ serialisePact_raw_spaninfo = serialisePact
{ _encodeModuleData = docEncode V1.encodeModuleData_raw_spaninfo
, _decodeModuleData =
\bs ->
(LegacyDocument . fmap def <$> LegacyPact.decodeModuleData bs)
(LegacyDocument . fmap (\_ -> def) <$> LegacyPact.decodeModuleData bs)
<|> docDecode bs (\case
V1_CBOR -> V1.decodeModuleData_raw_spaninfo
)
Expand All @@ -193,7 +193,7 @@ serialisePact_lineinfo = serialisePact
{ _encodeModuleData = docEncode V1.encodeModuleData_lineinfo
, _decodeModuleData =
\bs ->
(LegacyDocument . fmap def <$> LegacyPact.decodeModuleData bs)
(LegacyDocument . fmap (\_ -> def) <$> LegacyPact.decodeModuleData bs)
<|> docDecode bs (\case
V1_CBOR -> V1.decodeModuleData_lineinfo
)
Expand Down

0 comments on commit 4738d8e

Please sign in to comment.