From bce9b45c253fa7550d0630585f3199b370a84d2c Mon Sep 17 00:00:00 2001 From: fanghr Date: Fri, 20 May 2022 01:10:24 +0800 Subject: [PATCH] add missing doc strings --- agora-sample/Sample/Shared.hs | 5 ++++- agora-testlib/Test/Util.hs | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/agora-sample/Sample/Shared.hs b/agora-sample/Sample/Shared.hs index 46cc0d3..adaed30 100644 --- a/agora-sample/Sample/Shared.hs +++ b/agora-sample/Sample/Shared.hs @@ -199,7 +199,10 @@ proposalTimingConfig = , executingTime = 3000 } --- FIXME: should be removed. +{- | Hard coded starting time of every propoal. + This will be calculated by the governor in the future. + FIXME: Remove this. +-} tmpProposalStartingTime :: ProposalStartingTime tmpProposalStartingTime = ProposalStartingTime 0 diff --git a/agora-testlib/Test/Util.hs b/agora-testlib/Test/Util.hs index 4d6f733..624d728 100644 --- a/agora-testlib/Test/Util.hs +++ b/agora-testlib/Test/Util.hs @@ -245,6 +245,10 @@ closedBoundedInterval from to = PlutusTx.intersection (PlutusTx.from from) (Plut -------------------------------------------------------------------------------- +{- | / O(n) /. The expression @'updateMap' f k v@ will update the value @x@ at key @k@. + If @f x@ is Nothing, the key-value pair will be deleted from the map, otherwise the + value will be updated. +-} updateMap :: Eq k => (v -> Maybe v) -> k -> AssocMap.Map k v -> AssocMap.Map k v updateMap f k = AssocMap.mapMaybeWithKey