Add test cases for file TypeFunctions.hs