mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
in theory allow non-function effects values
this does not work due to limitations with functions in tag unions
This commit is contained in:
parent
9ad960cdb1
commit
3d092cb9b7
5 changed files with 126 additions and 74 deletions
|
@ -20,6 +20,10 @@ pub enum LayoutProblem {
|
|||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum Layout<'a> {
|
||||
Builtin(Builtin<'a>),
|
||||
/// A layout that is empty (turns into the empty struct in LLVM IR
|
||||
/// but for our purposes, not zero-sized, so it does not get dropped from data structures
|
||||
/// this is important for closures that capture zero-sized values
|
||||
// PhantomEmptyStruct,
|
||||
Struct(&'a [Layout<'a>]),
|
||||
Union(&'a [&'a [Layout<'a>]]),
|
||||
RecursiveUnion(&'a [&'a [Layout<'a>]]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue