Hoogle Search

Within LTS Haskell 24.64 (ghc-9.10.3)

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

  1. void :: Monad m => m a -> m ()

    network-transport Network.Transport.Internal

    Not all versions of "base" export void

  2. traceId :: String -> String

    relude Relude.Debug

    Warning: traceId remains in code

  3. traceShowId :: Show a => a -> a

    relude Relude.Debug

    Warning: traceShowId remains in code

  4. void :: Functor f => f a -> f ()

    relude Relude.Functor.Reexport

    void value discards or ignores the result of evaluation, such as the return value of an IO action.

    Examples

    Replace the contents of a Maybe Int with unit:
    >>> void Nothing
    Nothing
    
    >>> void (Just 3)
    Just ()
    
    Replace the contents of an Either Int Int with unit, resulting in an Either Int ():
    >>> void (Left 8675309)
    Left 8675309
    
    >>> void (Right 8675309)
    Right ()
    
    Replace every element of a list with unit:
    >>> void [1,2,3]
    [(),(),()]
    
    Replace the second element of a pair with unit:
    >>> void (1,2)
    (1,())
    
    Discard the result of an IO action:
    >>> mapM print [1,2]
    1
    2
    [(),()]
    
    >>> void $ mapM print [1,2]
    1
    2
    

  5. module Relude.Monoid

    Reexports functions to work with monoids plus adds extra useful functions.

  6. class Semigroup a => Monoid a

    relude Relude.Monoid

    The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:

    You can alternatively define mconcat instead of mempty, in which case the laws are: The method names refer to the monoid of lists under concatenation, but there are many other instances. Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtypes and make those instances of Monoid, e.g. Sum and Product. NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.

  7. data WrappedMonoid m

    relude Relude.Monoid

    Provide a Semigroup for an arbitrary Monoid. NOTE: This is not needed anymore since Semigroup became a superclass of Monoid in base-4.11 and this newtype be deprecated at some point in the future.

  8. maybeToMonoid :: Monoid m => Maybe m -> m

    relude Relude.Monoid

    Extracts Monoid value from Maybe returning mempty if Nothing.

    >>> maybeToMonoid (Just [1,2,3] :: Maybe [Int])
    [1,2,3]
    
    >>> maybeToMonoid (Nothing :: Maybe [Int])
    []
    

  9. stimesIdempotent :: Integral b => b -> a -> a

    relude Relude.Monoid

    This is a valid definition of stimes for an idempotent Semigroup. When x <> x = x, this definition should be preferred, because it works in <math> rather than <math>.

  10. stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a

    relude Relude.Monoid

    This is a valid definition of stimes for an idempotent Monoid. When x <> x = x, this definition should be preferred, because it works in <math> rather than <math>

Page 516 of many | Previous | Next