sintefmath/equelle — pull request #31 by atgeirr (2014-10-27 09:27:54+00:00)
Title: Full support for template functions, also unit/dimension support

Major features implemented:
- All function calls, including both user-defined and built-in functions, now have the right dimension.
- Functions need no longer be declared.
- Functions are checked for type and dimension correctness (instantiated) at the call site.
- C++ output is modified to emit multiple instantiations, each instantiation is a regular (non-generic) lambda.
- Full dimension checking on by default, `--dimensionless` compiler option turns off checking.

Some remaining gotchas and minor quibbles to be dealt with later:
- While more robust, the error message line numbers are still not quite precise, and may refer to one line below the real issue.
- Nested function scopes are not properly restricted (compiler will allow call to any function in any scope).
- Type checking of some built-in function calls not quite strict enough.
- Function references are not really first-class citizens. Basically, they can only be used idiomatically as arguments for NewtonSolve() and NewtonSolveSystem().