Skip to content

Commit

Permalink
Fix a few compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
MostAwesomeDude committed Dec 1, 2018
1 parent 72c4542 commit 402ab17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Servant/PY/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import qualified Data.CharSet as Set
import qualified Data.CharSet.Unicode.Category as Set
import Data.Data
import Data.Maybe (isJust)
import Data.Monoid
import Data.Monoid()
import Data.Text (Text)
import qualified Data.Text as T
import Data.Text.Encoding (decodeUtf8)
Expand Down Expand Up @@ -246,8 +246,8 @@ buildHeaderDict :: [HeaderArg f] -> Text
buildHeaderDict [] = ""
buildHeaderDict hs = "{" <> headers <> "}"
where headers = T.intercalate ", " $ map headerStr hs
headerStr header = "\"" <> header ^. headerArg . argPath <> "\": "
<> toPyHeader header
headerStr h = "\"" <> h ^. headerArg . argPath <> "\": "
<> toPyHeader h

getHeaderDict :: PythonRequest -> Text
getHeaderDict (TypedPythonRequest req) = buildHeaderDict $ req ^. reqHeaders
Expand All @@ -258,7 +258,7 @@ retrieveHeaders (TypedPythonRequest req) = retrieveHeaderText <$> req ^. reqHead
retrieveHeaders (UnTypedPythonRequest req) = retrieveHeaderText <$> req ^. reqHeaders

retrieveHeaderText :: forall f. HeaderArg f -> Text
retrieveHeaderText header = header ^. headerArg . argPath
retrieveHeaderText h = h ^. headerArg . argPath


functionArguments :: forall f. Req f -> Text
Expand Down
2 changes: 1 addition & 1 deletion src/Servant/PY/Requests.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Servant.PY.Requests where

import Data.Monoid
import Data.Monoid()
import Data.Proxy
import Data.Text (Text)
import qualified Data.Text as T
Expand Down

0 comments on commit 402ab17

Please sign in to comment.