mirror of
https://github.com/polarity-lang/polarity.git
synced 2025-12-23 09:19:50 +00:00
7 lines
276 B
Text
7 lines
276 B
Text
/// The type for handling and propagating errors which contains the variants `Ok` and `Err`.
|
|
data Result(a b: Type) {
|
|
/// A successful result.
|
|
Ok(a b: Type, res: a): Result(a, b),
|
|
/// An error containing an error value.
|
|
Err(a b: Type, err: b): Result(a, b),
|
|
}
|