@@ -24,7 +24,7 @@ module Servant.Client
2424 , ClientEnv (ClientEnv)
2525 , mkAuthenticateReq
2626 , ServantError(..)
27− , EmptyAPIClient(..)
27+ , EmptyClient(..)
2828 , module Servant.Common.BaseUrl
2929 ) where
3030
@@ -90,9 +90,9 @@ instance (HasClient a, HasClient b) => HasClient (a :<|> b) where
9090 clientWithRoute (Proxy :: Proxy b) req
9191
9292-- | Singleton type representing a client for an empty API.
93−data EmptyAPIClient = EmptyAPIClient
93+data EmptyClient = EmptyClient deriving (Eq, Show, Bounded, Enum)
9494
95−-- | The client for 'EmptyAPI' is simply 'EmptyAPIClient'.
95+-- | The client for 'EmptyAPI' is simply 'EmptyClient'.
9696--
9797-- > type MyAPI = "books" :> Get '[JSON] [Book] -- GET /books
9898-- > :<|> "nothing" :> EmptyAPI
@@ -101,10 +101,10 @@ data EmptyAPIClient = EmptyAPIClient
101101-- > myApi = Proxy
102102-- >
103103-- > getAllBooks :: ClientM [Book]
104−-- > (getAllBooks :<|> EmptyAPIClient) = client myApi
104+-- > (getAllBooks :<|> EmptyClient) = client myApi
105105instance HasClient EmptyAPI where
106− type Client EmptyAPI = EmptyAPIClient
107− clientWithRoute Proxy _ = EmptyAPIClient
106+ type Client EmptyAPI = EmptyClient
107+ clientWithRoute Proxy _ = EmptyClient
108108
109109-- | If you use a 'Capture' in one of your endpoints in your API,
110110-- the corresponding querying function will automatically take