title: Read from file to type
body: <p>I am having problems reading from a file and loading it into a list of a type Film:</p>
  
  <pre><code>testDatabase :: [Film]
  testDatabase = [(Film "Ridely Scott" "Test" 2012 [("Zoe",2),("Test",1)]),(Film "Test1" "Test1" 2012 [("Test",4),("Test",5)])]
  
  loadFromFile :: IO ()
  loadFromFile = do
           putStrLn "Enter the input filename: "
           name &lt;- getLine
           contents &lt;- readFile name
           let testDatabase = length contents `seq` (read contents :: [Film])
           putStrLn formatDatabase
           putStrLn "Done"
  </code></pre>
  
  <p>The text file has been saved by Haskell with the following method:</p>
  
  <pre><code>saveToFile :: IO ()
  saveToFile = do
      putStrLn "Enter the output filename: "
      name &lt;- getLine
      writeFile name (show testDatabase)
      putStrLn "Done"
  </code></pre>
  
  <p>It is in the correct format and it shows around 30 entries, but when the load method is called I get the data that was in testDatabase at runtime.  </p>