revisiting lists are monoid in haskell
very simple
#ormolu doesn't like multiline html
-- loginPage :: LBS.ByteString
-- loginPage = "<html><body>\
-- \<h3>Login with Mastodon</h3>\
-- \<a href='/start'>Log in with Mastodon via OAuth</a>\
-- \</body></html>"
so you can write it as
loginPage :: LBS.ByteString
loginPage = "<html><body>\n<h3>Login with Mastodon</h3>\n<a href='/start'>Log in with Mastodon via OAuth</a>\n</body></html>"
or concat the list of these lines associatively as concat is in #haskell
ofc with overloaded strings
loginPage =
"<html><body>\n" <>
"<h3>Login with Mastodon</h3>\n" <>
"<a href='/start'>Log in with Mastodon via OAuth</a>\n" <>
"</body></html>"
his relates to #monoids because string concatenation (using ++ for lists or + for strings) is an associative binary operation with an identity element (the empty string), thus forming a monoid structure.
sidenote -- you can also do it with Data.Text.Lazy but that's besides the point