remove some dead code

This commit is contained in:
Folkert 2020-07-20 14:02:36 +02:00 committed by Richard Feldman
parent ee42df0e7d
commit 3fdcdf0da9

View File

@ -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) {