mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 10:02:03 +03:00
13 lines
313 B
Idris
13 lines
313 B
Idris
import System.File
|
|
|
|
main : IO ()
|
|
main = do
|
|
Right process <- popen2 "cat"
|
|
| Left err => printLn err
|
|
printLn $ process.pid > 0
|
|
_ <- fPutStrLn process.input "Hello, Idris!\n"
|
|
closeFile process.input
|
|
Right result <- fRead process.output
|
|
| Left err => printLn err
|
|
putStr result
|