File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -877,6 +877,10 @@ newtype UnionCredits = UnionCredits Credit
877877-- debt will be reduced by /at least/ the number of supplied union credits. It
878878-- is therefore advisable to query 'remainingUnionDebt' every once in a while to
879879-- see what the current debt is.
880+ --
881+ -- This function returns any surplus of union credits as /leftover/ credits when
882+ -- a union has finished. In particular, if the returned number of credits is
883+ -- non-negative, then the union is finished.
880884supplyUnionCredits :: LSM s -> UnionCredits -> ST s UnionCredits
881885supplyUnionCredits (LSMHandle scr lsmr) (UnionCredits credits)
882886 | credits <= 0 = return (UnionCredits 0 )
Original file line number Diff line number Diff line change @@ -721,6 +721,10 @@ remainingUnionDebt (Internal.MonoidalTable t) =
721721-- debt will be reduced by /at least/ the number of supplied union credits. It
722722-- is therefore advisable to query @remainingUnionDebt@ every once in a while to
723723-- see what the current debt is.
724+ --
725+ -- This function returns any surplus of union credits as /leftover/ credits when
726+ -- a union has finished. In particular, if the returned number of credits is
727+ -- non-negative, then the union is finished.
724728supplyUnionCredits ::
725729 IOLike m
726730 => Table m k v
Original file line number Diff line number Diff line change @@ -841,6 +841,10 @@ remainingUnionDebt (Internal.NormalTable t) =
841841-- debt will be reduced by /at least/ the number of supplied union credits. It
842842-- is therefore advisable to query @remainingUnionDebt@ every once in a while to
843843-- see what the current debt is.
844+ --
845+ -- This function returns any surplus of union credits as /leftover/ credits when
846+ -- a union has finished. In particular, if the returned number of credits is
847+ -- non-negative, then the union is finished.
844848supplyUnionCredits ::
845849 IOLike m
846850 => Table m k v b
You can’t perform that action at this time.
0 commit comments