---
title: Std.IO
---

Standard I/O effect for printing and reading from the console.

## Effects

### Stdio

```saga
effect Stdio {
  fun print : String -> Unit
  fun eprint : String -> Unit
  fun read : String -> String
}
```

Effect for standard I/O: printing to stdout/stderr and reading from stdin.

## Handlers

### console

```saga
handler console for Stdio
```

Default handler that prints to the real console.

## Functions

### dbg

```saga
fun dbg : a -> Unit where {a: Debug}
```

prints debug representation to stderr and returns the value

### println

```saga
fun println : String -> Unit needs {Stdio}
```

Prints a string to stdout followed by a newline.

### eprintln

```saga
fun eprintln : String -> Unit needs {Stdio}
```

Prints a string to stderr followed by a newline.

