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.
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.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.
skipMany :: MkParser inp a -> MkParser inp ()appar Text.Appar.String skipMany p applies the parser p zero or more times, skipping its result.
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"getMany :: ParseASN1 a -> ParseASN1 [a]asn1-parse Data.ASN1.Parse get many elements until there's nothing left
-
German bank holidays and public holidays Calculation of bank holidays and public holidays in 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.- Bankfeiertage: https://de.wikipedia.org/wiki/Bankfeiertag
- Übersicht: https://de.wikipedia.org/wiki/Gesetzliche_Feiertage_in_Deutschland
- Weitere Übersicht: https://www.arbeitstage.org/
- Bayern: https://www.stmi.bayern.de/suv/feiertage/
- Baden-Württemberg: https://im.baden-wuerttemberg.de/de/service/feiertage
- Niedersachsen: https://service.niedersachsen.de/portaldeeplink/?tsa_leistung_id=8664664&tsa_sprache=de_DE
- Hessen: https://innen.hessen.de/buerger-staat/feiertage
- Rheinland-Pfalz: https://mdi.rlp.de/themen/buerger-und-staat/verfassung-und-verwaltung/sonn-und-feiertagsrecht
- Brandenburg: https://bravors.brandenburg.de/gesetze/ftg_2003/6
- Sachsen: https://www.revosax.sachsen.de/vorschrift/3997-SaechsSFG
- Sachsen-Anhalt: https://www.landesrecht.sachsen-anhalt.de/bsst/document/jlr-FeiertGSTrahmen/part/X
- Thüringen: https://innen.thueringen.de/staats-und-verwaltungsrecht/oeffentliches-recht/feiertagsrecht
- Hamburg: https://www.hamburg.de/ferien-und-feiertage/
- Mecklenburg-Vorpommern u. Berlin (Frauentag): https://www.deutsche-rentenversicherung.de/DRV/DE/Ueber-uns-und-Presse/Presse/Meldungen/2024/240306_frauentag_feiertag_frei.html
- Saarland: https://www.saarland.de/mibs/DE/themen-aufgaben/aufgaben/buerger_und_staat/sonn_u_feiertagsrecht/feiertagsrecht_node.html
- Bremen: https://www.transparenz.bremen.de/metainformationen/gesetz-ueber-die-sonn-gedenk-und-feiertage-vom-12-november-1954-145882?asl=bremen203_tpgesetz.c.55340.de&template=20_gp_ifg_meta_detail_d
mergeMany :: (C a, Storable a) => [T w a] -> T w abattleship-combinatorics Combinatorics.Battleship.Count.CountMap No documentation available.
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.
-
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!