- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我们看到依赖类型的好处 in a paper written by Ana Bove and Peter Dybjer :
Dependent types are types that depend on elements of other types. An example is the type An of vectors of length n with components of type A. Another example is the type Amn of m n-matrices. We say that the type An depends on the number n, or that An is a family of types indexed by the number n.
我们还在 Cedric's blog 上看到了好处:
Having a list with one element would be a type error, so the second line in the snippet above should not compile.
Shen language有一个先进的类型系统。
此处评论员将沉描述为having a Turing-Complete type system .
You can however use dependent types in a way in Shen that does not create problems.
我的问题是:是否可以在 Shen 中进行依赖类型?
最佳答案
Here is an example Shen OS 内核手册中 Shen 中的依赖类型
(datatype my-prover-types
P : Type;
_______________________
(myprog Type X) : Type;)
type#my-prover-types
(define myprog
Type P -> P)
(myprover symbol p)
p : symbol
(myprog number p)
type error
关于types - 是否可以在 Shen 中做依赖类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28275392/
我们看到依赖类型的好处 in a paper written by Ana Bove and Peter Dybjer : Dependent types are types that depend
我是一名优秀的程序员,十分优秀!