Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- path :: forall a m. (DecodePath a, Applicative m, Typeable a) => Endpoint m a
- pathConst :: Applicative m => Text -> Endpoint m (HList '[])
- p' :: Applicative m => Text -> Endpoint m (HList '[])
- pathEmpty :: Applicative m => Endpoint m (HList '[])
- paths :: forall a m. (DecodePath a, Applicative m, Typeable a) => Endpoint m [a]
- pathAny :: Applicative m => Endpoint m (HList '[])
Documentation
path :: forall a m. (DecodePath a, Applicative m, Typeable a) => Endpoint m a Source #
Endpoint that tries to decode head of the current path reminder into specific type. It consumes head of the reminder.
- If path is empty, Endpoint is not matched
- If decoding has failed, Endpoint is not matched
pathConst :: Applicative m => Text -> Endpoint m (HList '[]) Source #
Endpoint that matches only if the head of current path reminder is equal to some given constant value. It consumes head of the reminder.
- If value matches the provided constant, saves the tail of the path as a reminder
- Otherwise, resulting endpoint is not matched
pathEmpty :: Applicative m => Endpoint m (HList '[]) Source #
Endpoint that matches only against empty path reminder
paths :: forall a m. (DecodePath a, Applicative m, Typeable a) => Endpoint m [a] Source #
Endpoint that consumes the rest of the path reminder and decode it using provided DecodePath for some type a