mattpolzin / idris-fvect

A Fin-based Vect (can be thought of as having both a current length and maximum capacity)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The starts of an Idris 2 FVect (Fin-based Vect) type and its utility functions.

The idea is to have a Vect type that knows not only how long it currently is but also the longest it ever could be. One reasonable interpretation of the latter is "capacity."

For example, it can be useful to create an FVect with a certain length and equal maximum capacity and know without additional work that filtering the values of the vector produces an equal-or-smaller number of values. FVect encodes the proof that the filtered FVect has size that is LTE the original size (i.e. capacity).

About

A Fin-based Vect (can be thought of as having both a current length and maximum capacity)

License:MIT License


Languages

Language:Idris 92.2%Language:Shell 5.3%Language:Makefile 2.5%