Hoogle Search
Within LTS Haskell 24.46 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
skipMany :: Alternative m => m a -> m ()parser-combinators Control.Applicative.Combinators skipMany p applies the parser p zero or more times, skipping its result. See also: manyTill, skipManyTill.
skipManyTill :: Alternative m => m a -> m end -> m endparser-combinators Control.Applicative.Combinators skipManyTill p end applies the parser p zero or more times skipping results until parser end succeeds. Result parsed by end is then returned. See also: manyTill, skipMany.
many :: MonadPlus m => m a -> m [a]parser-combinators Control.Monad.Combinators many p applies the parser p zero or more times and returns a list of the values returned by p.
identifier = (:) <$> letter <*> many (alphaNumChar <|> char '_')
manyTill :: MonadPlus m => m a -> m end -> m [a]parser-combinators Control.Monad.Combinators manyTill p end applies parser p zero or more times until parser end succeeds. Returns the list of values returned by p. Note that end result is consumed and lost. Use manyTill_ if you wish to keep it. See also: skipMany, skipManyTill.
manyTill_ :: MonadPlus m => m a -> m end -> m ([a], end)parser-combinators Control.Monad.Combinators manyTill_ p end applies parser p zero or more times until parser end succeeds. Returns the list of values returned by p and the end result. Use manyTill if you have no need in the result of the end. See also: skipMany, skipManyTill.
skipMany :: MonadPlus m => m a -> m ()parser-combinators Control.Monad.Combinators skipMany p applies the parser p zero or more times, skipping its result. See also: manyTill, skipManyTill.
skipManyTill :: MonadPlus m => m a -> m end -> m endparser-combinators Control.Monad.Combinators skipManyTill p end applies the parser p zero or more times skipping results until parser end succeeds. Result parsed by end is then returned. See also: manyTill, skipMany.
many :: Alternative f => f a -> f [a]parsers Text.Parser.Combinators 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 :: Alternative m => m a -> m end -> m [a]parsers Text.Parser.Combinators manyTill p end applies parser p zero or more times until parser end succeeds. Returns the list of values returned by p. This parser can be used to scan comments:
simpleComment = do{ string "<!--" ; manyTill anyChar (try (string "-->")) }Note the overlapping parsers anyChar and string "-->", and therefore the use of the try combinator.skipMany :: Parsing m => m a -> m ()parsers Text.Parser.Combinators A version of many that discards its input. Specialized because it can often be implemented more cheaply.