title: Haskell Formatting I/O Error
body: <p>I'm having a problem figuring out why I am getting a parse error when compiling code. I've tried indenting using tabs and spaces yet no success. Maybe I just need another set of eyes on the code, any help would be greatly appreciated!</p>
  
  <p>The error seems to be coming from this line:</p>
  
  <blockquote>
    <p>putStrLn "\nSelected option: "</p>
  </blockquote>
  
  <pre><code>main :: IO()
  main = do contents &lt;- readFile "films.txt";
            let database = (read contents :: [Film])
            putStrLn "Please enter your name:";
            name &lt;- getLine;
            putStrLn ("Hello " ++ name ++ "!");
            menu database
            where menu newDb = do putStrLn "\nWhat would you like to do?";
                                  putStrLn "1 -&gt; Add a film";
                                  putStrLn "2 -&gt; Display all films";
                                  putStrLn "3 -&gt; Display all films by director's name";
                                  putStrLn "4 -&gt; Display the films of an average website rating";
                                  putStrLn "5 -&gt; Display the average rating of the films of a particular actor";
                                  putStrLn "6 -&gt; Show the films you have rated, with the rating";
                                  putStrLn "7 -&gt; Rate or ReRate a film";
                                  putStrLn "8 -&gt; Display films released during or after a year, sorted in descending order of rating";
                                  putStrLn "9 -&gt; Exit &amp; Save";
                                  putStrLn "\nSelected option: "
                                  option &lt;- getLine
                                  case option of 
                                       "1" -&gt; do putStr "Name of Film: "
                                               title &lt;- getLine
                                               putStr "Name of the Director: "
                                               director &lt;- getLine
                                               putStr "Year the film was released: "
                                               year &lt;- getLine
                                               putStrLn (map formatFilmOutput $ addFilm title director (read year) [] newDb)
                                       "2" -&gt; do putStrLn (displayAllFilm newDb) &gt;&gt; menu newDb
  </code></pre>