title: Haskell writeFile
body: <p>Beginner. Got a module called HHtml outputting this: </p>
  
  <pre><code>  setDoc = "&lt;!DOCTYPE = &lt;html&gt;&lt;head&gt;"
    setTitle = "&lt;title&gt;" ++ htmlTitle generator ++ "&lt;/title&gt;"
    setHeader = "&lt;header&gt;" ++ htmlHeader generator ++ "&lt;/header&gt;"
    setMeta = "&lt;meta&gt;" ++ htmlMeta generator ++ "&lt;/meta&gt;&lt;/head&gt;"
    setBody = "&lt;body&gt;" ++ htmlBody generator ++ "&lt;/body&gt;"
    setFooter = "&lt;footer&gt;" ++ htmlFooter generator ++ "&lt;/footer&gt;"
    setEOF = "&lt;/html&gt;"
  
    setHTML = [setDoc, setTitle, setHeader, setMeta, setBody, setFooter, setEOF]
  </code></pre>
  
  <p>main file:</p>
  
  <pre><code>import HHtml
  import System.IO
  
  main = do
    let content = mapM_ putStrLn setHTML
    writeFile "index.html" content
  </code></pre>
  
  <p>Now however I look at it I keep getting the <code>Couldn't match type IO() with [Char]</code> or any variant for that matter. I understand the error message, but I am getting so confused about fixing it. Thanks for the pointers!</p>