-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd8a92d
commit 67ca056
Showing
1 changed file
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} | ||
}; | ||
} |