reefer 0.3.0

Optimizing proc-macro for geometric algebra
Documentation
# Troubleshooting

This chapter collects the failure modes run into most often while building or using Reefer. Start with the scenario that matches your compiler output, then follow the checklist to unblock yourself quickly.

## Build failures & prerequisites

- **`cc` / `link` errors mentioning GMP/MPFR or missing `m4`:** The default `backend_cas` feature pulls in the `rug` crate, which relies on the `m4` macro processor during its native build. Install it (`sudo apt install m4`, `brew install m4`, etc.), then retry `cargo build`.
- **Feature conflicts:** Only enable one blade-width flag (`bits_u8`, `bits_u16`, …) and one backend (`backend_cas` _or_ `backend_egg`). Cargo will emit duplicate type alias errors if multiple options are toggled simultaneously.
- **`no module items` after applying `#[reefer::algebra]`:** Ensure the annotated module isn’t empty. At minimum, include one `basis!` declaration; an empty module triggers a `syn::Error` with this wording.
- **Proc-macro panics:** These are considered bugs; macros should return structured diagnostics. If you hit one, re-run with `RUST_BACKTRACE=1` and capture the output when filing an issue (if this is a `todo!` panic, please check for existing issue first).

## Macro expansion & alias issues

- **Unknown identifier diagnostics:** The optimiser could not map a symbol to a declared basis alias. Confirm the alias is listed in your `basis!` blocks.
- **`expr!` rejects pattern bindings or method chains:** The current parser accepts simple `let` bindings and the supported method list (`reverse`, `dual`, `sandwich`, contractions, etc.). Remove unsupported syntax or break expressions into smaller helpers.

## Debugging techniques

- **Inspect emitted code:** Use `cargo expand -p your_crate --test smoke` (or whichever target invokes Reefer) to dump the generated tokens. For quick peeks inside this repository, run the relevant tests with `-- --nocapture` to print the emitted closure bodies.

Keep this page handy while iterating on new algebra specs or optimiser passes. When you discover a new failure pattern, add it here so the next contributor benefits from the breadcrumb trail.