mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Replace references to "global tag" with "tag"
This commit is contained in:
parent
470dddc17b
commit
85e7969c2d
61 changed files with 229 additions and 230 deletions
|
@ -188,7 +188,7 @@ pub enum Expr<'a> {
|
|||
Underscore(&'a str),
|
||||
|
||||
// Tags
|
||||
GlobalTag(&'a str),
|
||||
Tag(&'a str),
|
||||
|
||||
// Reference to an opaque type, e.g. @Opaq
|
||||
OpaqueRef(&'a str),
|
||||
|
@ -439,7 +439,7 @@ pub enum TypeAnnotation<'a> {
|
|||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum Tag<'a> {
|
||||
Global {
|
||||
Apply {
|
||||
name: Loc<&'a str>,
|
||||
args: &'a [Loc<TypeAnnotation<'a>>],
|
||||
},
|
||||
|
@ -515,7 +515,7 @@ pub enum Pattern<'a> {
|
|||
// Identifier
|
||||
Identifier(&'a str),
|
||||
|
||||
GlobalTag(&'a str),
|
||||
Tag(&'a str),
|
||||
|
||||
OpaqueRef(&'a str),
|
||||
|
||||
|
@ -570,7 +570,7 @@ pub enum Base {
|
|||
impl<'a> Pattern<'a> {
|
||||
pub fn from_ident(arena: &'a Bump, ident: Ident<'a>) -> Pattern<'a> {
|
||||
match ident {
|
||||
Ident::GlobalTag(string) => Pattern::GlobalTag(string),
|
||||
Ident::Tag(string) => Pattern::Tag(string),
|
||||
Ident::OpaqueRef(string) => Pattern::OpaqueRef(string),
|
||||
Ident::Access { module_name, parts } => {
|
||||
if parts.len() == 1 {
|
||||
|
@ -619,7 +619,7 @@ impl<'a> Pattern<'a> {
|
|||
|
||||
match (self, other) {
|
||||
(Identifier(x), Identifier(y)) => x == y,
|
||||
(GlobalTag(x), GlobalTag(y)) => x == y,
|
||||
(Tag(x), Tag(y)) => x == y,
|
||||
(Apply(constructor_x, args_x), Apply(constructor_y, args_y)) => {
|
||||
let equivalent_args = args_x
|
||||
.iter()
|
||||
|
@ -917,7 +917,7 @@ impl<'a> Expr<'a> {
|
|||
}
|
||||
|
||||
pub fn is_tag(&self) -> bool {
|
||||
matches!(self, Expr::GlobalTag(_))
|
||||
matches!(self, Expr::Tag(_))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue