mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Coalesce inline and normal alias headers
Unifies `As` annotations and `Alias` defs to use a common struct for defining alias header information, i.e. the name and type variables of the alias.
This commit is contained in:
parent
597a1cef3b
commit
966198a6e7
11 changed files with 61 additions and 27 deletions
|
@ -14,6 +14,7 @@ use roc_collections::all::{default_hasher, ImMap, ImSet, MutMap, MutSet, SendMap
|
|||
use roc_module::ident::Lowercase;
|
||||
use roc_module::symbol::Symbol;
|
||||
use roc_parse::ast;
|
||||
use roc_parse::ast::AliasHeader;
|
||||
use roc_parse::pattern::PatternType;
|
||||
use roc_problem::can::{CycleEntry, Problem, RuntimeError};
|
||||
use roc_region::all::{Loc, Region};
|
||||
|
@ -1505,7 +1506,9 @@ fn to_pending_def<'a>(
|
|||
}
|
||||
|
||||
Alias {
|
||||
name, vars, ann, ..
|
||||
header: AliasHeader { name, vars },
|
||||
ann,
|
||||
..
|
||||
} => {
|
||||
let region = Region::span_across(&name.region, &ann.region);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue