compiles with ghc 7.8.3

It compiles, but I'm not sure it works completely.  Please check