revert #903 'feat: Emit keyword'
While we agree on the idea of having some ways of emitting events, the design hasn't been completely fleshed out and it is unclear whether events should have a well-defined format independent of the framework / compiler and what this format should be. So we need more time discussing and agreeing about what use case we are actually trying to solve with that. Irrespective of that, some cleanup was also needed on the UPLC side anyway since the PR introduced a lot of needless duplications.
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
use indexmap::IndexSet;
|
||||
use std::rc::Rc;
|
||||
use uplc::builtins::DefaultFunction;
|
||||
|
||||
use crate::{
|
||||
ast::{BinOp, Curve, UnOp},
|
||||
tipo::{Type, ValueConstructor},
|
||||
};
|
||||
use indexmap::IndexSet;
|
||||
use std::rc::Rc;
|
||||
use uplc::builtins::DefaultFunction;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Copy)]
|
||||
pub enum ExpectLevel {
|
||||
@@ -221,9 +220,6 @@ pub enum Air {
|
||||
Trace {
|
||||
tipo: Rc<Type>,
|
||||
},
|
||||
Emit {
|
||||
tipo: Rc<Type>,
|
||||
},
|
||||
NoOp,
|
||||
FieldsEmpty,
|
||||
ListEmpty,
|
||||
|
||||
@@ -964,13 +964,6 @@ impl AirTree {
|
||||
then: then.into(),
|
||||
}
|
||||
}
|
||||
pub fn emit(msg: AirTree, tipo: Rc<Type>, then: AirTree) -> AirTree {
|
||||
AirTree::Trace {
|
||||
tipo,
|
||||
msg: msg.into(),
|
||||
then: then.into(),
|
||||
}
|
||||
}
|
||||
pub fn no_op(then: AirTree) -> AirTree {
|
||||
AirTree::NoOp { then: then.into() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user