forked from ValeLang/Vale
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ValeLang#619 from Verdagon/regionsmerge14
Regions merge: tuples, function returns, incremental solves
- Loading branch information
Showing
38 changed files
with
422 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
struct Tup0 { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
// See TAVWG for what it would take to re-enable variadic tuples. | ||
// struct Tup<T RefList> { | ||
// _ ..T; | ||
// } | ||
|
||
#!DeriveStructDrop | ||
struct Tup1<T0> { 0 T0; } | ||
func drop<T0>(tup Tup1<T0>) | ||
where func drop(T0)void { [a] = tup; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
// See TAVWG for what it would take to re-enable variadic tuples. | ||
// struct Tup<T RefList> { | ||
// _ ..T; | ||
// } | ||
|
||
#!DeriveStructDrop | ||
struct Tup2<T0, T1> { 0 T0; 1 T1; } | ||
func drop<T0, T1>(tup Tup2<T0, T1>) | ||
where func drop(T0)void, | ||
func drop(T1)void | ||
{ [a, b] = tup; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
|
||
// See TAVWG for what it would take to re-enable variadic tuples. | ||
// struct Tup<T RefList> { | ||
// _ ..T; | ||
// } | ||
|
||
#!DeriveStructDrop | ||
struct Tup3<T0, T1, T2> { 0 T0; 1 T1; 2 T2; } | ||
func drop<T0, T1, T2>(tup Tup3<T0, T1, T2>) | ||
where func drop(T0)void, | ||
func drop(T1)void, | ||
func drop(T2)void | ||
{ [a, b, c] = tup; } | ||
|
||
// #!DeriveStructDrop | ||
// struct Tup4<T0, T1, T2, T3> { 0 T0; 1 T1; 2 T2; 3 T3; } | ||
// func drop<T0, T1, T2, T3>(tup Tup4<T0, T1, T2, T3>) | ||
// where func drop(T0)void, | ||
// func drop(T1)void, | ||
// func drop(T2)void, | ||
// func drop(T3)void | ||
// { [a, b, c, d] = tup; } | ||
// | ||
// #!DeriveStructDrop | ||
// struct Tup5<T0, T1, T2, T3, T4> { 0 T0; 1 T1; 2 T2; 3 T3; 4 T4; } | ||
// func drop<T0, T1, T2, T3, T4>(tup Tup5<T0, T1, T2, T3, T4>) | ||
// where func drop(T0)void, | ||
// func drop(T1)void, | ||
// func drop(T2)void, | ||
// func drop(T3)void, | ||
// func drop(T4)void | ||
// { [a, b, c, d, e] = tup; } | ||
// | ||
// #!DeriveStructDrop | ||
// struct Tup6<T0, T1, T2, T3, T4, T5> { 0 T0; 1 T1; 2 T2; 3 T3; 4 T4; 5 T5; } | ||
// func drop<T0, T1, T2, T3, T4, T5>(tup Tup6<T0, T1, T2, T3, T4, T5>) | ||
// where func drop(T0)void, | ||
// func drop(T1)void, | ||
// func drop(T2)void, | ||
// func drop(T3)void, | ||
// func drop(T4)void, | ||
// func drop(T5)void | ||
// { [a, b, c, d, e, f] = tup; } | ||
// | ||
// #!DeriveStructDrop | ||
// struct Tup7<T0, T1, T2, T3, T4, T5, T6> { 0 T0; 1 T1; 2 T2; 3 T3; 4 T4; 5 T5; 6 T6; } | ||
// func drop<T0, T1, T2, T3, T4, T5, T6>(tup Tup7<T0, T1, T2, T3, T4, T5, T6>) | ||
// where func drop(T0)void, | ||
// func drop(T1)void, | ||
// func drop(T2)void, | ||
// func drop(T3)void, | ||
// func drop(T4)void, | ||
// func drop(T5)void, | ||
// func drop(T6)void | ||
// { [a, b, c, d, e, f, g] = tup; } | ||
// | ||
// #!DeriveStructDrop | ||
// struct Tup8<T0, T1, T2, T3, T4, T5, T6, T7> { 0 T0; 1 T1; 2 T2; 3 T3; 4 T4; 5 T5; 6 T6; 7 T7; } | ||
// func drop<T0, T1, T2, T3, T4, T5, T6, T7>(tup Tup8<T0, T1, T2, T3, T4, T5, T6, T7>) | ||
// where func drop(T0)void, | ||
// func drop(T1)void, | ||
// func drop(T2)void, | ||
// func drop(T3)void, | ||
// func drop(T4)void, | ||
// func drop(T5)void, | ||
// func drop(T6)void, | ||
// func drop(T7)void | ||
// { [a, b, c, d, e, f, g, h] = tup; } | ||
// | ||
// #!DeriveStructDrop | ||
// struct Tup9<T0, T1, T2, T3, T4, T5, T6, T7, T8> { 0 T0; 1 T1; 2 T2; 3 T3; 4 T4; 5 T5; 6 T6; 7 T7; 8 T8; } | ||
// func drop<T0, T1, T2, T3, T4, T5, T6, T7, T8>(tup Tup9<T0, T1, T2, T3, T4, T5, T6, T7, T8>) | ||
// where func drop(T0)void, | ||
// func drop(T1)void, | ||
// func drop(T2)void, | ||
// func drop(T3)void, | ||
// func drop(T4)void, | ||
// func drop(T5)void, | ||
// func drop(T6)void, | ||
// func drop(T7)void, | ||
// func drop(T8)void | ||
// { [a, b, c, d, e, f, g, h, i] = tup; } | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.