mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
Add type_sort()
This commit is contained in:
parent
d7be8128ad
commit
14c77e604d
1 changed files with 15 additions and 0 deletions
|
@ -42,6 +42,21 @@ use Visibility::*;
|
|||
|
||||
type Trait = Type;
|
||||
|
||||
/// ```
|
||||
/// [Int, Str, Nat, Never, Obj, Str!, Module]
|
||||
/// => [], [Int, Str, Nat, Never, Obj, Str!, Module]
|
||||
/// => [[Int]], [Str, Nat, Never, Obj, Str!, Module]
|
||||
/// => [[Int], [Str]], [Nat, Never, Obj, Str!, Module]
|
||||
/// => ...
|
||||
/// => [[Int, Nat, Never, Obj]], [Str, Obj, Str!], [Module]]
|
||||
/// => [[Never, Nat, Int, Obj], [Str!, Str, Obj], [Module, Obj]]
|
||||
/// => [Never, Nat, Int, Obj, Str, Obj, Module, Obj]
|
||||
/// => [Never, Nat, Int, Str, Module, Obj]
|
||||
/// ```
|
||||
pub fn type_sort(_types: Vec<Type>) -> Vec<Type> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// ```
|
||||
/// TyParamIdx::new(Add(R, O), O) => Nth(1)
|
||||
/// TyParamIdx::new(Add(R, F(O, I)), O) => Nested(Nth(1), 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue