add main test code
fix tyDeMDecls' [] = return []
fix function definition