Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype QueryParams = QueryParams {
- unQueryParams :: Query
- newtype QueryParamsTransformFn = AddOrReplace [(UnescapedTemplate, Maybe UnescapedTemplate)]
- applyQueryParamsTransformFn :: MonadError TransformErrorBundle m => QueryParamsTransformFn -> RequestTransformCtx -> QueryParams -> m QueryParams
- validateQueryParamsTransformFn :: TemplatingEngine -> QueryParamsTransformFn -> Validation TransformErrorBundle ()
Documentation
newtype QueryParams Source #
The actual query params we are transforming.
This newtype is necessary because otherwise we end up with an orphan instance.
QueryParams | |
|
Instances
newtype QueryParamsTransformFn Source #
The defunctionalized transformation QueryParams
Instances
applyQueryParamsTransformFn :: MonadError TransformErrorBundle m => QueryParamsTransformFn -> RequestTransformCtx -> QueryParams -> m QueryParams Source #
Provide an implementation for the transformations defined by
QueryParamsTransformFn
.
If one views QueryParamsTransformFn
as an interface describing HTTP method
transformations, this can be seen as an implementation of these
transformations as normal Haskell functions.
validateQueryParamsTransformFn :: TemplatingEngine -> QueryParamsTransformFn -> Validation TransformErrorBundle () Source #
Validate that the provided QueryParamsTransformFn
is correct in the
context of a particular TemplatingEngine
.
This is a product of the fact that the correctness of a given transformation
may be dependent on zero, one, or more of the templated transformations
encoded within the given QueryParamsTransformFn
.