- $logging
-- Logging uses the 'MonadWriter' instance of 'Vorple'. Convenience functions
-- for logging are provided which use Template Haskell. These functions accept
-- a /format string/ in the style of @printf@, but with a different set of
-- format codes. The Template Haskell function then splices in a function which
-- takes one argument for each hole left by a format code in the format string.
--
-- The format codes:
--
--   * @%b@ accepts a 'ByteString'
--
--   * @%s@ accepts a 'Text'
--
--   * @%j@ accepts anything with a 'ToJSON' instance
--
--   * @%p@ accepts anything with a 'Show' instance

require :: (MonadError HttpStatus m) => Bool -> m ()
require c = when (not c) $ throwStatus H.status400

require :: (MonadError HttpStatus m) => Bool -> m ()
require c = when (not c) $ throwStatus H.status400
require c = when (not c) $ throwStatus H.status400