idris 2


Implicit arguments

From here:

names which begin with a lower case letter are automatically bound as implicit arguments in types

Dependent pairs

https://idris2.readthedocs.io/en/latest/tutorial/typesfuns.html#dependent-pairs

Two values. First value can show up in the second.

Eg: an implementation of Vector:

(n:Nat ** Vector n Int)

Multiplicty

Values:

Explicit multiplicity examples:

Default multiplicity values:

Fun fact: Following is a function that cannot be realized as it requires two instances of a but only 1 is allowed:

https://idris2.readthedocs.io/en/latest/tutorial/multiplicities.html

REPL

λΠ> :doc **
Used to build dependent pairs together with parentheses

vim plugin: idir

Reload buffer
Case split