Add Type data type for eventual type checking
Merge branch 'master' of github.com:cdparks/mini-core into typechecking
Modify types for type-checking. Make parser handle data-declarations correctly
Simplify parsing of data-type declarations. Just keep enough information to build constructor types later.
Move isData out to Types since we'll need to partition our declarations in a few places
Replace references to DataSpec with Data and fix pretty-printing for Data declarations
Attempting to convert each state in pipeline to be of type Stage a

Stage is just:

type Stage = ErrorT String Identity

so we can be a little more principled about throwing errors. Need to figure
out how I want to convert GMachine.hs. Looking into doing something like this:

type Eval a = StateT GMState Stage a

and then having the GMState-returning functions just be of type Eval (). May
replace the innermost Identity monad with IO to reimplement verbose output.
Adding Inference.hs providing typecheck :: Program -> Stage Program to perform type-inference

Largely based of the implementation of Hindley-Milner described in
"The Implementation of Functional Programming Languages" with some help
from "Typing Haskell in Haskell".

Currently, we convert the source program to a single letrec. For example,

data List a = Cons a (List a) | Nil;

length ls = case ls of {
    Cons x xs -> 1 + length ls;
    Nil       -> Nil;
};

main = length (Cons 1 (Cons 2 (Cons 3 Nil)));

gets transformed to

data List a = Cons a (List a) | Nil;
letrec {
    length = \ls -> case ls of {
        Cons x xs -> 1 + length ls;
        Nil       -> Nil;
    };
    main = length (Cons 1 (Cons 2 (Cons 3 Nil)));
} in main;

and then typechecked as a single expression. I might revisit this since it
makes giving good error messages difficult.
Breaking out calculation of freeVars into MiniCore/Transforms/Utils.hs
Add type-synonyms for nodes decorated with free-variable information
Clean up Transforms/Utils.hs and expose freeVarsExpr which allows one to annotate a single expression with free-variable information
Lift Transforms/Lambdas.hs into Stage monad transformer
Adding Transforms/StronglyConnectedComponents.hs

In "Implementing Functional Languages" this is used to implement full
laziness. I'm using it to transform a program like this:

fix f = f (fix f);
id x = x;
main = fix id;

into a single let(rec) like this:

letrec {
    fix = \f -> f (fix f);
} in let {
    id = \x -> x;
} in let {
    main = fix id;
} in main;

for type-checking. This ensures that we maximize polymorphism. Initially, we
would just put everything into a single letrec like so:

letrec {
    fix = \f -> f (fix f);
    id = \x -> x;
    main = fix id;
} in main;

but then id is monomorphic in the definition of main.
Using simplifyExpr to improve type inference in Inference.hs

As explained in previous commit, the code in StronglyConnectedComponents.hs
allows us to split a program into minimal nested let(recs).
Inference.inferTypes now uses this to transform the program before
typechecking.
Remove some weirdness from parser and pretty-printer. Keep lambdas from needing always needing parens when pretty-printing
Making IO base monad in transformer stack so we can get tracing in type checker
Add tracing to MiniCore/Inference.hs and improve error messages with context
Minor cleanup in Transforms
Minor cleanup in GCompiler
Lift GMachine into Stage monad transformer and add ability to print constructor names and unsaturated globals

Instructions:
    * Added LParen, RParen, and Space for adding punctuation to output. This
      will go away once Char is a builtin type and we have instructions to
      put them on the stack.

GMachine:
    * Encode state transitions using StateT
    * Add new component gmCons which is just a list of constructor names sorted
      in tag order so that if we have (NConstructor tag arity), then
      (gmCons state) !! tag -> Constructor name
    * Implement LParen, RParen, and Space instructions
    * Print "<function>" if main = some unsaturated global
    * Garbage collection is turned off until I can figure out a better way to
      represent heap in GMState

Format:
    * Don't automatically space-separate output in gmOutput anymore

Transforms & GCompiler:
    * Pass tag-sorted list of constructor names from transform and add it to
      initial machine state in compile