Error codes

E0102: unknown name

In a terminal: auk explain E0102 prints this page.

On this page

The name doesn't refer to any variable, function, constant, variant or module in scope. Auk resolves every name at compile time, and the message often suggests a similar name.

Wrong#

auk
fn main() {
  let count = 1
  print(cout)
}

Fixed#

auk
fn main() {
  let count = 1
  print(count)
}

Common causes#

  • A typo in a variable or function name.
  • A variable used outside the block that declares it.
  • A private function of another module, or a variant the enum doesn't have.
  • A function from another language's standard library (len(xs) works, strlen doesn't).
  • A closure calling itself (let fib = n => ... fib(n - 1)): the name isn't bound until the closure exists. Write a top-level fn fib(n: int): int instead.

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