From 14c77e604dbf996524e73d7f8d3512aa7e470ffb Mon Sep 17 00:00:00 2001 From: Shunsuke Shibayama Date: Sat, 20 Aug 2022 09:47:15 +0900 Subject: [PATCH] Add type_sort() --- compiler/erg_compiler/context.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/compiler/erg_compiler/context.rs b/compiler/erg_compiler/context.rs index 3813f685..ca8753b4 100644 --- a/compiler/erg_compiler/context.rs +++ b/compiler/erg_compiler/context.rs @@ -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) -> Vec { + todo!() +} + /// ``` /// TyParamIdx::new(Add(R, O), O) => Nth(1) /// TyParamIdx::new(Add(R, F(O, I)), O) => Nested(Nth(1), 0)