Updated to work with `base-4.7` where `unsafePerformIO` needs to be imported from `System.IO.Unsafe`