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:
2026-05-19 07:25:59 -04:00
parent b775fd4f3f
commit 95a7521584
4 changed files with 16 additions and 17 deletions
+1 -2
View File
@@ -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