From 6108d66b0a9522b10e9dbd064cc5e353ffd23763 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 5 May 2025 04:55:17 -0400 Subject: [PATCH] stdlib: Add Option and Result types --- stdlib/std.cl | 2 ++ stdlib/std/option.cl | 1 + stdlib/std/result.cl | 1 + 3 files changed, 4 insertions(+) diff --git a/stdlib/std.cl b/stdlib/std.cl index 45eba40..4596234 100644 --- a/stdlib/std.cl +++ b/stdlib/std.cl @@ -3,7 +3,9 @@ pub mod preamble { pub use super::{ num::*, + option::Option, range::{RangeExc, RangeInc}, + result::Result, str::str, }; } diff --git a/stdlib/std/option.cl b/stdlib/std/option.cl index 5222b3a..902123a 100644 --- a/stdlib/std/option.cl +++ b/stdlib/std/option.cl @@ -1,4 +1,5 @@ //! The optional type, representing the presence or absence of a thing. +use super::preamble::*; pub enum Option { Some(T), diff --git a/stdlib/std/result.cl b/stdlib/std/result.cl index e8d7fbd..4b9b12b 100644 --- a/stdlib/std/result.cl +++ b/stdlib/std/result.cl @@ -1,4 +1,5 @@ //! The Result type, indicating a fallible operation. +use super::preamble::*; pub enum Result { Ok(T),