Skip to content

Commit

Permalink
fork hash infos
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcardon committed Aug 14, 2023
1 parent 7279c83 commit abaa7cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Pact/Native.hs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,10 @@ hashDef = defRNative "hash" hash' (funType tTyString [("value",a)])
hash' :: RNativeFun e
hash' i as = case as of
[TLitString s] -> go $ T.encodeUtf8 s
[a'] -> enforcePactValue a' >>= \pv -> go $ J.encodeStrict pv
[a'] -> do
elide <- ifExecutionFlagSet' FlagDisablePact48 id elideModRefInfo
pv <- elide <$> enforcePactValue a'
go $ J.encodeStrict pv
_ -> argsError i as
where go = return . tStr . asString . pactHash

Expand Down

0 comments on commit abaa7cc

Please sign in to comment.