Hoogle Search

Within LTS Haskell 24.51 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. adjust :: (a -> a) -> ByteString -> Trie a -> Trie a

    bytestring-trie Data.Trie

    Apply a function to the value at a key. If the key is not present, then the trie is returned unaltered.

  2. adjustBy :: (ByteString -> a -> a -> a) -> ByteString -> a -> Trie a -> Trie a

    bytestring-trie Data.Trie

    Alter the value associated with a given key. If the key is not present, then the trie is returned unaltered. See alterBy if you are interested in inserting new keys or deleting old keys. Because this function does not need to worry about changing the trie structure, it is somewhat faster than alterBy. Note: Prior to version 0.2.6 this function was exported from Data.Trie.Internal instead.

  3. adjustWithKey :: (ByteString -> a -> a) -> ByteString -> Trie a -> Trie a

    bytestring-trie Data.Trie.Convenience

    Apply a function to change the value at a key.

  4. adjust :: (a -> a) -> ByteString -> Trie a -> Trie a

    bytestring-trie Data.Trie.Internal

    Apply a function to the value at a key. If the key is not present, then the trie is returned unaltered.

  5. data BehaviorAdjustment

    cabal-debian Debian.Debianize.Optparse

    This data type represents changes to CabalT state, requested at command line.

  6. _adjustment :: CommandLineOptions -> BehaviorAdjustment

    cabal-debian Debian.Debianize.Optparse

    No documentation available.

  7. handleBehaviorAdjustment :: forall (m :: Type -> Type) . MonadIO m => BehaviorAdjustment -> CabalT m ()

    cabal-debian Debian.Debianize.Optparse

    No documentation available.

  8. catchJust_ :: HasCatch tag e m => Proxy# tag -> (e -> Maybe b) -> m a -> (b -> m a) -> m a

    capability Capability.Error

    For technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of HasReader. Otherwise, you will want to use catchJust. See catchJust for more documentation.

  9. data FeeAdjustmentError i o

    cardano-coin-selection Cardano.CoinSelection.Fee

    Represents the set of possible failures that can occur when adjusting a CoinSelection with the adjustForFee function.

  10. adjustForFee :: forall i (m :: Type -> Type) o . (Ord i, MonadRandom m) => FeeOptions i o -> CoinMap i -> CoinSelection i o -> ExceptT (FeeAdjustmentError i o) m (CoinSelection i o)

    cardano-coin-selection Cardano.CoinSelection.Fee

    Adjusts the given CoinSelection in order to pay for a transaction fee, required in order to publish the selection as a transaction on a blockchain.

    Background

    Implementations of CoinSelectionAlgorithm generally produce coin selections that are exactly balanced, satisfying the following equality:
    >>> sumInputs s = sumOutputs s + sumChange s
    
    In order to pay for a transaction fee, the above equality must be transformed into an inequality:
    >>> sumInputs s > sumOutputs s + sumChange s
    
    The difference between these two sides represents value to be paid by the originator of the transaction, in the form of a fee:
    >>> sumInputs s = sumOutputs s + sumChange s + fee
    

    The Adjustment Process

    In order to generate a fee that is acceptable to the network, this function adjusts the change and inputs of the given CoinSelection, consulting the FeeEstimator as a guide for how much the current selection would cost to publish as a transaction on the network.

    Methods of Adjustment

    There are two methods of adjustment possible:
    1. The change set can be reduced, either by:a. completely removing a change value from the set; or byb. reducing a change value to a lower value.
    2. The inputs set can be augmented, by selecting additional inputs from the specified CoinMap argument.

    Dealing with Dust Values

    If, at any point, a change value is generated that is less than or equal to the DustThreshold, this function will eliminate that change value from the change set, redistributing the eliminated value over the remaining change values, ensuring that the total value of all change is preserved. See coalesceDust for more details.

    Termination

    Since adjusting a selection can affect the fee estimate produced by estimateFee, the process of adjustment is an iterative process. The termination post-condition depends on the choice of FeeBalancingPolicy:
    • If RequireBalancedFee is specified, this function terminates only when it has generated a CoinSelection s that satisfies the following property:
      >>> sumInputs s = sumOutputs s + sumChange s +
      estimateFee s 
    • If RequireMinimalFee policy is specified, the above equality is relaxed to the following inequality:
      >>> sumInputs s ≥ sumOutputs s +
      sumChange s + estimateFee s 
    See FeeBalancingPolicy for more details.

Page 122 of many | Previous | Next