servant-server-0.20.3.0: A family of combinators for defining webservices APIs and serving them

Safe Haskell | None
Language | Haskell2010

Servant.Server.Internal.RouteResult

Synopsis

- data RouteResult a
  - = Fail ServerError
  - | FailFatal !ServerError
  - | Route !a
- newtype RouteResultT (m :: Type -> Type) a = RouteResultT {
  - runRouteResultT :: m (RouteResult a)
  }

# Documentation

data RouteResult a Source #

The result of matching against a path in the route tree.

Constructors

Fail ServerError | Keep trying other paths. The `ServantError` should only be 404, 405 or 406.
FailFatal !ServerError | Don't try other paths.
Route !a |

#### Instances

Instances details

Applicative RouteResult Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods pure :: a -> RouteResult a Source # (<*>) :: RouteResult (a -> b) -> RouteResult a -> RouteResult b Source # liftA2 :: (a -> b -> c) -> RouteResult a -> RouteResult b -> RouteResult c Source # (*>) :: RouteResult a -> RouteResult b -> RouteResult b Source # (<*) :: RouteResult a -> RouteResult b -> RouteResult a Source #
Functor RouteResult Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods fmap :: (a -> b) -> RouteResult a -> RouteResult b Source # (<$) :: a -> RouteResult b -> RouteResult a Source #
Monad RouteResult Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods (>>=) :: RouteResult a -> (a -> RouteResult b) -> RouteResult b Source # (>>) :: RouteResult a -> RouteResult b -> RouteResult b Source # return :: a -> RouteResult a Source #
Read a => Read (RouteResult a) Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods readsPrec :: Int -> ReadS (RouteResult a) Source # readList :: ReadS [RouteResult a] Source # readPrec :: ReadPrec (RouteResult a) Source # readListPrec :: ReadPrec [RouteResult a] Source #
Show a => Show (RouteResult a) Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods showsPrec :: Int -> RouteResult a -> ShowS Source # show :: RouteResult a -> String Source # showList :: [RouteResult a] -> ShowS Source #
Eq a => Eq (RouteResult a) Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods (==) :: RouteResult a -> RouteResult a -> Bool Source # (/=) :: RouteResult a -> RouteResult a -> Bool Source #

newtype RouteResultT (m :: Type -> Type) a Source #

Constructors

RouteResultT |

Fields

- runRouteResultT :: m (RouteResult a)

#### Instances

Instances details

MonadTransControl RouteResultT Source # |

Instance details

Defined in Servant.Server.Internal.RouteResult

Associated Types

type StT RouteResultT a |
Instance details Defined in Servant.Server.Internal.RouteResult type StT RouteResultT a = RouteResult a

Methods

liftWith :: Monad m => (Run RouteResultT -> m a) -> RouteResultT m a Source #

restoreT :: Monad m => m (StT RouteResultT a) -> RouteResultT m a Source #

MonadTrans RouteResultT Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods lift :: Monad m => m a -> RouteResultT m a Source #
MonadBaseControl b m => MonadBaseControl b (RouteResultT m) Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods liftBaseWith :: (RunInBase (RouteResultT m) b -> b a) -> RouteResultT m a Source # restoreM :: StM (RouteResultT m) a -> RouteResultT m a Source #
MonadBase b m => MonadBase b (RouteResultT m) Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods liftBase :: b α -> RouteResultT m α Source #
MonadIO m => MonadIO (RouteResultT m) Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods liftIO :: IO a -> RouteResultT m a Source #
MonadThrow m => MonadThrow (RouteResultT m) Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods throwM :: (HasCallStack, Exception e) => e -> RouteResultT m a Source #
(Functor m, Monad m) => Applicative (RouteResultT m) Source # |

Instance details

Defined in Servant.Server.Internal.RouteResult

Methods

pure :: a -> RouteResultT m a Source #

(<*>) :: RouteResultT m (a -> b) -> RouteResultT m a -> RouteResultT m b Source #

liftA2 :: (a -> b -> c) -> RouteResultT m a -> RouteResultT m b -> RouteResultT m c Source #

(*>) :: RouteResultT m a -> RouteResultT m b -> RouteResultT m b Source #

(<*) :: RouteResultT m a -> RouteResultT m b -> RouteResultT m a Source #

Functor m => Functor (RouteResultT m) Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods fmap :: (a -> b) -> RouteResultT m a -> RouteResultT m b Source # (<$) :: a -> RouteResultT m b -> RouteResultT m a Source #
Monad m => Monad (RouteResultT m) Source # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods (>>=) :: RouteResultT m a -> (a -> RouteResultT m b) -> RouteResultT m b Source # (>>) :: RouteResultT m a -> RouteResultT m b -> RouteResultT m b Source # return :: a -> RouteResultT m a Source #
type StT RouteResultT a Source # |
Instance details Defined in Servant.Server.Internal.RouteResult type StT RouteResultT a = RouteResult a
type StM (RouteResultT m) a Source # |
Instance details Defined in Servant.Server.Internal.RouteResult type StM (RouteResultT m) a = ComposeSt RouteResultT m a