An open API service indexing awesome lists of open source software.

https://github.com/bobbbay/dinwiddy

Dependently typed N-dimensional array type signatures for Idris (2).
https://github.com/bobbbay/dinwiddy

dependent-types ndarray

Last synced: 6 months ago
JSON representation

Dependently typed N-dimensional array type signatures for Idris (2).

Awesome Lists containing this project

README

          

#+TITLE: Dinwiddy

N-dimensional arrays in Idris 2, featuring:

* Nat-indexable n-dimensional array type synonyms
* Matrices and matrix algebra helper functions

** Usage

At a very basic level, the API for an N-dimensional array in Dinwiddy is the following:

#+begin_src idris
Array : (dimension : Nat) -> (sizes : Vect dimension Nat) -> (type : Type)
#+end_src

For example, the following type declaration =x=:

#+begin_src idris
x : Array 2 [2, 3] Bool
#+end_src

Will create an array that looks like this:

#+begin_src
###
###
#+end_src

Full of booleans. It's value could be, for example:

#+begin_src idris
x = [[ True, True, True ],
[ False, False, True ]]
#+end_src

Check out `examples` and `tests` for more information.