Hoogle Search

Within LTS Haskell 24.45 (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

    rebase Rebase.Prelude

    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. fmapArgDescr :: (a -> b) -> ArgDescr a -> ArgDescr b

    shell-utility Shell.Utility.GetOpt

    No documentation available.

  3. fmapOptDescr :: (a -> b) -> OptDescr a -> OptDescr b

    shell-utility Shell.Utility.GetOpt

    No documentation available.

  4. defaultSyntaxMap :: SyntaxMap

    skylighting Skylighting.Syntax

    Default mapping from short names to syntax definitions.

  5. ErrorIOMmap :: Error

    sqlite-simple Database.SQLite.Simple

    No documentation available.

  6. ErrorIOShmMap :: Error

    sqlite-simple Database.SQLite.Simple

    No documentation available.

  7. peekMap :: (Store (ContainerKey t), Store (MapValue t), IsMap t) => Peek t

    store Data.Store.Internal

    Implement peek for an IsMap of where both ContainerKey and MapValue are Store instances.

  8. peekOrdMapWith :: (Store (ContainerKey t), Store (MapValue t)) => ([(ContainerKey t, MapValue t)] -> t) -> Peek t

    store Data.Store.Internal

    Decode the results of pokeOrdMap using a given function to construct the map.

  9. pokeMap :: (Store (ContainerKey t), Store (MapValue t), IsMap t) => t -> Poke ()

    store Data.Store.Internal

    Implement poke for an IsMap of where both ContainerKey and MapValue are Store instances.

  10. pokeOrdMap :: (Store (ContainerKey t), Store (MapValue t), IsMap t) => t -> Poke ()

    store Data.Store.Internal

    Like pokeMap but should only be used for ordered containers where mapToList returns an ascending list.

Page 973 of many | Previous | Next