streamly-0.8.1.1: Dataflow programming and declarative concurrency
Copyright(c) 2020 Composewell Technologies
LicenseBSD-3-Clause
Maintainerstreamly@composewell.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Streamly.Internal.Data.Parser.ParserD.Tee

Description

Parallel parsers. Distributing the input to multiple parsers at the same time.

For simplicity, we are using code where a particular state is unreachable but it is not prevented by types. Somehow uni-pattern match using "let" produces better optimized code compared to using case match and using explicit error messages in unreachable cases.

There seem to be no way to silence individual warnings so we use a global incomplete uni-pattern match warning suppression option for the file. Disabling the warning for other code as well has the potential to mask off some legit warnings, therefore, we have segregated only the code that uses uni-pattern matches in this module.

Synopsis

Documentation

teeWith :: Monad m => (a -> b -> c) -> Parser m x a -> Parser m x b -> Parser m x c Source #

See teeWith.

Broken

teeWithFst :: Monad m => (a -> b -> c) -> Parser m x a -> Parser m x b -> Parser m x c Source #

See teeWithFst.

Broken

teeWithMin :: (a -> b -> c) -> Parser m x a -> Parser m x b -> Parser m x c Source #

See teeWithMin.

Unimplemented

shortest :: Monad m => Parser m x a -> Parser m x a -> Parser m x a Source #

See shortest.

Broken

longest :: MonadCatch m => Parser m x a -> Parser m x a -> Parser m x a Source #

See longest.

Broken