CHECKPOINT: Everything builds again.

This commit is contained in:
2024-06-03 20:36:31 -07:00
parent afff04259c
commit 88d128df9f
39 changed files with 1514 additions and 1129 deletions

View File

@@ -38,8 +38,8 @@ mod primop;
mod primtype;
mod value;
use crate::syntax::Name;
use cranelift_module::ModuleError;
use internment::ArcIntern;
pub use primop::PrimOpError;
pub use primtype::PrimitiveType;
pub use value::Value;
@@ -80,20 +80,11 @@ pub enum EvalError<IR> {
#[error("Attempted to call something that wasn't a function at {0:?} (it was a {1})")]
NotAFunction(crate::syntax::Location, Value<IR>),
#[error("Wrong argument call for function ({1:?}) at {0:?}; expected {2}, saw {3}")]
WrongArgCount(
crate::syntax::Location,
Option<ArcIntern<String>>,
usize,
usize,
),
WrongArgCount(crate::syntax::Location, Option<Name>, usize, usize),
#[error("Value has no fields {1} (attempt to get field {2} at {0:?})")]
NoFieldForValue(crate::syntax::Location, Value<IR>, ArcIntern<String>),
NoFieldForValue(crate::syntax::Location, Value<IR>, Name),
#[error("Bad field {2} for structure {1:?} at {0:?}")]
BadFieldForStructure(
crate::syntax::Location,
Option<ArcIntern<String>>,
ArcIntern<String>,
),
BadFieldForStructure(crate::syntax::Location, Option<Name>, Name),
}
impl<IR1: Clone, IR2: Clone> PartialEq<EvalError<IR1>> for EvalError<IR2> {