title: print string buffer from file contents
body: <p>I want to print the contents of a file. I tried to use a string buffer:</p>
  
  <pre><code>let ch = open_in "myfile.txt" in
  let buf = Buffer.create 1024 in
  (try Buffer.add_channel buf ch max_int with _ -&gt; ());
  close_in ch;
  
  let string = Buffer.contents buf
  print_endline string
  </code></pre>
  
  <p>this just gives me a syntax error.</p>
  
  <p>How can I do this?</p>