Hoogle Search

Within LTS Haskell 24.33 (ghc-9.10.3)

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

  1. (+~) :: Num a => ASetter s t a a -> a -> s -> t

    lens Control.Lens.Operators

    Increment the target(s) of a numerically valued Lens, Setter or Traversal.

    >>> (a,b) & _1 +~ c
    (a + c,b)
    
    >>> (a,b) & both +~ c
    (a + c,b + c)
    
    >>> (1,2) & _2 +~ 1
    (1,3)
    
    >>> [(a,b),(c,d)] & traverse.both +~ e
    [(a + e,b + e),(c + e,d + e)]
    
    (+~) :: Num a => Setter' s a    -> a -> s -> s
    (+~) :: Num a => Iso' s a       -> a -> s -> s
    (+~) :: Num a => Lens' s a      -> a -> s -> s
    (+~) :: Num a => Traversal' s a -> a -> s -> s
    

  2. (+=) :: (MonadState s m, Num a) => ASetter' s a -> a -> m ()

    lens Control.Lens.Setter

    Modify the target(s) of a Lens', Iso, Setter or Traversal by adding a value. Example:

    fresh :: MonadState Int m => m Int
    fresh = do
    id += 1
    use id
    
    >>> execState (do _1 += c; _2 += d) (a,b)
    (a + c,b + d)
    
    >>> execState (do _1.at 1.non 0 += 10) (Map.fromList [(2,100)],"hello")
    (fromList [(1,10),(2,100)],"hello")
    
    (+=) :: (MonadState s m, Num a) => Setter' s a    -> a -> m ()
    (+=) :: (MonadState s m, Num a) => Iso' s a       -> a -> m ()
    (+=) :: (MonadState s m, Num a) => Lens' s a      -> a -> m ()
    (+=) :: (MonadState s m, Num a) => Traversal' s a -> a -> m ()
    

  3. (+~) :: Num a => ASetter s t a a -> a -> s -> t

    lens Control.Lens.Setter

    Increment the target(s) of a numerically valued Lens, Setter or Traversal.

    >>> (a,b) & _1 +~ c
    (a + c,b)
    
    >>> (a,b) & both +~ c
    (a + c,b + c)
    
    >>> (1,2) & _2 +~ 1
    (1,3)
    
    >>> [(a,b),(c,d)] & traverse.both +~ e
    [(a + e,b + e),(c + e,d + e)]
    
    (+~) :: Num a => Setter' s a    -> a -> s -> s
    (+~) :: Num a => Iso' s a       -> a -> s -> s
    (+~) :: Num a => Lens' s a      -> a -> s -> s
    (+~) :: Num a => Traversal' s a -> a -> s -> s
    

  4. (++) :: [a] -> [a] -> [a]

    hedgehog Hedgehog.Internal.Prelude

    (++) appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
    
    If the first list is not finite, the result is the first list.

    Performance considerations

    This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

    Examples

    >>> [1, 2, 3] ++ [4, 5, 6]
    [1,2,3,4,5,6]
    
    >>> [] ++ [1, 2, 3]
    [1,2,3]
    
    >>> [3, 2, 1] ++ []
    [3,2,1]
    

  5. (+~) :: Num a => ASetter s t a a -> a -> s -> t

    microlens Lens.Micro

    Increment the target(s) of a numerically valued Lens or Traversal.

    >>> (a,b) & _1 +~ c
    (a + c,b)
    
    >>> (a,b) & both +~ c
    (a + c,b + c)
    
    >>> (1,2) & _2 +~ 1
    (1,3)
    
    >>> [(a,b),(c,d)] & traverse.both +~ e
    [(a + e,b + e),(c + e,d + e)]
    
    (+~) :: Num a => Lens' s a      -> a -> s -> s
    (+~) :: Num a => Traversal' s a -> a -> s -> s
    

  6. (++) :: Foldable f => f a -> Infinite a -> Infinite a

    ghc GHC.Data.List.Infinite

    No documentation available.

  7. (++) :: [a] -> [a] -> [a]

    ghc GHC.Prelude.Basic

    No documentation available.

  8. (+=.) :: forall v typ . PersistField typ => EntityField v typ -> typ -> Update v

    persistent Database.Persist

    Assign a field by addition (+=).

    Examples

    addAge :: MonadIO m => ReaderT SqlBackend m ()
    addAge = updateWhere [UserName ==. "SPJ" ] [UserAge +=. 1]
    
    The above query when applied on dataset-1, will produce this:
    +-----+-----+---------+
    |id   |name |age      |
    +-----+-----+---------+
    |1    |SPJ  |40 -> 41 |
    +-----+-----+---------+
    |2    |Simon|41       |
    +-----+-----+---------+
    

  9. type (m :: Symbol) ++ (n :: Symbol) = AppendSymbol m n

    constraints Data.Constraint.Symbol

    An infix synonym for AppendSymbol.

  10. (+>>) :: forall (m :: Type -> Type) b' a' a b r c' c . Functor m => (b' -> Proxy a' a b' b m r) -> Proxy b' b c' c m r -> Proxy a' a c' c m r

    pipes Pipes.Core

    (f +>> p) pairs each request in p with a respond in f. Point-ful version of (>+>)

Page 10 of many | Previous | Next