Add type signature for mains.
Remove unused imports.
Remove unused RecursiveDo.
Add type signatures.
Remove redundant $s.
Remove unnecessary parentheses.
Use isJust instead of maybe False (const True).
Use fromMaybe instead of maybe [fallback] id.
Remove seemingly pointless putStrLn.
Use join instead of >>= id.
Use monadic versions of replicate and map.
Make git ignore editor backup files.