0 | ||| Magic/Virtual files
 1 | module System.File.Virtual
 2 |
 3 | import System.File.Support
 4 | import public System.File.Types
 5 |
 6 | %default total
 7 |
 8 | %foreign supportC "idris2_stdin"
 9 |          "node:lambda:x=>({fd:0, buffer: Buffer.alloc(0), name:'<stdin>', eof: false})"
10 | prim__stdin : FilePtr
11 |
12 | %foreign supportC "idris2_stdout"
13 |          "node:lambda:x=>({fd:1, buffer: Buffer.alloc(0), name:'<stdout>', eof: false})"
14 | prim__stdout : FilePtr
15 |
16 | %foreign supportC "idris2_stderr"
17 |          "node:lambda:x=>({fd:2, buffer: Buffer.alloc(0), name:'<stderr>', eof: false})"
18 | prim__stderr : FilePtr
19 |
20 | ||| The standard input.
21 | export
22 | stdin : File
23 | stdin = FHandle prim__stdin
24 |
25 | ||| The standard output.
26 | export
27 | stdout : File
28 | stdout = FHandle prim__stdout
29 |
30 | ||| The standard error.
31 | export
32 | stderr : File
33 | stderr = FHandle prim__stderr
34 |