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.

  1. 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.

  2. toJSONList :: ToJSON a => [a] -> Value

    gogol-core Gogol.Data.JSON

    No documentation available.

  3. onSublist :: Eq a => [a] -> Splitter a

    split 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 (:[]).

  4. type SplitList a = [Chunk a]

    split Data.List.Split.Internals

    Internal representation of a split list that tracks which pieces are delimiters and which aren't.

  5. onSublist :: Eq a => [a] -> Splitter a

    split 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 (:[]).

  6. 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 ..>
    

  7. appendList :: NonEmpty a -> [a] -> NonEmpty a

    base-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]
    

  8. fromList :: HasCallStack => [a] -> NonEmpty a

    base-compat Data.List.NonEmpty.Compat

    Converts a normal list to a NonEmpty stream. Raises an error if given an empty list.

  9. prependList :: [a] -> NonEmpty a -> NonEmpty a

    base-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]
    

  10. toList :: NonEmpty a -> [a]

    base-compat Data.List.NonEmpty.Compat

    Convert a stream to a normal list efficiently.

Page 55 of many | Previous | Next