Improved type based compiler matching with expressions classes