Error codes

E0109: parameter type can't be determined

In a terminal: auk explain E0109 prints this page.

On this page

Every parameter needs a type: annotate it in one clause (x: T) or in a header line. A literal pattern like 0 or "a" implies its type, but a bare name or _ alone doesn't. Auk doesn't infer parameter types from the body, so signatures stay readable on their own.

Wrong#

auk
fn double(x) = x * 2

Fixed#

auk
fn double(x: int): int = x * 2

Common causes#

  • A parameter written without : Type, as in Python or JavaScript.
  • All clauses use patterns that don't fix the type (_, [] for a list of what?).
  • A shape method parameter other than self with no type.

Stuck on a word? Try the glossary. Got a compiler error? Look up its code. Improve this page