From 2e742262aa4f7ebc6ea4ea9e2ea526bae62baa97 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 24 Feb 2005 08:59:36 +0000 Subject: [PATCH] [project @ 2005-02-24 08:59:36 by simonpj] Add a clarifying para about Win32 GUI-only programs --- ghc/docs/users_guide/win32-dlls.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ghc/docs/users_guide/win32-dlls.xml b/ghc/docs/users_guide/win32-dlls.xml index 0b8d159..45d75d1 100644 --- a/ghc/docs/users_guide/win32-dlls.xml +++ b/ghc/docs/users_guide/win32-dlls.xml @@ -45,6 +45,16 @@ If you want to build a GUI-only application, with no console window, use the fla -optl-mwindows in the link step. + Warning: Windows GUI-only programs have no + stdin, stdout or stderr so using the ordinary Haskell + input/output functions will cause your program to fail with an + IO exception, such as: + + Fail: <stdout>: hPutChar: failed (Bad file descriptor) + + However using Debug.Trace.trace is alright because it uses + Windows debugging output support rather than stderr. + For some reason, Mingw ships with the readline library, but not with the readline headers. As a result, GHC (like Hugs) does not use readline for interactive input on Windows. -- 1.7.10.4