Get a failing specialize_expr test

This commit is contained in:
Richard Feldman 2024-11-07 23:39:58 -05:00
parent 2af00caa9c
commit ed6ad1bc82
No known key found for this signature in database
GPG key ID: DAC334802F365236
31 changed files with 437 additions and 4949 deletions

View file

@ -19,7 +19,7 @@ use roc_types::types::{LambdaSet, OptAbleVar, PatternCategory, Type};
/// A pattern, including possible problems (e.g. shadowing) so that
/// codegen can generate a runtime error if this pattern is reached.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
pub enum Pattern {
Identifier(Symbol),
As(Box<Loc<Pattern>>, Symbol),
@ -198,7 +198,7 @@ impl Pattern {
}
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
pub struct ListPatterns {
pub patterns: Vec<Loc<Pattern>>,
/// Where a rest pattern splits patterns before and after it, if it does at all.
@ -229,7 +229,7 @@ impl ListPatterns {
}
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
pub struct RecordDestruct {
pub var: Variable,
pub label: Lowercase,
@ -237,14 +237,14 @@ pub struct RecordDestruct {
pub typ: DestructType,
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
pub struct TupleDestruct {
pub var: Variable,
pub destruct_index: usize,
pub typ: (Variable, Loc<Pattern>),
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
pub enum DestructType {
Required,
Optional(Variable, Loc<Expr>),