Replace references to "global tag" with "tag"

This commit is contained in:
Richard Feldman 2022-04-25 15:46:32 -04:00
parent 470dddc17b
commit 85e7969c2d
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
61 changed files with 229 additions and 230 deletions

View file

@ -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(_))
}
}