mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
WIP
This commit is contained in:
parent
449ec19b0f
commit
e0f5dc40cb
3 changed files with 125 additions and 100 deletions
|
@ -33,6 +33,18 @@ pub enum LayoutProblem {
|
|||
Erroneous,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum RawFunctionLayout<'a> {
|
||||
Function(&'a [Layout<'a>], LambdaSet<'a>, &'a Layout<'a>),
|
||||
ZeroArgumentThunk(Layout<'a>),
|
||||
}
|
||||
|
||||
impl RawFunctionLayout<'_> {
|
||||
pub fn is_zero_argument_thunk(&self) -> bool {
|
||||
matches!(self, RawFunctionLayout::ZeroArgumentThunk(_))
|
||||
}
|
||||
}
|
||||
|
||||
/// Types for code gen must be monomorphic. No type variables allowed!
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum Layout<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue