add test cases based on the examples directory
revert compiler printing behavior
fix some ghc warnings about variable use