warble/error.rs
1//! Compile-time error type for the Warble front-end.
2
3use thiserror::Error;
4
5/// A compile failure with a human-facing message. Every compile-time check is
6/// loud-fail: on the first violation `compile` returns one of these rather than
7/// emitting a silently-wrong IR (see [`ir-schema.md`][spec-ir] §checks).
8///
9/// [spec-ir]: https://github.com/Canner/Warble/blob/main/docs/spec/ir-schema.md
10#[derive(Debug, Clone, PartialEq, Eq, Error)]
11#[error("{0}")]
12pub struct CompileError(pub String);