Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
(
!! ) :: forall (n :: Nat) i a . (KnownNat n, Enum i) => Vec n a -> i -> aclash-prelude Clash.Explicit.Prelude.Safe "xs !! n" returns the n'th element of xs. NB: Vector elements have an ASCENDING subscript starting from 0 and ending at length - 1.
>>> (1:>2:>3:>4:>5:>Nil) !! 4 5 >>> (1:>2:>3:>4:>5:>Nil) !! (length (1:>2:>3:>4:>5:>Nil) - 1) 5 >>> (1:>2:>3:>4:>5:>Nil) !! 1 2 >>> (1:>2:>3:>4:>5:>Nil) !! 14 *** Exception: Clash.Sized.Vector.(!!): index 14 is larger than maximum index 4 ...
(
!! ) :: forall (n :: Nat) i a . (KnownNat n, Enum i) => Vec n a -> i -> aclash-prelude Clash.Prelude "xs !! n" returns the n'th element of xs. NB: Vector elements have an ASCENDING subscript starting from 0 and ending at length - 1.
>>> (1:>2:>3:>4:>5:>Nil) !! 4 5 >>> (1:>2:>3:>4:>5:>Nil) !! (length (1:>2:>3:>4:>5:>Nil) - 1) 5 >>> (1:>2:>3:>4:>5:>Nil) !! 1 2 >>> (1:>2:>3:>4:>5:>Nil) !! 14 *** Exception: Clash.Sized.Vector.(!!): index 14 is larger than maximum index 4 ...
(
!! ) :: forall (n :: Nat) i a . (KnownNat n, Enum i) => Vec n a -> i -> aclash-prelude Clash.Prelude.Safe "xs !! n" returns the n'th element of xs. NB: Vector elements have an ASCENDING subscript starting from 0 and ending at length - 1.
>>> (1:>2:>3:>4:>5:>Nil) !! 4 5 >>> (1:>2:>3:>4:>5:>Nil) !! (length (1:>2:>3:>4:>5:>Nil) - 1) 5 >>> (1:>2:>3:>4:>5:>Nil) !! 1 2 >>> (1:>2:>3:>4:>5:>Nil) !! 14 *** Exception: Clash.Sized.Vector.(!!): index 14 is larger than maximum index 4 ...
(
!! ) :: forall (n :: Nat) i a . (KnownNat n, Enum i) => Vec n a -> i -> aclash-prelude Clash.Sized.Vector "xs !! n" returns the n'th element of xs. NB: Vector elements have an ASCENDING subscript starting from 0 and ending at length - 1.
>>> (1:>2:>3:>4:>5:>Nil) !! 4 5 >>> (1:>2:>3:>4:>5:>Nil) !! (length (1:>2:>3:>4:>5:>Nil) - 1) 5 >>> (1:>2:>3:>4:>5:>Nil) !! 1 2 >>> (1:>2:>3:>4:>5:>Nil) !! 14 *** Exception: Clash.Sized.Vector.(!!): index 14 is larger than maximum index 4 ...
-
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]
(
!! ) :: HasCallStack => [a] -> Int -> adimensional 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
(
!! ) :: HasCallStack => [a] -> Int -> adistribution-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
(
!! ) :: HasCallStack => [a] -> Int -> afaktory 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
(
!! ) :: HasCallStack => [a] -> Int -> ahledger-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
-
sized Data.Sized (Unsafe) indexing with Ints. If you want to check boundary statically, use %!! or sIndex. Since 0.7.0.0