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.
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.
Before this commit, finding the implementation for a type
class method was done with a simple lookup table.
This commit adds a router based on function signature.
This also paves the way for adding type constructor
arguments in function signatures.
And it removes quite a few references to the prelude out
of the compiler.
Also adds a bunch of helper methods to render signatures
as strings.
Before, a type class was a property of a type.
But that doesn't make any sense for multi parameter
type classes.
Had to make a hacky way for type classes with
type constructors.
They look a lot like placeholders, but they exist before
the typing system takes place. And there's a (much smaller)
context to deal with.
For now, removes Placeholders in user function definitions
as they were not implemented.
Adds signature to function to try to get them closer to
type class methods. Already seeing some benefit in the
constraint generator.
Stricter zipping for safety.