The main mechanism for simplification was simply to assume that
ZeroType<T> and OneType<T> will always be in T. That removed a lot
of specialized typing, and presumably will be true in practice.
Otherwise, removes extraneous type definitions and adds/clarifies
a number of comments to hopefully make the scheme as clear as possible.
Avoids clumsy naming properties by making the names the keys in
an interface to which the signatures of all operations must be
published. This also reduces the number of different symbols and
avoids long lists of imports in the modules implementing multiple
operations, which were redundant with the list of functions
exported from such modules.
Together with any auxiliary functions needed for that goal. Also
strives to ensure the same functions are being defined for
number and for `Complex<T>`.
This PR is an effort to address #1. It removes all boilerplate
from individual implementation files, and moves it into
a small, fixed section in the single `all.ts` module for each
type that collects up all of the implementations relating
to that type.
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Reviewed-on: #2
A first pass at specifying some implementations in TypeScript
that actually compiles. It doesn't do anything, as installing
types and operation specifications are currently dummy operations,
but they are all invoked.