@@ -89,6 +89,16 @@ putCharLn c = putStrLn (singleton c)
8989getChar : IO Char
9090getChar = map cast $ foreign FFI_C "getchar" (IO Int)
9191
92+||| Disables buffering in both stdin and stdout
93+||| so that output is written immediately, and never stored in the buffer
94+||| and the next input item is read and returned
95+|||
96+||| this is useful to circumvent problem with IO on some windows system
97+||| where stdout output sometimes is only shown after prompted input from
98+||| stdin
99+disableBuffering : IO ()
100+disableBuffering = foreign FFI_C "idris_disableBuffering" (IO ())
101+
92102||| Get the command-line arguments that the program was called with.
93103partial
94104getArgs : IO (List String)