Performance benchmarking, notes and examples for numhask

## motivation

`numhask`

is an experimental library, involving representation of a numeric heirarchy of haskell classes. The closest library to this (apart from the prelude) is kmett's algebra. Three years ago, when reddit was fun and kind, Kmett had this comment about deep class heirarchies:

"In a language that didn't penalize deep accurate class hierarchies, I would agree. Haskell is not that language. I've built such a hierarchy before on multiple occasions. It is nigh unusable for library implementors. You get zero code-reuse, and every point in the lattice of laws and members requires an instance. As you add dimensions of laws the curse of dimensionality gives you an explosive number of points.

Consequently, in Haskell, I've taken to adopting a more pragmatic approach, which is that I generally try not to introduce any type class that merely introduces a law, unless that law is accompanied by an operation."

All good and wise for library design *except* not so good for haskell programmers where thinking about the problem at hand is so tied up with the abstractions at hand. As a consequence, thinking about the correct class heirarchy for the exact problem is given short work.

performance

## Algebra

notes on algebra

## Hilbert

This is the tower needed for working on a Hilbert space. What is the unique Free object for this???

# Notes

## Divisible

Divisible is an existence law-only class ie

`∀ a, b ∈ T: a / b ∈ T`

## examples

- http://blog.functorial.com/posts/2015-12-06-Counterexamples.html
- priority queue: a (Max, +) Semiring
- probability:
`newtype Prob s a = Prob (List (s, a))`

## Other libraries

- https://github.com/conal/vector-space/
- https://github.com/ekmett/algebra
- https://github.com/SamuelSchlesinger/gaia
- https://github.com/martinra/algebraic-structures
- https://github.com/jtapolczai/algebra
- http://konn.github.io/computational-algebra/