@@ -89,6 +89,16 @@ putCharLn c = putStrLn (singleton c)
89getChar : IO Char
89getChar : IO Char
90getChar = map cast $ foreign FFI_C "getchar" (IO Int)
90getChar = map cast $ foreign FFI_C "getchar" (IO Int)
92+||| Disables buffering in both stdin and stdout:
93+||| so that output is written immediately (never stored in the buffer)
94+||| and the next input item is read and returned
96+||| this is useful to circumvent problems with IO on some Windows systems
97+||| where stdout output right before a prompt is only shown after
98+||| the input-line from stdin is produced
99+disableBuffering : IO ()
100+disableBuffering = foreign FFI_C "idris_disableBuffering" (IO ())
92||| Get the command-line arguments that the program was called with.
102||| Get the command-line arguments that the program was called with.
94getArgs : IO (List String)
104getArgs : IO (List String)