Make GenerateIntermediate.hs slightly less gross - add functions for common instructions