~jojo/Carth

ref: 749208029494a7c48ce04444a513424f4b998416 Carth/test d---------
Update stackage release & use default-extensions in cabal file

Also, fix some minor breakages caused by ghc update, fix the
literate.org example, fix some new warnings, and get rid of the need
for a bunch of Data implementations by using basic parsing functions
in SystemSpec.hs.
Add test for latest bug fix
Add macro rules and ellipsis (...) macro operator
Make parser act on token trees instead of chars
Fix partitionWith reversing lists. Caused def order issue in genInit

genInit must genDefineGlobVar:s in topological order, but an earlier
call to partitionWith had accidentally reversed the topological order,
causing this to break:

    (define (main r) (bar r))
    (define bar bar1)
    (define bar1 foo)
    (define (foo r) [Unit r])
Make main IO Unit, i.e. (Fun RealWorld [Unit RealWorld])
Add test/tests/good/ackermann.carth
Merge branch 'master' into ZST
New pair syntax. [a b] => [a b . Unit] => (Cons a (Cons b Unit))
Add skeleton module Optimize between Monomorphize & Compile
Add some small programs to test/tests/good/
Test that good programs produce expected output

For the programs in test/tests/good/, compile and run the program,
capturing stdout. If the string of stdout matches the text in the
first comment of the file, the test passes.
Test that examples and benchmarks compile

So now, `stack test` will: test that programs in test/tests/bad/ don't
typecheck, and fail with the expected error variant; test that
programs in examples/ compile; and test that programs in test/bench/
compile.

Next: test that programs in test/tests/good/ run and produce the
expected output.
Extract tests from CheckSpec to individual files in test/tests/bad

SystemSpec now runs those and verifies the type errors match what's expected
Update/fix tests
Improve module names. Ast -> Parsed, AnnotAst -> Inferred, and more
Add test to detect refs to undef types in extern decls
Impl all error-tests of err.carth as proper tests in CheckSpec.hs
Remove unmaintained tests for parsing (parse after pretty == id)

Yeah, I didn't really maintain it properly, so it didn't do much
good. I'm changing the AST too much for it to not just feel like a
bother. Will re-add with improvements at some point.
Add some test-cases for specific typecheck errors
Next