【发布时间】:2020-07-01 08:41:22
【问题描述】:
是否可以在 Idris 中定义类型函数的短别名?
在进行以下代码类型检查时,我希望对 AugentRow 有一个更短的定义。
import Data.Vect
ColumnCount : Type
ColumnCount = Nat
Cell : Type
Cell = Type
Row : ColumnCount -> Cell -> Type
Row columnCount cell = Vect columnCount cell
AugentRow : ColumnCount -> Cell -> Type
AugentRow columnCount cell = Row columnCount cell
一些没有像这样不必要重复的定义:
AugentRow = Row
【问题讨论】:
标签: idris