mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Rename Located -> Loc
This commit is contained in:
parent
c66c845cd2
commit
f19220473a
55 changed files with 680 additions and 683 deletions
|
@ -4,7 +4,7 @@ use crate::types::RecordField;
|
|||
use roc_collections::all::{default_hasher, MutMap};
|
||||
use roc_module::ident::TagName;
|
||||
use roc_module::symbol::Symbol;
|
||||
use roc_region::all::{Located, Region};
|
||||
use roc_region::all::{Loc, Region};
|
||||
use std::collections::HashMap;
|
||||
|
||||
const NUM_BUILTIN_IMPORTS: usize = 8;
|
||||
|
@ -34,7 +34,7 @@ pub fn aliases() -> MutMap<Symbol, BuiltinAlias> {
|
|||
Symbol::NUM_INT,
|
||||
BuiltinAlias {
|
||||
region: Region::zero(),
|
||||
vars: vec![Located::at(Region::zero(), "range".into())],
|
||||
vars: vec![Loc::at(Region::zero(), "range".into())],
|
||||
typ: int_alias_content(flex(TVAR1)),
|
||||
},
|
||||
);
|
||||
|
@ -44,7 +44,7 @@ pub fn aliases() -> MutMap<Symbol, BuiltinAlias> {
|
|||
Symbol::NUM_FLOAT,
|
||||
BuiltinAlias {
|
||||
region: Region::zero(),
|
||||
vars: vec![Located::at(Region::zero(), "range".into())],
|
||||
vars: vec![Loc::at(Region::zero(), "range".into())],
|
||||
typ: float_alias_content(flex(TVAR1)),
|
||||
},
|
||||
);
|
||||
|
@ -54,7 +54,7 @@ pub fn aliases() -> MutMap<Symbol, BuiltinAlias> {
|
|||
Symbol::NUM_NUM,
|
||||
BuiltinAlias {
|
||||
region: Region::zero(),
|
||||
vars: vec![Located::at(Region::zero(), "range".into())],
|
||||
vars: vec![Loc::at(Region::zero(), "range".into())],
|
||||
typ: num_alias_content(flex(TVAR1)),
|
||||
},
|
||||
);
|
||||
|
@ -64,7 +64,7 @@ pub fn aliases() -> MutMap<Symbol, BuiltinAlias> {
|
|||
Symbol::NUM_INTEGER,
|
||||
BuiltinAlias {
|
||||
region: Region::zero(),
|
||||
vars: vec![Located::at(Region::zero(), "range".into())],
|
||||
vars: vec![Loc::at(Region::zero(), "range".into())],
|
||||
typ: integer_alias_content(flex(TVAR1)),
|
||||
},
|
||||
);
|
||||
|
@ -274,7 +274,7 @@ pub fn aliases() -> MutMap<Symbol, BuiltinAlias> {
|
|||
Symbol::NUM_FLOATINGPOINT,
|
||||
BuiltinAlias {
|
||||
region: Region::zero(),
|
||||
vars: vec![Located::at(Region::zero(), "range".into())],
|
||||
vars: vec![Loc::at(Region::zero(), "range".into())],
|
||||
typ: floatingpoint_alias_content(flex(TVAR1)),
|
||||
},
|
||||
);
|
||||
|
@ -325,8 +325,8 @@ pub fn aliases() -> MutMap<Symbol, BuiltinAlias> {
|
|||
BuiltinAlias {
|
||||
region: Region::zero(),
|
||||
vars: vec![
|
||||
Located::at(Region::zero(), "ok".into()),
|
||||
Located::at(Region::zero(), "err".into()),
|
||||
Loc::at(Region::zero(), "ok".into()),
|
||||
Loc::at(Region::zero(), "err".into()),
|
||||
],
|
||||
typ: result_alias_content(flex(TVAR1), flex(TVAR2)),
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@ use crate::types::{Problem, RecordField, Type};
|
|||
use roc_collections::all::{ImMap, MutSet, SendMap};
|
||||
use roc_module::ident::{Lowercase, TagName};
|
||||
use roc_module::symbol::Symbol;
|
||||
use roc_region::all::{Located, Region};
|
||||
use roc_region::all::{Loc, Region};
|
||||
|
||||
/// A marker that a given Subs has been solved.
|
||||
/// The only way to obtain a Solved<Subs> is by running the solver on it.
|
||||
|
@ -399,7 +399,7 @@ impl SolvedType {
|
|||
#[derive(Clone, Debug)]
|
||||
pub struct BuiltinAlias {
|
||||
pub region: Region,
|
||||
pub vars: Vec<Located<Lowercase>>,
|
||||
pub vars: Vec<Loc<Lowercase>>,
|
||||
pub typ: SolvedType,
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ use roc_module::called_via::CalledVia;
|
|||
use roc_module::ident::{ForeignSymbol, Ident, Lowercase, TagName};
|
||||
use roc_module::low_level::LowLevel;
|
||||
use roc_module::symbol::{Interns, ModuleId, Symbol};
|
||||
use roc_region::all::{Located, Region};
|
||||
use roc_region::all::{Loc, Region};
|
||||
use std::fmt;
|
||||
|
||||
pub const TYPE_NUM: &str = "Num";
|
||||
|
@ -772,7 +772,7 @@ impl Type {
|
|||
|
||||
// TODO substitute further in args
|
||||
for (
|
||||
Located {
|
||||
Loc {
|
||||
value: (lowercase, placeholder),
|
||||
..
|
||||
},
|
||||
|
@ -1227,7 +1227,7 @@ pub enum PatternCategory {
|
|||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct Alias {
|
||||
pub region: Region,
|
||||
pub type_variables: Vec<Located<(Lowercase, Variable)>>,
|
||||
pub type_variables: Vec<Loc<(Lowercase, Variable)>>,
|
||||
|
||||
/// lambda set variables, e.g. the one annotating the arrow in
|
||||
/// a |c|-> b
|
||||
|
@ -1244,7 +1244,7 @@ pub enum Problem {
|
|||
CircularType(Symbol, Box<ErrorType>, Region),
|
||||
CyclicAlias(Symbol, Region, Vec<Symbol>),
|
||||
UnrecognizedIdent(Ident),
|
||||
Shadowed(Region, Located<Ident>),
|
||||
Shadowed(Region, Loc<Ident>),
|
||||
BadTypeArguments {
|
||||
symbol: Symbol,
|
||||
region: Region,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue