Hoogle Search

Within LTS Haskell 24.68 (ghc-9.10.3)

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

  1. foldMap' :: (Foldable t, Monoid m) => (a -> m) -> t a -> m

    incipit-base Incipit.Foldable

    A left-associative variant of foldMap that is strict in the accumulator. Use this method for strict reduction when partial results are merged via (<>).

    Examples

    Define a Monoid over finite bit strings under xor. Use it to strictly compute the xor of a list of Int values.
    >>> :set -XGeneralizedNewtypeDeriving
    
    >>> import Data.Bits (Bits, FiniteBits, xor, zeroBits)
    
    >>> import Data.Foldable (foldMap')
    
    >>> import Numeric (showHex)
    
    >>> 
    
    >>> newtype X a = X a deriving (Eq, Bounded, Enum, Bits, FiniteBits)
    
    >>> instance Bits a => Semigroup (X a) where X a <> X b = X (a `xor` b)
    
    >>> instance Bits a => Monoid    (X a) where mempty     = X zeroBits
    
    >>> 
    
    >>> let bits :: [Int]; bits = [0xcafe, 0xfeed, 0xdeaf, 0xbeef, 0x5411]
    
    >>> (\ (X a) -> showString "0x" . showHex a $ "") $ foldMap' X bits
    "0x42"
    

  2. data IntMap a

    incipit-base Incipit.Libraries

    A map of integers to values a.

  3. module Data.ShareMap

    No documentation available.

  4. data ShareMap k v

    liquid-fixpoint Data.ShareMap

    A HashMap that can share the values of some entries If two keys k1 and k2 are mapped to single v, updating the entry for k1 also updates the entry for k2 and viceversa. The user of the map is responsible for indicating which keys are going to share their values. Keys can be updated with shareMapInsertWith and mergeKeysWith.

  5. toHashMap :: (Hashable k, Eq k) => ShareMap k v -> HashMap k v

    liquid-fixpoint Data.ShareMap

    No documentation available.

  6. type CMap a = HashMap SubcId a

    liquid-fixpoint Language.Fixpoint.Graph.Types

    No documentation available.

  7. lookupCMap :: (?callStack :: CallStack) => CMap a -> SubcId -> a

    liquid-fixpoint Language.Fixpoint.Graph.Types

    CMap API -------------------------------------------------------------

  8. allMap :: (Eq k, Hashable k) => (v -> Bool) -> HashMap k v -> Bool

    liquid-fixpoint Language.Fixpoint.Misc

    No documentation available.

  9. asyncMapM :: (a -> IO b) -> [a] -> IO [b]

    liquid-fixpoint Language.Fixpoint.Misc

    No documentation available.

  10. groupMap :: (Eq k, Hashable k) => (a -> k) -> [a] -> HashMap k [a]

    liquid-fixpoint Language.Fixpoint.Misc

    No documentation available.

Page 1064 of many | Previous | Next