Rellum Rellum

S0014: unknown pure function

Generated from rellum-diagnostics/src/db.rs.

Explanation

A pure call can only target a function that is visible in the current module: a local function, an imported public function, a generic function template, or a built-in prelude function. The compiler resolves pure calls before lowering so it can type-check arguments, instantiate generics, and keep effectful work out of pure space.

Common causes

Canonical fixes

Before:

answer = double(21)

After:

double(x: Int) : Int = x * 2
answer = double(21)

Before:

answer = distance(origin, point)

After:

import geometry { distance }
answer = distance(origin, point)

Before:

value = print!(message)

After:

main! = print!(message)

Code example

answer = double(21)