0

Is it possible to define a short alias of a type function in Idris?

While the following code type-checks, I'd like to have a shorter definition for 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

Some definition without unnessesory repetition like this one:

AugentRow = Row

1 Answers1

1

The shortest form I've found so far:

AugentRow : ColumnCount -> Cell -> Type
AugentRow = Row
  • 1
    this is the shortest I've come across, though I've generally found it difficult working in code bases where there are multiple names for the exact same type – joel Jul 01 '20 at 13:29