Extend the GHCi FAQ slightly
authorsimonpj@microsoft.com <unknown>
Tue, 17 Nov 2009 13:23:08 +0000 (13:23 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 17 Nov 2009 13:23:08 +0000 (13:23 +0000)
docs/users_guide/ghci.xml

index d929548..64da676 100644 (file)
@@ -2908,6 +2908,13 @@ Prelude> :set -fno-glasgow-exts
             because this is normally what you want in an interpreter:
             output appears as it is generated.
           </para>
+          <para> 
+            If you want line-buffered behaviour, as in GHC, you can 
+            start your program thus:
+            <programlisting>
+               main = do { hSetBuffering stdout LineBuffering; ... }
+            </programlisting>
+          </para>
         </listitem>
       </varlistentry>
     </variablelist>