  {-# LANGUAGE Trustworthy #-}
  #endif
 +#ifdef __GHCJS__
-+{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, UnliftedFFITypes, MagicHash #-}
++{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, Trustworthy #-}
 +#endif
  
  -----------------------------------------------------------------------------
  -- |
-@@ -122,6 +130,54 @@
+@@ -122,6 +130,53 @@
  import qualified System.Posix as Posix
  #endif
  

     get isLocal _ _ = Win32.sHGetFolderPath nullPtr which nullPtr 0
       where which | isLocal   = win32_cSIDL_LOCAL_APPDATA
                   | otherwise = Win32.cSIDL_APPDATA
@@ -1869,7 +2008,10 @@
                         -> IO FilePath
 getAppUserDataDirectory appName = do
   modifyIOError (`ioeAddLocation` "getAppUserDataDirectory") $ do

   Win32.deleteFile path
 #else
   Posix.removeLink path
@@ -679,6 +767,10 @@
 
 renameDirectory :: FilePath -> FilePath -> IO ()
 renameDirectory opath npath =
