HORIZON HASKELLDocslts/ghc-9.14.x6d5fdfd2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 6d5fdfd · 2026-10-12

Moduleparser-combinators-1.3.1Haskell2010

Control.Monad.Combinators.NonEmpty

The module provides NonEmpty list variants of some of the functions from Control.Monad.Combinators.

Synopsis
valuesome :: MonadPlus m => m a -> m (NonEmpty a)

some p applies the parser p one or more times and returns a list of the values returned by p.

word = some letter
valueendBy1 :: MonadPlus m => m a -> m sep -> m (NonEmpty a)

endBy1 p sep parses one or more occurrences of p, separated and ended by sep. Returns a non-empty list of values returned by p.

valuesepBy1 :: MonadPlus m => m a -> m sep -> m (NonEmpty a)

sepBy1 p sep parses one or more occurrences of p, separated by sep. Returns a non-empty list of values returned by p.

valuesepEndBy1 :: MonadPlus m => m a -> m sep -> m (NonEmpty a)

sepEndBy1 p sep parses one or more occurrences of p, separated and optionally ended by sep. Returns a non-empty list of values returned by p.