didn't compile under ghc 7.8 due to a change in base libraries that moved unsafe functions into a new module; fixed