  
  -- | Compute next prime greater than @/n/@ probalistically.
  --
-diff -X ../utils/updatePatches.excludes -Nru upstream/pkg/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs boot/pkg/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs
---- upstream/pkg/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs	2019-06-15 23:41:11.000000000 +0200
-+++ boot/pkg/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs	2019-07-31 01:50:46.000000000 +0200
-@@ -2,6 +2,11 @@
- {-# LANGUAGE MagicHash #-}
- {-# LANGUAGE UnboxedTuples #-}
- {-# LANGUAGE CPP #-}
-+#ifdef ghcjs_HOST_OS
-+{-# LANGUAGE JavaScriptFFI #-}
-+{-# LANGUAGE UnliftedFFITypes #-}
-+{-# LANGUAGE GHCForeignImportPrim #-}
-+#endif
- 
- {-# OPTIONS_HADDOCK hide #-}
- 
 diff -X ../utils/updatePatches.excludes -Nru upstream/pkg/integer-gmp/src/GHC/Integer/Logarithms.hs boot/pkg/integer-gmp/src/GHC/Integer/Logarithms.hs
 --- upstream/pkg/integer-gmp/src/GHC/Integer/Logarithms.hs	2019-06-15 23:41:11.000000000 +0200
 +++ boot/pkg/integer-gmp/src/GHC/Integer/Logarithms.hs	2019-06-15 23:41:11.000000000 +0200

     GHC.Integer.Logarithms
diff -X ../utils/updatePatches.excludes -Nru upstream/pkg/integer-gmp/jsbits/ghcjsbn.js boot/pkg/integer-gmp/jsbits/ghcjsbn.js
--- upstream/pkg/integer-gmp/jsbits/ghcjsbn.js	1970-01-01 01:00:00.000000000 +0100
+++ boot/pkg/integer-gmp/jsbits/ghcjsbn.js	2019-07-31 01:47:50.000000000 +0200
@@ -0,0 +1,2149 @@
+/*
+   GHCJS bignum library for integer-gmp package
+

+  return Math.ceil((bl * GHCJSBN_BITS) / 32);
+}
+
+#if GHCJSBN_BITS == 28
+// extract a word from a BigNat
+function h$ghcjsbn_index_b(b, w) {
+  var limb = (32 * w / 28)|0;
+  var l    = b[0];
+  var l1   = limb < l ? b[limb+1] : 0;
+  var l2   = (limb+1) < l ? b[limb+2] : 0;
+  var ws   = 4 * (w % 7);
+  return (l1 >>> ws) | (l2 << 28 - ws);
+}
+#else
+#error "ghcjsbn_index_b not implemented for current number of bits per limb";
+#endif
+
+// Bool -> BigNat -> Double
+function h$ghcjsbn_toDouble_b(nonNeg, b) {
