Hoogle Search
Within LTS Haskell 24.60 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
toJSONKeyList :: ToJSONKey a => ToJSONKeyFunction [a]gogol-core Gogol.Data.JSON This is similar in spirit to the showsList method of Show. It makes it possible to give String keys special treatment without using OverlappingInstances. End users should always be able to use the default implementation of this method.
toJSONList :: ToJSON a => [a] -> Valuegogol-core Gogol.Data.JSON No documentation available.
onSublist :: Eq a => [a] -> Splitter asplit Data.List.Split A splitting strategy that splits on the given list, when it is encountered as an exact subsequence.
>>> split (onSublist "xyz") "aazbxyzcxd" ["aazb","xyz","cxd"]
Note that splitting on the empty list is a special case, which splits just before every element of the list being split.>>> split (onSublist "") "abc" ["","","a","","b","","c"]
>>> split (dropDelims . dropBlanks $ onSublist "") "abc" ["a","b","c"]
However, if you want to break a list into singleton elements like this, you are better off using chunksOf 1, or better yet, map (:[]).-
split Data.List.Split.Internals Internal representation of a split list that tracks which pieces are delimiters and which aren't.
onSublist :: Eq a => [a] -> Splitter asplit Data.List.Split.Internals A splitting strategy that splits on the given list, when it is encountered as an exact subsequence.
>>> split (onSublist "xyz") "aazbxyzcxd" ["aazb","xyz","cxd"]
Note that splitting on the empty list is a special case, which splits just before every element of the list being split.>>> split (onSublist "") "abc" ["","","a","","b","","c"]
>>> split (dropDelims . dropBlanks $ onSublist "") "abc" ["a","b","c"]
However, if you want to break a list into singleton elements like this, you are better off using chunksOf 1, or better yet, map (:[]).fillList :: Storable storable => [storable] -> Packer ()memory Data.ByteArray.Pack Will put the given storable list from the current position in the stream to the end. This function will fail with not enough storage if the given storable can't be written (not enough space) Example:
> pack (fillList $ [1..] :: Word8) 9 "\1\2\3\4\5\6\7\8\9" > pack (fillList $ [1..] :: Word32) 4 "\1\0\0\0" > pack (fillList $ [1..] :: Word32) 64 .. <..succesful..> > pack (fillList $ [1..] :: Word32) 1 .. <.. not enough space ..> > pack (fillList $ [1..] :: Word32) 131 .. <.. not enough space ..>
appendList :: NonEmpty a -> [a] -> NonEmpty abase-compat Data.List.NonEmpty.Compat Attach a list at the end of a NonEmpty.
>>> appendList (1 :| [2,3]) [] 1 :| [2,3]
>>> appendList (1 :| [2,3]) [4,5] 1 :| [2,3,4,5]
fromList :: HasCallStack => [a] -> NonEmpty abase-compat Data.List.NonEmpty.Compat Converts a normal list to a NonEmpty stream. Raises an error if given an empty list.
prependList :: [a] -> NonEmpty a -> NonEmpty abase-compat Data.List.NonEmpty.Compat Attach a list at the beginning of a NonEmpty.
>>> prependList [] (1 :| [2,3]) 1 :| [2,3]
>>> prependList [negate 1, 0] (1 :| [2, 3]) -1 :| [0,1,2,3]
-
base-compat Data.List.NonEmpty.Compat Convert a stream to a normal list efficiently.