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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Servant.Server.Internal.RouteResult

Synopsis

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

# Documentation

data RouteResult a #

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

newtype RouteResultT m a #

Constructors

RouteResultT |

Fields

- runRouteResultT :: m (RouteResult a)

#### Instances

Instances details

MonadTransControl RouteResultT # |
Instance details Defined in Servant.Server.Internal.RouteResult Associated Types type StT RouteResultT a # Methods liftWith :: Monad m => (Run RouteResultT -> m a) -> RouteResultT m a # restoreT :: Monad m => m (StT RouteResultT a) -> RouteResultT m a #
MonadTrans RouteResultT # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods lift :: Monad m => m a -> RouteResultT m a #
MonadBaseControl b m => MonadBaseControl b (RouteResultT m) # |
Instance details Defined in Servant.Server.Internal.RouteResult Associated Types type StM (RouteResultT m) a # Methods liftBaseWith :: (RunInBase (RouteResultT m) b -> b a) -> RouteResultT m a # restoreM :: StM (RouteResultT m) a -> RouteResultT m a #
MonadBase b m => MonadBase b (RouteResultT m) # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods liftBase :: b α -> RouteResultT m α #
MonadIO m => MonadIO (RouteResultT m) # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods liftIO :: IO a -> RouteResultT m a #
(Functor m, Monad m) => Applicative (RouteResultT m) # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods pure :: a -> RouteResultT m a # (<*>) :: RouteResultT m (a -> b) -> RouteResultT m a -> RouteResultT m b # liftA2 :: (a -> b -> c) -> RouteResultT m a -> RouteResultT m b -> RouteResultT m c # (*>) :: RouteResultT m a -> RouteResultT m b -> RouteResultT m b # (<*) :: RouteResultT m a -> RouteResultT m b -> RouteResultT m a #
Functor m => Functor (RouteResultT m) # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods fmap :: (a -> b) -> RouteResultT m a -> RouteResultT m b # (<$) :: a -> RouteResultT m b -> RouteResultT m a #
Monad m => Monad (RouteResultT m) # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods (>>=) :: RouteResultT m a -> (a -> RouteResultT m b) -> RouteResultT m b # (>>) :: RouteResultT m a -> RouteResultT m b -> RouteResultT m b # return :: a -> RouteResultT m a #
MonadThrow m => MonadThrow (RouteResultT m) # |
Instance details Defined in Servant.Server.Internal.RouteResult Methods throwM :: (HasCallStack, Exception e) => e -> RouteResultT m a #
type StT RouteResultT a # |
Instance details Defined in Servant.Server.Internal.RouteResult type StT RouteResultT a = RouteResult a
type StM (RouteResultT m) a # |
Instance details Defined in Servant.Server.Internal.RouteResult type StM (RouteResultT m) a = ComposeSt RouteResultT m a