start on registering redeemer wrapper type in definitions

This commit is contained in:
Kasey White
2023-03-17 11:11:37 -04:00
committed by rvcas
parent 7e1403a3b2
commit bb6fc76971
2 changed files with 21 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ pub const RESULT: &str = "Result";
pub const STRING: &str = "String";
pub const OPTION: &str = "Option";
pub const ORDERING: &str = "Ordering";
pub const REDEEMER_WRAPPER: &str = "RedeemerWrapper";
/// Build a prelude that can be injected
/// into a compiler pipeline
@@ -1057,3 +1058,12 @@ pub fn unbound_var(id: u64) -> Arc<Type> {
Arc::new(Type::Var { tipo })
}
pub fn wrapped_redeemer(redeemer: Arc<Type>) -> Arc<Type> {
Arc::new(Type::App {
public: true,
module: "".to_string(),
name: REDEEMER_WRAPPER.to_string(),
args: vec![redeemer],
})
}