mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Revert "Use immutable Vector in Expr"
This reverts commit 89eb88deace1eac2bebdf640ef00bdabf17fef6a.
This commit is contained in:
parent
69f5046568
commit
b034e8a486
4 changed files with 83 additions and 64 deletions
13
src/expr.rs
13
src/expr.rs
|
@ -1,6 +1,5 @@
|
|||
use std::fmt;
|
||||
use self::Expr::*;
|
||||
use im_rc::vector::Vector;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum Expr {
|
||||
|
@ -15,17 +14,17 @@ pub enum Expr {
|
|||
Let(Pattern, Box<Expr>, Box<Expr>),
|
||||
|
||||
// Functions
|
||||
Func(String, Vector<Expr>),
|
||||
Apply(Box<Expr>, Vector<Expr>),
|
||||
Func(String, Vec<Expr>),
|
||||
Apply(Box<Expr>, Vec<Expr>),
|
||||
Operator(Box<Expr>, Operator, Box<Expr>),
|
||||
Closure(Vector<Pattern>, Box<Expr>),
|
||||
Closure(Vec<Pattern>, Box<Expr>),
|
||||
|
||||
// Sum Types
|
||||
ApplyVariant(String, Option<Vector<Expr>>),
|
||||
ApplyVariant(String, Option<Vec<Expr>>),
|
||||
|
||||
// Conditionals
|
||||
If(Box<Expr>, Box<Expr>, Box<Expr>),
|
||||
Match(Box<Expr>, Vector<(Pattern, Box<Expr>)>),
|
||||
Match(Box<Expr>, Vec<(Pattern, Box<Expr>)>),
|
||||
|
||||
// Error
|
||||
Error(Problem),
|
||||
|
@ -89,7 +88,7 @@ pub enum Problem {
|
|||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum Pattern {
|
||||
Identifier(String),
|
||||
Variant(String, Option<Vector<Pattern>>),
|
||||
Variant(String, Option<Vec<Pattern>>),
|
||||
Underscore
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue