mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11: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
|
@ -6,8 +6,8 @@ use crate::file::LoadedModule;
|
|||
use roc_can::scope::Scope;
|
||||
use roc_module::ident::ModuleName;
|
||||
use roc_module::symbol::IdentIds;
|
||||
use roc_parse::ast;
|
||||
use roc_parse::ast::CommentOrNewline;
|
||||
use roc_parse::ast::{self, AliasHeader};
|
||||
use roc_parse::ast::{AssignedField, Def};
|
||||
use roc_region::all::Loc;
|
||||
|
||||
|
@ -205,7 +205,10 @@ fn generate_entry_doc<'a>(
|
|||
_ => (acc, None),
|
||||
},
|
||||
|
||||
Def::Alias { name, vars, ann } => {
|
||||
Def::Alias {
|
||||
header: AliasHeader { name, vars },
|
||||
ann,
|
||||
} => {
|
||||
let mut type_vars = Vec::new();
|
||||
|
||||
for var in vars.iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue