Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

E014: Unknown Type

Severity: Configurable (default: hint)

type of `result` could not be inferred -- consider adding a type annotation or stub

A non-parameter binding has an unconstrained type variable (?), meaning tix couldn’t determine its type from usage. Parameter bindings are excluded – a bare type variable on a parameter is normal (it means the parameter is polymorphic).

Common causes

  • The binding’s value comes from an unresolved import or an angle-bracket import.
  • The binding is assigned from a function whose return type is unknown.
  • The binding is unused, so there are no constraints to infer from.

How to fix

  • Add a type annotation:
    /** type: result :: { name: string, ... } */
    result = someUnknownFunction arg;
    
  • Load stubs that define the types of external dependencies.
  • If the binding is unused, consider removing it.

Configuring severity

E014 severity is controlled by LSP settings. In VS Code:

{
  "tix.diagnostics.unknownType": "hint"   // "error", "warning", "hint", or "off"
}

Set to "off" to suppress these diagnostics entirely.