mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
remove some dead code
This commit is contained in:
parent
ee42df0e7d
commit
3fdcdf0da9
@ -4,10 +4,6 @@ use roc_collections::all::{ImMap, ImSet};
|
||||
use roc_module::ident::Lowercase;
|
||||
use roc_module::symbol::Symbol;
|
||||
|
||||
// fake field names for container elements
|
||||
// e.g. for lists, internally it's a record with a `list_elem` field
|
||||
pub const LIST_ELEM: &str = "@list_elem";
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Mark {
|
||||
Seen,
|
||||
@ -748,37 +744,6 @@ impl FieldAccess {
|
||||
pub fn get(&self, key: &Lowercase) -> Option<&Usage> {
|
||||
self.fields.get(key)
|
||||
}
|
||||
|
||||
pub fn list_access() -> Self {
|
||||
use Mark::*;
|
||||
use Usage::*;
|
||||
|
||||
let mut result = Self::default();
|
||||
result.fields.insert(LIST_ELEM.into(), Simple(Unique));
|
||||
|
||||
result
|
||||
}
|
||||
|
||||
pub fn list_seen() -> Self {
|
||||
use Mark::*;
|
||||
use Usage::*;
|
||||
|
||||
let mut result = Self::default();
|
||||
result.fields.insert(LIST_ELEM.into(), Simple(Seen));
|
||||
|
||||
result
|
||||
}
|
||||
|
||||
pub fn list_update() -> Self {
|
||||
use Mark::*;
|
||||
use Usage::*;
|
||||
|
||||
// TODO maybe this should be a different key so accessed items are never in overwritten and kept unique
|
||||
let mut result = Self::default();
|
||||
result.fields.insert(LIST_ELEM.into(), Simple(Seen));
|
||||
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
fn annotate_usage_pattern(pattern: &Pattern, usage: &mut VarUsage) {
|
||||
|
Loading…
Reference in New Issue
Block a user