Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

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

  1. many :: Alternative f => f a -> f [a]

    appar Text.Appar.String

    Zero or more.

    Examples

    >>> many (putStr "la")
    lalalalalalalalala... * goes on forever *
    
    >>> many Nothing
    Just []
    
    >>> take 5 <$> many (Just 1)
    * hangs forever *
    
    Note that this function can be used with Parsers based on Applicatives. In that case many parser will attempt to parse parser zero or more times until it fails.

  2. manyTill :: MkParser inp a -> MkParser inp b -> MkParser inp [a]

    appar Text.Appar.String

    manyTill p end applies parser p zero or more times until parser end succeeds. Returns the list of values returned by p.

  3. skipMany :: MkParser inp a -> MkParser inp ()

    appar Text.Appar.String

    skipMany p applies the parser p zero or more times, skipping its result.

  4. replaceMany :: Eq a => [([a], [a])] -> [a] -> [a]

    ascii-progress System.Console.AsciiProgress.Internal

    Replaces each pair in a list of replacement pairs in a list with replace. The idea is to call ((old, new) target -> replace old new target) on each of the pairs, accumulating the resulting modified list.

    >>> replaceMany [] "foobar"
    "foobar"
    
    >>> replaceMany [("bar", "biz")] "foobar"
    "foobiz"
    
    >>> replaceMany [("foo", "baz"), ("bar", "biz")] "foobar"
    "bazbiz"
    

  5. getMany :: ParseASN1 a -> ParseASN1 [a]

    asn1-parse Data.ASN1.Parse

    get many elements until there's nothing left

  6. package bank-holiday-germany

    German bank holidays and public holidays Calculation of bank holidays and public holidays in Germany.

  7. module Data.Holiday.Germany

    This module computes bank holidays and public holidays for Germany and its federal states. Use isBankHoliday to check if a holiday is also a bank holiday. Use isGermanPublicHoliday and isFederalPublicHoliday to check if a holiday is also a public holiday. You can test this package or just calculate a few holidays with GHCi:

    $ stack ghci --package time --package bank-holiday-germany
    ghci> import Data.Time
    ghci> import Data.Holiday.Germany
    ghci> fromDay (fromGregorian 2024 5 1)  -- Tag der Arbeit
    [ErsterMai]
    ghci> isBankHoliday Heiligabend
    True
    ghci> isGermanPublicHoliday Heiligabend
    False
    ghci> holidaysBetween (fromGregorian 2024 12 1) (fromGregorian 2024 12 26)
    [(2024-12-24,Heiligabend),(2024-12-25,ErsterWeihnachtsfeiertag),(2024-12-26,ZweiterWeihnachtsfeiertag)]
    
    Public holidays – except for TagDerDeutschenEinheit – are under federal obligations in Germany („Ländersache“). Most bank holidays are also federal public holidays and vice versa. But there are some additional holidays which may differ between federal states. For example, Heilige Drei Könige is not a bank holiday but it is a public holiday in Bavaria. The following example prints all public holidays in Bavaria (Landkreis Miesbach, Oberbayern) in 2025:
    import Prelude
    import Data.Time
    import Data.Holiday.Germany
    
    start = fromGregorian 2025 1 1
    
    end = fromGregorian 2025 12 31
    
    main :: IO ()
    main = putStrLn
    $ unlines
    $ map (\(d,x) -> show d ++ " " ++ germanHolidayName x)
    $ filter (\(_,x) -> isFederalPublicHoliday Bayern x && x /= Friedensfest)
    $ holidaysBetween start end
    
    Resources: Public holidays are implemented for all 16 federal states. For some states, we couldn't find official sources; That's why this list only includes some states.

  8. mergeMany :: (C a, Storable a) => [T w a] -> T w a

    battleship-combinatorics Combinatorics.Battleship.Count.CountMap

    No documentation available.

  9. benchMany :: Int -> [(String, IO a)] -> IO ()

    benchpress Test.BenchPress

    Convenience function that runs several benchmarks using benchmark and prints a timing statistics summary using printStatsSummaries. The statistics are computed from the measured CPU times. Each benchmark has an associated label that is used to identify the benchmark in the printed results. Writes output to standard output.

  10. newtype Many a

    binary-generic-combinators Data.Binary.Combinators

    Zero or more elements of a, parsing as long as the parser for a succeeds. Many Word8 will consume all your input!

Page 215 of many | Previous | Next