use crate::{
context::Context,
result::Result,
r#type::{Type, TypeHandle},
utils::apfloat::Semantics,
};
use alloc::vec::Vec;
use pliron_derive::type_interface;
#[type_interface]
pub trait FloatTypeInterface {
fn get_semantics(&self) -> Semantics;
fn verify(_attr: &dyn Type, _ctx: &Context) -> Result<()>
where
Self: Sized,
{
Ok(())
}
}
#[type_interface]
pub trait FunctionTypeInterface {
fn arg_types(&self) -> Vec<TypeHandle>;
fn res_types(&self) -> Vec<TypeHandle>;
fn verify(_ty: &dyn Type, _ctx: &Context) -> Result<()>
where
Self: Sized,
{
Ok(())
}
}