Hoogle Search
Within LTS Haskell 24.37 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
toList :: Unboxable a => Vector a -> [a]unboxing-vector Data.Vector.Unboxing No documentation available.
lazyKeyMapFromList :: [(Key, v)] -> KeyMap vunjson Data.Unjson.Internal.Aeson.Compat No documentation available.
-
validate-input Data.Validator Check that a list is not empty
fromList :: forall (n :: Nat) a . SNatI n => [a] -> Maybe (Vec n a)vec Data.Vec.DataFamily.SpineStrict Convert list [a] to Vec n a. Returns Nothing if lengths don't match exactly.
>>> fromList "foo" :: Maybe (Vec N.Nat3 Char) Just ('f' ::: 'o' ::: 'o' ::: VNil)>>> fromList "quux" :: Maybe (Vec N.Nat3 Char) Nothing
>>> fromList "xy" :: Maybe (Vec N.Nat3 Char) Nothing
fromListPrefix :: forall (n :: Nat) a . SNatI n => [a] -> Maybe (Vec n a)vec Data.Vec.DataFamily.SpineStrict Convert list [a] to Vec n a. Returns Nothing if input list is too short.
>>> fromListPrefix "foo" :: Maybe (Vec N.Nat3 Char) Just ('f' ::: 'o' ::: 'o' ::: VNil)>>> fromListPrefix "quux" :: Maybe (Vec N.Nat3 Char) Just ('q' ::: 'u' ::: 'u' ::: VNil)>>> fromListPrefix "xy" :: Maybe (Vec N.Nat3 Char) Nothing
reifyList :: [a] -> (forall (n :: Nat) . SNatI n => Vec n a -> r) -> rvec Data.Vec.DataFamily.SpineStrict Reify any list [a] to Vec n a.
>>> reifyList "foo" length 3
toList :: forall (n :: Nat) a . SNatI n => Vec n a -> [a]vec Data.Vec.DataFamily.SpineStrict Convert Vec to list.
>>> toList $ 'f' ::: 'o' ::: 'o' ::: VNil "foo"
fromList :: forall (n :: Nat) a . SNatI n => [a] -> Maybe (Vec n a)vec Data.Vec.Lazy Convert list [a] to Vec n a. Returns Nothing if lengths don't match exactly.
>>> fromList "foo" :: Maybe (Vec N.Nat3 Char) Just ('f' ::: 'o' ::: 'o' ::: VNil)>>> fromList "quux" :: Maybe (Vec N.Nat3 Char) Nothing
>>> fromList "xy" :: Maybe (Vec N.Nat3 Char) Nothing
fromListPrefix :: forall (n :: Nat) a . SNatI n => [a] -> Maybe (Vec n a)vec Data.Vec.Lazy Convert list [a] to Vec n a. Returns Nothing if input list is too short.
>>> fromListPrefix "foo" :: Maybe (Vec N.Nat3 Char) Just ('f' ::: 'o' ::: 'o' ::: VNil)>>> fromListPrefix "quux" :: Maybe (Vec N.Nat3 Char) Just ('q' ::: 'u' ::: 'u' ::: VNil)>>> fromListPrefix "xy" :: Maybe (Vec N.Nat3 Char) Nothing
reifyList :: [a] -> (forall (n :: Nat) . SNatI n => Vec n a -> r) -> rvec Data.Vec.Lazy Reify any list [a] to Vec n a.
>>> reifyList "foo" length 3