made this GHC 7.8-ready

Again, this compiles, style issues aside. Should work for older versions.