The simply typed lambda-calculus is studied in Hindley and Seldin (1986), and in even greater detail in Hindley's monograph (1997).
Well-typed programs cannot "go wrong." -Robin Milner (1978)