Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- parseError :: Applicative f => ParseErrorBundle Text Void -> f Value
- type CollectErrsT m = StateT [Value] m
- addErr :: Monad m => Value -> CollectErrsT m ()
- addErrMsg :: Monad m => Text -> CollectErrsT m ()
- runCollectErrs :: Monad m => CollectErrsT m Value -> m Value
- runAppendErrs :: Monad m => CollectErrsT m a -> CollectErrsT m a
- singleError :: Text -> Value
Documentation
parseError :: Applicative f => ParseErrorBundle Text Void -> f Value Source #
Wraps a parse error into a list of errors.
type CollectErrsT m = StateT [Value] m Source #
A wrapper to pass error messages around.
addErrMsg :: Monad m => Text -> CollectErrsT m () Source #
Convenience function for just wrapping an error message.
runCollectErrs :: Monad m => CollectErrsT m Value -> m Value Source #
Runs the given query computation, but collects the errors into an error list, which is then sent back with the data.
runAppendErrs :: Monad m => CollectErrsT m a -> CollectErrsT m a Source #
Runs the given computation, collecting the errors and appending them to the previous list of errors.
singleError :: Text -> Value Source #
Constructs a response object containing only the error with the given message.