on develop help sign in
Fix up according to hlint
commit0b1c02233849e3cb476b65e23d575d2365743f3d authorGreg Hale <imalsogreg@gmail.com> dateFri 26 Aug 2016, 22:19 (10 years ago) parent09bf826
1 file changed+5−5
src/Reflex/Dom/Xhr.hs+5−5
src/Reflex/Dom/Xhr.hs+5−5
@@ -179,16 +179,16 @@ newXMLHttpRequestWithError req cb = do
179179 status <- liftIO $ xmlHttpRequestGetStatus xhr
180180 statusText <- liftIO $ xmlHttpRequestGetStatusText xhr
181181 when (readyState == 4) $ do
182− t <- if rt == Just XhrResponseType_Text || rt == Nothing
182+ t <- if rt == Just XhrResponseType_Text || isNothing rt
183183 then liftIO $ xmlHttpRequestGetResponseText xhr
184184 else return Nothing
185185 r <- liftIO $ xmlHttpRequestGetResponse xhr
186186 h <- case _xhrRequestConfig_responseHeaders c of
187− AllHeaders -> liftIO $ fmap parseAllHeadersString $
187+ AllHeaders -> liftIO $ parseAllHeadersString <$>
188188 xmlHttpRequestGetAllResponseHeaders xhr
189− OnlyHeaders xs -> liftIO $ fmap Map.fromList $ traverse
189+ OnlyHeaders xs -> liftIO $ Map.fromList <$> traverse
190190 (\x -> (x,) <$> xmlHttpRequestGetResponseHeader xhr x) xs
191− _ <- liftIO $ cb $ Right $
191+ _ <- liftIO $ cb $ Right
192192 XhrResponse { _xhrResponse_status = status
193193 , _xhrResponse_statusText = statusText
194194 , _xhrResponse_response = r
@@ -201,7 +201,7 @@ newXMLHttpRequestWithError req cb = do
201201 return xhr
202202
203203parseAllHeadersString :: Text -> Map Text Text
204−parseAllHeadersString s = Map.fromList $ fmap (stripBoth . (T.span (/=':'))) $
204+parseAllHeadersString s = Map.fromList $ fmap (stripBoth . T.span (/=':')) $
205205 dropWhileEnd T.null $ T.splitOn (T.pack "\r\n") s
206206 where stripBoth (txt1, txt2) = (T.strip txt1, T.strip $ T.drop 1 txt2)
207207