Had to implement both functions as arguments and type
place holders (variables) for type constructors.
Had to implement functions as a type as well.
Still have to figure out how to pass functions around.
This also removes the InternalPassAsPointer experiment.
This also fixes that u8 values were stores as 32 bits
in structs and tuples (but not dynamic arrays since that
is special cased as bytes).
Also, fixes allocation issue wi th dynamic arrays, it
would allocate quadratic amount of memory.
Foldable take a TypeConstructor. The first argument must be a
NatNum.
The FunctionSignatureRouter wasn't completely on point, instead
this commit adds an TypeClassArgsRouter lookup router. This
makes sense since the only available arguments we have to find
a router is the list of type class arguments.
By annotating types with the constructor application
that was used to create them.
Later on we can use the router to replace compiler's
INSTANCES or for user defined types.
Also adds the remaining unexposed WebAssembly opcodes as
comments (eqz, clz, ctz, popcnt, copysign).
This also means that BinaryOp.operator is now always
a type class method.
This is because Haskell defines negate, abs and signum
for Num, but they don't work with our unsigned number
types. (abs would be a noop.) Haskell has Word32 / Word64,
but there negate doesn't make much sense to me.
Implemented neg and abs.
Implemented a type class inheritance check.
Removed Integral from u8 and i8 since it wasn't implemented.