use crate::{
context::{Context, Ptr},
result::Result,
r#type::{Type, TypeObj},
utils::apfloat::Semantics,
};
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<Ptr<TypeObj>>;
fn res_types(&self) -> Vec<Ptr<TypeObj>>;
fn verify(_ty: &dyn Type, _ctx: &Context) -> Result<()>
where
Self: Sized,
{
Ok(())
}
}