Xo is experimental. The source code is not public yet; it will be soon. Read the release notes
Menu · XO0173

Docs

XO0173: `use` after the first declaration

error · reported by the parser

All use declarations of a file come first, before any fn, struct, or other declaration, so a file’s imports are visible at the top. Move the use up. See core 4.1 and 15 (File).

Example

fn f() -> Int { 1 }
use std/http

fn ok() -> http.Response { http.text(200, "ok") }

Fix

use std/http

fn f() -> Int { 1 }

fn ok() -> http.Response { http.text(200, "ok") }

Run xo explain XO0173 for this text in a terminal, or see section 10.6 of the specification.