Copyright | (C) 2016-2018 David M. Johnson |
---|---|
License | BSD3-style (see the file LICENSE) |
Maintainer | David M. Johnson <djohnson.m@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- runRoute :: HasRouter m layout => Proxy layout -> RouteT m layout a -> (m -> URI) -> m -> Either RoutingError a
- data RoutingError = Fail
Documentation
runRoute :: HasRouter m layout => Proxy layout -> RouteT m layout a -> (m -> URI) -> m -> Either RoutingError a Source #
Use a handler to route a location, represented as a String
.
All handlers must, in the end, return m a
.
routeLoc
will choose a route and return its result.
data RoutingError Source #
When routing, the router may fail to match a location.
Instances
Eq RoutingError Source # | |
Defined in Miso.Router (==) :: RoutingError -> RoutingError -> Bool # (/=) :: RoutingError -> RoutingError -> Bool # | |
Ord RoutingError Source # | |
Defined in Miso.Router compare :: RoutingError -> RoutingError -> Ordering # (<) :: RoutingError -> RoutingError -> Bool # (<=) :: RoutingError -> RoutingError -> Bool # (>) :: RoutingError -> RoutingError -> Bool # (>=) :: RoutingError -> RoutingError -> Bool # max :: RoutingError -> RoutingError -> RoutingError # min :: RoutingError -> RoutingError -> RoutingError # | |
Show RoutingError Source # | |
Defined in Miso.Router showsPrec :: Int -> RoutingError -> ShowS # show :: RoutingError -> String # showList :: [RoutingError] -> ShowS # |