refactoring SyntaxTree.hs