fix for #285

Uh, this one line cost me two hours :)

So the problem was because `compileToplevelModule` was assuming that name of the module being compiled is `Main`, and `initialPass` was adding newtypes to `Main` module instead of the module being compiled.

This patch fixes this.

( I also added the code from #285 just for demonstration purposes )