Copyright | (c) 2020 Composewell Technologies |
---|---|
License | BSD-3-Clause |
Maintainer | streamly@composewell.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- teeWith :: Monad m => (a -> b -> c) -> Parser m x a -> Parser m x b -> Parser m x c
- teeWithFst :: Monad m => (a -> b -> c) -> Parser m x a -> Parser m x b -> Parser m x c
- teeWithMin :: (a -> b -> c) -> Parser m x a -> Parser m x b -> Parser m x c
- shortest :: Monad m => Parser m x a -> Parser m x a -> Parser m x a
- longest :: MonadCatch m => Parser m x a -> Parser m x a -> Parser m x a
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