dewi.main: add type annotation & last newline