 +
 +foreign import javascript interruptible
 +  "h$directory_getFileStatus($1,$c);"
-+  js_getFileStatus :: JSString -> IO Metadata
++  js_getFileStatus :: JSString -> IO JSVal
 +
 +foreign import javascript interruptible
 +  "h$directory_getFileOrSymlinkStatus($1,$c);"
-+  js_getFileOrSymlinkStatus :: JSString -> IO Metadata
++  js_getFileOrSymlinkStatus :: JSString -> IO JSVal
 +
 +foreign import javascript unsafe
 +  "h$directory_getFileStatusModificationTime($1)"

+  js_createDirectory :: JSString -> IO Int
+
+foreign import javascript interruptible
+  "h$directory_removeDirectory($1,$c);"
+  js_removeDirectory :: JSString -> IO Int
+

 -- builds, so we use this ugly workaround where we simply paste the C string
 -- literal directly in here.  This will probably break if the EXE_EXTENSION
diff -Nru upstream/pkg/directory/System/Directory/Internal/GHCJS.hs boot/pkg/directory/System/Directory/Internal/GHCJS.hs
--- upstream/pkg/directory/System/Directory/Internal/GHCJS.hs	1970-01-01 00:00:00.000000000 +0000
+++ boot/pkg/directory/System/Directory/Internal/GHCJS.hs	2018-05-12 15:20:35.864275966 +0000
@@ -0,0 +1,324 @@
+{-# LANGUAGE CPP #-}
+#if defined(ghcjs_HOST_OS)
+{-# LANGUAGE ForeignFunctionInterface,
