compile-fix

Diagnoses Flix compiler errors and matches them against known pitfalls to propose fixes.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/ababup1192/flix_ge_studio --skill compile-fix-ababup1192
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compile-fix
Source: https://github.com/ababup1192/flix_ge_studio/tree/main/.agents/skills/compile-fix
Command: npx skills add https://github.com/ababup1192/flix_ge_studio --skill compile-fix-ababup1192

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Flix compiler errors like parse failures, type unification errors, and non-exhaustive matches can be cryptic, especially when caused by language-specific pitfalls such as reserved words, misplaced Java imports, or missing Float32 suffixes. This Skill maps error output to a curated list of known pitfalls and produces concrete fixes. ## Core Features & Use Cases - Error-to-pitfall matching: Compares messages from flix check, flix test, or make against nine documented pitfalls (reserved words, import placement, Channel API, Java exception types, record update syntax, effect propagation, pattern exhaustiveness, literal type inference, Float32 suffixes). - API signature verification: Consults the engine's docs/api-digest.md (via make api Q=<name>) to confirm correct signatures before grepping source. - General diagnostic fallback: When no known pitfall matches, reads the error location, greps for type definitions and unresolved symbols, and proposes a fix verified with /verify. - Use Case: A build fails with Expected ',' before '=' on a record field named spawn; the Skill identifies the reserved-word pitfall and suggests renaming to start. ## Quick Start Run the compile-fix skill on this Flix compiler error output and tell me the cause and the fix.

Frequently Asked Questions about compile-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Flix compiler errors like Unable to unify or Unexpected token?

Match the error message against the known pitfalls list: parse errors often come from reserved words used as identifiers, while unification failures often come from missing type annotations on empty literals or missing f32 suffixes. The Skill walks through each cause and proposes a concrete edit.

Why does Flix give a parse error on my variable or record field name?

Flix reserves words like handler, do, resume, run, spawn, region, inject, project, and solve, and using them as identifiers or record field names causes Unexpected token errors. Rename the identifier to a non-reserved word, such as start instead of spawn.

How do I check the correct signature of a Flix function before fixing a type error?

Consult the engine's docs/api-digest.md, which lists all public declarations, or run make api Q=<name> to pull a single signature line. This is faster and more reliable than grepping source or unzipping dependencies.

Why does Flix report Expected Float32 but got Float64?

In Flix, a literal like 1.0 is Float64 by default, so APIs expecting Float32 reject it. Add the f32 suffix to every floating-point literal, writing 1.0f32, to satisfy the type checker.

What should I do when a Flix error does not match any known pitfall?

Fall back to the general diagnostic flow: read the file at the reported line, grep for related type definitions or unresolved symbols, propose a fix, and verify it with the /verify command. New pitfalls discovered this way should be added to both the list and bin/explain-error.