diff --git a/servant/src/Servant/API.hs b/servant/src/Servant/API.hs index 08594137..075c3c13 100644 --- a/servant/src/Servant/API.hs +++ b/servant/src/Servant/API.hs @@ -71,7 +71,7 @@ import Servant.API.Header (Header (..)) import Servant.API.HttpVersion (HttpVersion (..)) import Servant.API.IsSecure (IsSecure (..)) import Servant.API.QueryParam (QueryFlag, QueryParam, - QueryParams) + QueryParams, QueryParamForm) import Servant.API.Raw (Raw) import Servant.API.RemoteHost (RemoteHost) import Servant.API.ReqBody (ReqBody) diff --git a/servant/src/Servant/API/QueryParam.hs b/servant/src/Servant/API/QueryParam.hs index ca913e17..531528fd 100644 --- a/servant/src/Servant/API/QueryParam.hs +++ b/servant/src/Servant/API/QueryParam.hs @@ -3,7 +3,7 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE PolyKinds #-} {-# OPTIONS_HADDOCK not-home #-} -module Servant.API.QueryParam (QueryFlag, QueryParam, QueryParams) where +module Servant.API.QueryParam (QueryFlag, QueryParam, QueryParams, QueryParamForm) where import Data.Typeable (Typeable) import GHC.TypeLits (Symbol) @@ -42,9 +42,21 @@ data QueryParams (sym :: Symbol) a -- >>> type MyApi = "books" :> QueryFlag "published" :> Get '[JSON] [Book] data QueryFlag (sym :: Symbol) +-- | Lookup the values associated to the query string parameter +-- and try to extract it as a value of type @a@. +-- +-- Example: +-- +-- >>> -- /books?title=