mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Shove more into a common env
This commit is contained in:
parent
b5ea2c2c99
commit
ad20a2ee41
10 changed files with 565 additions and 623 deletions
|
@ -64,6 +64,26 @@ pub type PExpectedTypeIndex = Index<PExpected<TypeOrVar>>;
|
|||
pub type TypeOrVar = EitherIndex<TypeTag, Variable>;
|
||||
|
||||
impl Constraints {
|
||||
pub fn empty() -> Self {
|
||||
Self {
|
||||
constraints: Default::default(),
|
||||
type_slices: Default::default(),
|
||||
variables: Default::default(),
|
||||
loc_symbols: Default::default(),
|
||||
let_constraints: Default::default(),
|
||||
categories: Default::default(),
|
||||
pattern_categories: Default::default(),
|
||||
expectations: Default::default(),
|
||||
pattern_expectations: Default::default(),
|
||||
includes_tags: Default::default(),
|
||||
strings: Default::default(),
|
||||
sketched_rows: Default::default(),
|
||||
eq: Default::default(),
|
||||
pattern_eq: Default::default(),
|
||||
cycles: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new() -> Self {
|
||||
let constraints = Vec::new();
|
||||
let type_slices = Vec::with_capacity(16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue