ref: 55fb4f948f1f3797078b584dc60b4f7dd68b37ed Carth/test d---------
Check `cast` in Infer instead of Gen

Using the new virtual typeclass `Cast a b`, which as a predicate is
true then `a` can be cast to `b`, which is the case from all primitive
numeric types to eachother, and from one type to itself.
Fix class constraint inference bug when explicit scheme given

See test/tests/bad/transmute-size-mismatch2.carth. This didn't fail
before. Users type sig was not respected, and (SameSize a b) was
inferred and added to the scheme implicitly.
(mostly) implement checking of same size for transmute in Infer

Preferably, all kinds of checking should happen as early as possible,
so we don't have to remember tons of polluting SrcPos:s in the AST for
later stages. This is a big step in removing positioning from Codegen.

Also, this lays much of the groundwork for supporting typeclasses more

The implementation is not quite correct/done though. Indeed, it
rejects transmutes for a pair of monotypes not of the same size, but
the inferring and scheme creating is a little broken. See
rename Optimize{,d} -> Low{er,}
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/

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