Skip to content

Commit

Permalink
working on effect core
Browse files Browse the repository at this point in the history
  • Loading branch information
slightknack committed Apr 20, 2022
1 parent dd8a92d commit 67ca056
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions src/core/effect_core.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
pub enum EffectCore {
pub enum Core {
Fatal,
WriteStdOut(String),
WriteStdErr(String),
ReadStdIn(String),
WriteOut(String),
WriteErr(String),
ReadIn(String),
ToString(Data),
}

pub trait Effect {
fn from_data(data: Data) -> Result<Self, String>;
}

pub struct EffectSet<T> {
effects: HashMap,
}

pub fn main() {
effect_set! {
enum E {
"std.Core" => Core,
"std.http.IO" => Http,
}
};
}

0 comments on commit 67ca056

Please sign in to comment.