fix existing tests

This commit is contained in:
Hongrui Fang 2022-07-08 20:38:38 +08:00
parent 5dee613dd4
commit b76b5c6ec6
11 changed files with 143 additions and 80 deletions

View file

@ -95,12 +95,16 @@ updateMap f k =
--------------------------------------------------------------------------------
-- | Sort the given 'AssocMap.Map' by keys in ascending order.
sortMap :: forall k v. Ord k => AssocMap.Map k v -> AssocMap.Map k v
sortMap =
AssocMap.fromList
. sortOn fst
. AssocMap.toList
{- | Sort the given 'Value' in ascending order. Some plutarch functions that
work with plutarch's 'Sorted' 'PMap' require this to work correctly.
-}
sortValue :: Value -> Value
sortValue =
Value