Skip to content

Commit 8d1fb46

Browse files
committed
Fix name shadowing warnings
1 parent d745d72 commit 8d1fb46

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Servant/Swagger/Internal.hs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ mkEndpointWithSchemaRef :: forall cs hs proxy method status a.
120120
mkEndpointWithSchemaRef mref path _ = mempty
121121
& paths.at path ?~
122122
(mempty & method ?~ (mempty
123-
& produces ?~ MimeList contentTypes
123+
& produces ?~ MimeList responseContentTypes
124124
& at code ?~ Inline (mempty
125125
& schema .~ mref
126126
& headers .~ responseHeaders)))
127127
where
128-
method = swaggerMethod (Proxy :: Proxy method)
129-
code = fromIntegral (natVal (Proxy :: Proxy status))
130-
contentTypes = allContentType (Proxy :: Proxy cs)
131-
responseHeaders = toAllResponseHeaders (Proxy :: Proxy hs)
128+
method = swaggerMethod (Proxy :: Proxy method)
129+
code = fromIntegral (natVal (Proxy :: Proxy status))
130+
responseContentTypes = allContentType (Proxy :: Proxy cs)
131+
responseHeaders = toAllResponseHeaders (Proxy :: Proxy hs)
132132

133133
-- | Add parameter to every operation in the spec.
134134
addParam :: Param -> Swagger -> Swagger
@@ -356,9 +356,9 @@ instance AllToResponseHeader '[] where
356356
toAllResponseHeaders _ = mempty
357357

358358
instance (ToResponseHeader h, AllToResponseHeader hs) => AllToResponseHeader (h ': hs) where
359-
toAllResponseHeaders _ = InsOrdHashMap.insert hname header hdrs
359+
toAllResponseHeaders _ = InsOrdHashMap.insert headerName headerBS hdrs
360360
where
361-
(hname, header) = toResponseHeader (Proxy :: Proxy h)
361+
(headerName, headerBS) = toResponseHeader (Proxy :: Proxy h)
362362
hdrs = toAllResponseHeaders (Proxy :: Proxy hs)
363363

364364
instance AllToResponseHeader hs => AllToResponseHeader (HList hs) where

0 commit comments

Comments
 (0)