Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. awaitJust :: forall (m :: Type -> Type) src i . (Monad m, HasError m) => String -> ParserT m src i i

    hpp Hpp.Parser

    await that throws an error with the given message if no more input is available. This may be used to locate where in a processing pipeline input was unexpectedly exhausted.

  2. boolJust :: Bool -> Maybe ()

    hpp Hpp.StringSig

    No documentation available.

  3. predicateJust :: (a -> Bool) -> a -> Maybe a

    hpp Hpp.StringSig

    No documentation available.

  4. AlignJustify :: Align

    hyperbole Web.Hyperbole

    No documentation available.

  5. AlignJustify :: Align

    hyperbole Web.Hyperbole.View

    No documentation available.

  6. fromJust :: Maybe a <-> a

    invertible Data.Invertible.Maybe

    Convert between Just and its value.

  7. isJust :: Maybe () <-> Bool

    invertible Data.Invertible.Maybe

    Convert between 'Just ()' and True (see isJust).

  8. adjust :: Ord k => (v -> v) -> Key ph k -> Map ph k v -> Map ph k v

    justified-containers Data.Map.Justified

    Adjust the valid at a key, known to be in the map, using the given function. Since the set of valid keys in the input map and output map are the same, keys that were valid for the input map remain valid for the output map.

  9. adjustWithKey :: Ord k => (Key ph k -> v -> v) -> Key ph k -> Map ph k v -> Map ph k v

    justified-containers Data.Map.Justified

    Adjust the valid at a key, known to be in the map, using the given function. Since the set of valid keys in the input map and output map are the same, keys that were valid for the input map remain valid for the output map.

  10. adjustingOutputHeaders :: (Header -> Header) -> Iso' (Csv' Name) (Csv' Name)

    lens-csv Data.Csv.Lens

    Allows rewritingaddingremoving headers on the CSV both before serializing Note that rewriting a header name DOES NOT affect any of the records, it only affects the choice and order of the columns in the output CSV. If you want to rename a column header you must also rename the name of that field on all rows in the csv. This is a limitation of cassava itself. Examples: Drop the first column:

    >>> BL.lines (myCsv & namedCsv . adjustingOutputHeaders (view _tail) %~ id)
    ["population\r","19540000\r","39560000\r"]
    
    Add a new column with the population in millions
    >>> import Data.Char (toLower)
    
    >>> addStateLower m = M.insert "state_lower" (m ^. ix "state_code" . to (map toLower)) m
    
    >>> :{
    BL.lines (myCsv
    & namedCsv
    -- Add "state_lower" to output headers so it will be serialized
    . adjustingOutputHeaders (<> pure "state_lower")
    . rows
    . _NamedRecord @(M.Map String String)
    -- Add "state_lower" to each record
    %~ addStateLower
    )
    :}
    ["state_code,population,state_lower\r","NY,19540000,ny\r","CA,39560000,ca\r"]
    
    Reverse column order >>> BL.lines (myCsv & namedCsv . adjustingOutputHeaders (view reversed) %~ id) ["population,state_coder","19540000,NYr","39560000,CAr"]

Page 134 of many | Previous | Next