finished type checking and evaluation of recursive data types