Add support (untested) for empty case expressions.
Perform smten code generation after program is tidied.

This should help with optimizations and also cleans things up slightly.
Merge branch 'master' into opt
Implemented primSelect and primArray at smten level.

That way we can do performance experiments involving them.
Working on making types for casts work out.
Change how we handle type abstractions and applications.

Generate haskell code for them instead of trying to inline.
Merge branch 'opt'
Minor cleanup.
Added SCCs to most of the primitives, and improved some.
Pass SCCs through from smten to generated code.