Needed for version 0.3.0:

* Remove functions deprecated before 0.3.0
* Finish documenting API in stdlib and libs
* Remove old style exception handling; fix examples.
* Full pattern matching.
* Tutorial for HTML templating.
* Speed up XML parsing considerably
* Exercises for tutorial.
* HTTP/WebCommon modules need a function to generate Cookie headers
  that doesn't require the webapp author to read all the RFCs.
* Regression tests for program transformations (some kind of readable
  debugging output needed, like a pretty-printer for code fragments,
  or even an ugly-printer).

Short term things to do:

* Try a different method of storing Array chunks - use the same size
  for every chunk so that its easy to calculate which chunk an index
  is in, so that lookup is O(1) and memory usage is
  reduced/predictable. Might not make much difference but it's worth a
  go.
* Refactor Inference.hs, it's long and complicated and messy
* When lambda lifting, only add arguments to the lifted function which
  are used in the body of the lambda.
* Big number primitives (BigInt/BigFloat)
* Improve compiler efficiency (look for tail recursion and strictness
  in particular - and profile!)
* Better URLs in webapp links.
* If a module change doesn't change the contents of the .ki, don't
  rebuild dependencies.
* Finish hierarchical module system
* Think about a better module/package system (not necessarily to do
  anything about it, but at least think about it - consider dynamic linking)
* More data structure libraries (further to Queue, e.g. Stack, binary
  search Tree, generic Tree, Heap, Set, Graph)
* Redo testing framework - several separate categories
  - successful compile, successful run (sufficient coverage for all
    RTS).
  - successful compile, run-time error (covering all ways of throwing
    exceptions due to RTS errors)
  - fail to compile (covering all possible compile-time errors).
  - library tests (covering all stdlib functions).
  - regression (all the old errors, so that they don't come back).
* Implementation of infix operators relies too much on C. Add
  specialised VM instructions instead.
* Add op= shorthand for more operators.
* Performance tuning for library functions (in C if necessary).
  especially: Array::unshift, Array::subarray, Array::remove, Array::take

General optimisation ideas:

* Don't allocate more stack ints than necessary for a function
* Make ADTs that are solely enums be internally represented as Ints

Long term ideas:

* Consider subtyping/overloading.
* Reorganise parser.
* Tidy up Raw/Expr data types (big, boring job, so unlikely to happen).
* Identify pure functions for:
  + Inlining (making macros like #defines).
  + Common subexpression elimination.
* User defined optimisations via rewrite rules.
* Documenting the typing rules would be nice, if boring and unlikely
  to be read. A full formal description of the syntax too, which would
  also help in refactoring the parser.
* Switch to a register based VM, rather than stack based. (????)
* Self hosting!

Random thoughts

* Dynamic linking support would be nice.
