Changed type checker to output typed expressions rather than just types.