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. (!!) :: Monad m => StreamK m a -> Int -> m (Maybe a)

    streamly-core Streamly.Internal.Data.StreamK

    No documentation available.

  2. (!!) :: (HasCallStack, Monad m) => Stream m a -> Int -> m a

    vector-stream Data.Stream.Monadic

    Element at the given position

  3. (!!) :: HasCallStack => [a] -> Int -> a

    Agda Agda.Utils.List

    A variant of !! that might provide more informative error messages if the index is out of bounds. Precondition: The index should not be out of bounds.

  4. (!!) :: HasCallStack => NonEmpty a -> Int -> a

    Agda Agda.Utils.List1

    xs !! n returns the element of the stream xs at index n. Note that the head of the stream has index 0. Beware: a negative or out-of-bounds index will cause an error.

  5. type (!!) = Cont

    control-dsl Control.Dsl.Cont

    A type alias to Cont for a deeply nested delimited continuation.

    Examples

    >>> :set -XTypeOperators
    
    >>> :set -XRebindableSyntax
    
    >>> import Prelude hiding ((>>), (>>=), return, fail)
    
    >>> import Control.Dsl
    
    >>> import Control.Dsl.Yield
    
    >>> import Control.Dsl.Empty
    
    >>> import Control.Dsl.Monadic
    
    >>> :{
    f :: IO () !! [Integer] !! [String] !! [Double]
    f = do
    Yield "foo"
    Yield 0.5
    Yield "bar"
    Yield 42
    Yield "baz"
    return ([] :: [Double])
    :}
    
    >>> :{
    f >>= (\d -> do { Monadic $ putStrLn $ "double list: " ++ show d
    ; return ([] :: [String]) })
    >>= (\s -> do { Monadic $ putStrLn $ "string list: " ++ show s
    ; return ([] :: [Integer]) })
    >>= (\i -> do { Monadic $ putStrLn $ "integer list: " ++ show i
    ; return () })
    :}
    double list: [0.5]
    string list: ["foo","bar","baz"]
    integer list: [42]
    

  6. (!!) :: HasCallStack => [a] -> Int -> a

    dimensional Numeric.Units.Dimensional.Prelude

    List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type. WARNING: This function is partial, and should only be used if you are sure that the indexing will not fail. Otherwise, use !?. WARNING: This function takes linear time in the index.

    Examples

    >>> ['a', 'b', 'c'] !! 0
    'a'
    
    >>> ['a', 'b', 'c'] !! 2
    'c'
    
    >>> ['a', 'b', 'c'] !! 3
    *** Exception: Prelude.!!: index too large
    
    >>> ['a', 'b', 'c'] !! (-1)
    *** Exception: Prelude.!!: negative index
    

  7. (!!) :: HasCallStack => [a] -> Int -> a

    distribution-opensuse OpenSuse.Prelude

    List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type. WARNING: This function is partial, and should only be used if you are sure that the indexing will not fail. Otherwise, use !?. WARNING: This function takes linear time in the index.

    Examples

    >>> ['a', 'b', 'c'] !! 0
    'a'
    
    >>> ['a', 'b', 'c'] !! 2
    'c'
    
    >>> ['a', 'b', 'c'] !! 3
    *** Exception: Prelude.!!: index too large
    
    >>> ['a', 'b', 'c'] !! (-1)
    *** Exception: Prelude.!!: negative index
    

  8. (!!) :: HasCallStack => [a] -> Int -> a

    faktory Faktory.Prelude

    List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type. WARNING: This function is partial, and should only be used if you are sure that the indexing will not fail. Otherwise, use !?. WARNING: This function takes linear time in the index.

    Examples

    >>> ['a', 'b', 'c'] !! 0
    'a'
    
    >>> ['a', 'b', 'c'] !! 2
    'c'
    
    >>> ['a', 'b', 'c'] !! 3
    *** Exception: Prelude.!!: index too large
    
    >>> ['a', 'b', 'c'] !! (-1)
    *** Exception: Prelude.!!: negative index
    

  9. (!!) :: HasCallStack => [a] -> Int -> a

    hledger-web Hledger.Web.Import

    List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type. WARNING: This function is partial, and should only be used if you are sure that the indexing will not fail. Otherwise, use !?. WARNING: This function takes linear time in the index.

    Examples

    >>> ['a', 'b', 'c'] !! 0
    'a'
    
    >>> ['a', 'b', 'c'] !! 2
    'c'
    
    >>> ['a', 'b', 'c'] !! 3
    *** Exception: Prelude.!!: index too large
    
    >>> ['a', 'b', 'c'] !! (-1)
    *** Exception: Prelude.!!: negative index
    

  10. (!!) :: forall (f :: Type -> Type) (m :: Nat) a . (CFoldable f, Dom f a, 1 <= m) => Sized f m a -> Int -> a

    sized Data.Sized

    (Unsafe) indexing with Ints. If you want to check boundary statically, use %!! or sIndex. Since 0.7.0.0

Page 6 of many | Previous | Next