Fix all hlint warnings
- Html.hs: replace lambdas with section/composition where possible - Html.hs: replace case/fromMaybe with fromMaybe - Html.hs: add fromMaybe to imports, use unqualified - Parser.hs: replace span with break (2 locations) - Parser.hs: replace if/then/else with list comprehension - Parser.hs: remove redundant catch-all patterns (break is exhaustive) - Server.hs: eta reduce htmlResponse - Add .hlint.yaml to suppress 'Avoid lambda' (suggested fix has precedence issues with blaze-html's infix (!) operator) - All 26 tests passing, hlint: No hints, exit code 0
This commit is contained in:
+1
-2
@@ -68,11 +68,10 @@ urlDecodePath = Html.urlDecode
|
||||
|
||||
-- | Build a 200 HTML response.
|
||||
htmlResponse :: ByteString -> Wai.Response
|
||||
htmlResponse body =
|
||||
htmlResponse =
|
||||
Wai.responseLBS
|
||||
HTTP.status200
|
||||
[("Content-Type", "text/html; charset=utf-8")]
|
||||
body
|
||||
|
||||
-- | 404 response.
|
||||
notFound :: Wai.Response
|
||||
|
||||
Reference in New Issue
Block a user