feat: impl polymorphic type declaration

This commit is contained in:
Shunsuke Shibayama 2023-06-04 01:34:20 +09:00
parent ea132e2345
commit 5052ebb077
10 changed files with 289 additions and 85 deletions

View file

@ -1,6 +1,7 @@
# TODO: dependent (static shaped)
.NDArray = 'ndarray': ClassType
.NDArray <: Num
.NDArray = 'ndarray': (T: Type) -> ClassType
.NDArray(T) <: Output T
.NDArray(_) <: Num
.NDArray.
shape: [Nat; _]
ndim: Nat