Hoogle Search

Within LTS Haskell 24.27 (ghc-9.10.3)

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

  1. (...) :: Enum a => a -> Infinite a

    infinite-list Data.List.Infinite

    Generate an infinite progression, starting from a given element, similar to [x..]. For better user experience consider enabling {-# LANGUAGE PostfixOperators #-}:

    >>> :set -XPostfixOperators
    
    >>> Data.List.Infinite.take 10 (0...)
    [0,1,2,3,4,5,6,7,8,9]
    
    Beware that for finite types (...) applies cycle atop of [x..]:
    >>> :set -XPostfixOperators
    
    >>> Data.List.Infinite.take 10 (EQ...)
    [EQ,GT,EQ,GT,EQ,GT,EQ,GT,EQ,GT]
    
    Remember that Int is a finite type as well. One is unlikely to hit this on a 64-bit architecture, but on a 32-bit machine it's fairly possible to traverse ((0 :: Int) ...) far enough to encounter 0 again.

  2. (....) :: Enum a => (a, a) -> Infinite a

    infinite-list Data.List.Infinite

    Generate an infinite arithmetic progression, starting from given elements, similar to [x,y..]. For better user experience consider enabling {-# LANGUAGE PostfixOperators #-}:

    >>> :set -XPostfixOperators
    
    >>> Data.List.Infinite.take 10 ((1,3)....)
    [1,3,5,7,9,11,13,15,17,19]
    
    Beware that for finite types (....) applies cycle atop of [x,y..]:
    >>> :set -XPostfixOperators
    
    >>> Data.List.Infinite.take 10 ((EQ,GT)....)
    [EQ,GT,EQ,GT,EQ,GT,EQ,GT,EQ,GT]
    
    Remember that Int is a finite type as well: for a sufficiently large step of progression y - x one may observe ((x :: Int, y)....) cycling back to emit x fairly soon.

  3. (.~) :: Setter s t a b -> b -> s -> t

    lens-family Lens.Family2

    Set all referenced fields to the given value.

  4. (.=) :: MonadState s m => Setter s s a b -> b -> m ()

    lens-family Lens.Family2.State.Lazy

    Set a field of the state.

  5. (.=) :: MonadState s m => Setter s s a b -> b -> m ()

    lens-family Lens.Family2.State.Strict

    Set a field of the state.

  6. (...) :: Index ix => ix -> ix -> Array D ix ix

    massiv Data.Massiv.Array

    Handy synonym for rangeInclusive Seq. Similar to .. for list.

    >>> Ix1 4 ... 10
    Array D Seq (Sz1 7)
    [ 4, 5, 6, 7, 8, 9, 10 ]
    

  7. (..:) :: Index ix => ix -> ix -> Array D ix ix

    massiv Data.Massiv.Array

    Handy synonym for range Seq

    >>> Ix1 4 ..: 10
    Array D Seq (Sz1 6)
    [ 4, 5, 6, 7, 8, 9 ]
    

  8. (.*) :: (Index ix, Numeric r e) => Array r ix e -> e -> Array r ix e

    massiv Data.Massiv.Array.Numeric

    Multiply each element of the array by a scalar value. Scalar is on the right.

    Example

    >>> let arr = Ix1 20 ..: 25
    
    >>> arr
    Array D Seq (Sz1 5)
    [ 20, 21, 22, 23, 24 ]
    
    >>> arr .* 10
    Array D Seq (Sz1 5)
    [ 200, 210, 220, 230, 240 ]
    

  9. (.**) :: (Index ix, Source r1 e, Source r2 e, Floating e) => Array r1 ix e -> Array r2 ix e -> Array D ix e

    massiv Data.Massiv.Array.Numeric

    Apply power to each element of the array where the power value is in the same cell in the second array.

    arr1 .** arr2 == zipWith (**) arr1 arr2
    
    • Partial Throws an error when arrays do not have matching sizes

  10. (.*.) :: (Index ix, Numeric r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e)

    massiv Data.Massiv.Array.Numeric

    Multiply two arrays together pointwise. Same as !*! but produces monadic computation that allows for handling failure. Throws Exception: SizeMismatchException when array sizes do not match.

Page 22 of many | Previous | Next