diff --git a/base-compat.cabal b/base-compat.cabal
--- a/base-compat.cabal
+++ b/base-compat.cabal
@@ -1,10 +1,11 @@
 name:             base-compat
-version:          0.3.0
+version:          0.4.0
 license:          MIT
 license-file:     LICENSE
-copyright:        (c) 2012 Simon Hengel
-author:           Simon Hengel <sol@typeful.net>
-maintainer:       Simon Hengel <sol@typeful.net>
+copyright:        (c) 2012-2014 Simon Hengel,
+                  (c) 2014 João Cristóvão
+author:           Simon Hengel <sol@typeful.net>, João Cristóvão <jmacristovao@gmail.com>
+maintainer:       Simon Hengel <sol@typeful.net>, João Cristóvão <jmacristovao@gmail.com>
 build-type:       Simple
 cabal-version:    >= 1.8
 category:         System
@@ -17,7 +18,6 @@
   location: https://github.com/sol/base-compat
 
 library
-  exposed: False
   ghc-options:
       -Wall
   build-depends:
@@ -30,225 +30,40 @@
   ghc-options:
     -fno-warn-duplicate-exports
 
---  if impl(ghc == 7.6.1)
---    include-dirs: includes/ghc-7.6.1/
---  if impl(ghc == 7.4.2)
---    include-dirs: includes/ghc-7.4.2/
---  if impl(ghc == 7.4.1)
---    include-dirs: includes/ghc-7.4.1/
---  if impl(ghc == 7.2.2)
---    include-dirs: includes/ghc-7.2.2/
---  if impl(ghc == 7.2.1)
---    include-dirs: includes/ghc-7.2.1/
---  if impl(ghc == 7.0.4)
---    include-dirs: includes/ghc-7.0.4/
---  if impl(ghc == 7.0.3)
---    include-dirs: includes/ghc-7.0.3/
---  if impl(ghc == 7.0.2)
---    include-dirs: includes/ghc-7.0.2/
---  if impl(ghc == 7.0.1)
---    include-dirs: includes/ghc-7.0.1/
---  if impl(ghc == 6.12.3)
---    include-dirs: includes/ghc-6.12.3/
---  if impl(ghc == 6.12.2)
---    include-dirs: includes/ghc-6.12.2/
---  if impl(ghc == 6.12.1)
---    include-dirs: includes/ghc-6.12.1/
---
---  install-includes:
---    base-compat.h
-
   hs-source-dirs:
       src
 
-  if !os(windows)
-    exposed-modules:
-      -- stubbed for base < 4.4.0
-      GHC.Event
-
   exposed-modules:
       -- with modifications
-      Data.Monoid
-      System.Environment
-      Text.Read
+      Prelude.Compat
+      Control.Monad.Compat
+      Control.Applicative.Compat
+      Data.Bool.Compat
+      Data.Either.Compat
+      Data.Foldable.Compat
+      Data.Functor.Compat
+      Data.Monoid.Compat
+      Data.Traversable.Compat
+      System.Environment.Compat
+      Text.Read.Compat
 
-      -- fixed warnings
-      GHC.ConsoleHandler
-      GHC.IO.Encoding.CodePage
-      Text.Show.Functions
+      -- added Eq/Ord instance for ErrorCall
+      Control.Exception.Compat
+      Control.Exception.Base.Compat
+      GHC.Exception.Compat
 
-      -- stubbed for base < 4.5.0
-      GHC.Stack
-      GHC.Stats
 
-      -- stubbed for base < 4.4.0
-      Control.Monad.ST.Lazy.Safe
-      Control.Monad.ST.Lazy.Unsafe
-      Control.Monad.ST.Safe
-      Control.Monad.ST.Unsafe
-      Control.Monad.Zip
-      Data.Typeable.Internal
-      Foreign.ForeignPtr.Safe
-      Foreign.ForeignPtr.Unsafe
-      Foreign.Marshal.Safe
-      Foreign.Marshal.Unsafe
-      Foreign.Safe
-      GHC.Fingerprint
-      GHC.Fingerprint.Type
-      GHC.Float.ConversionUtils
-      GHC.Float.RealFracMethods
-      GHC.Foreign
-      GHC.IO.Encoding.Failure
-
-      -- stubbed for base < 4.3.0
-      GHC.Conc.IO
-      GHC.Conc.Signal
-      GHC.Conc.Sync
-
-      -- pristine
-      Prelude
-      Control.Applicative
-      Control.Arrow
-      Control.Category
-      Control.Concurrent
-      Control.Concurrent.Chan
-      Control.Concurrent.MVar
-      Control.Exception
-      Control.Exception.Base
-      Control.Monad
-      Control.Monad.Fix
-      Control.Monad.Instances
-      Control.Monad.ST
-      Control.Monad.ST.Lazy
-      Control.Monad.ST.Strict
-      Data.Bits
-      Data.Bool
-      Data.Char
-      Data.Complex
-      Data.Data
-      Data.Dynamic
-      Data.Either
-      Data.Eq
-      Data.Fixed
-      Data.Foldable
-      Data.Function
-      Data.Functor
-      Data.Int
-      Data.IORef
-      Data.Ix
-      Data.List
-      Data.Maybe
-      Data.Ord
-      Data.Ratio
-      Data.STRef
-      Data.STRef.Lazy
-      Data.STRef.Strict
-      Data.String
-      Data.Traversable
-      Data.Tuple
-      Data.Typeable
-      Data.Unique
-      Data.Version
-      Data.Word
-      Debug.Trace
-      Foreign
-      Foreign.C
-      Foreign.C.Error
-      Foreign.Concurrent
-      Foreign.C.String
-      Foreign.C.Types
-      Foreign.ForeignPtr
-      Foreign.Marshal
-      Foreign.Marshal.Alloc
-      Foreign.Marshal.Array
-      Foreign.Marshal.Error
-      Foreign.Marshal.Pool
-      Foreign.Marshal.Utils
-      Foreign.Ptr
-      Foreign.StablePtr
-      Foreign.Storable
-      GHC.Arr
-      GHC.Base
-      GHC.Conc
-      GHC.Constants
-      GHC.Desugar
-      GHC.Enum
-      GHC.Environment
-      GHC.Err
-      GHC.Exception
-      GHC.Exts
-      GHC.Float
-      GHC.ForeignPtr
-      GHC.Int
-      GHC.IO
-      GHC.IOArray
-      GHC.IO.Buffer
-      GHC.IO.BufferedIO
-      GHC.IO.Device
-      GHC.IO.Encoding
-      GHC.IO.Encoding.Iconv
-      GHC.IO.Encoding.Latin1
-      GHC.IO.Encoding.Types
-      GHC.IO.Encoding.UTF16
-      GHC.IO.Encoding.UTF32
-      GHC.IO.Encoding.UTF8
-      GHC.IO.Exception
-      GHC.IO.FD
-      GHC.IO.Handle
-      GHC.IO.Handle.FD
-      GHC.IO.Handle.Internals
-      GHC.IO.Handle.Text
-      GHC.IO.Handle.Types
-      GHC.IO.IOMode
-      GHC.IORef
-      GHC.List
-      GHC.MVar
-      GHC.Num
-      GHC.Pack
-      GHC.PArr
-      GHC.Ptr
-      GHC.Read
-      GHC.Real
-      GHC.Show
-      GHC.ST
-      GHC.Stable
-      GHC.Storable
-      GHC.STRef
-      GHC.TopHandler
-      GHC.Unicode
-      GHC.Weak
-      GHC.Word
-      Numeric
-      System.Console.GetOpt
-      System.CPUTime
-      System.Exit
-      System.Info
-      System.IO
-      System.IO.Error
-      System.IO.Unsafe
-      System.Mem
-      System.Mem.StableName
-      System.Mem.Weak
-      System.Posix.Internals
-      System.Posix.Types
-      System.Timeout
-      Text.ParserCombinators.ReadP
-      Text.ParserCombinators.ReadPrec
-      Text.Printf
-      Text.Read.Lex
-      Text.Show
-      Unsafe.Coerce
-
 test-suite spec
   type:
       exitcode-stdio-1.0
   ghc-options:
-      -Wall -Werror
+      -Wall
   hs-source-dirs:
       test
   main-is:
       Spec.hs
   build-depends:
-      base-compat
+      base > 4.0
+    , base-compat
     , hspec >= 1.3
     , setenv
diff --git a/src/Control/Applicative.hs b/src/Control/Applicative.hs
deleted file mode 100644
--- a/src/Control/Applicative.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Applicative (
-  module Base
-) where
-import "base" Control.Applicative as Base
diff --git a/src/Control/Applicative/Compat.hs b/src/Control/Applicative/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Control/Applicative/Compat.hs
@@ -0,0 +1,22 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+module Control.Applicative.Compat (
+  module Base
+, Const(..)
+, WrappedMonad(..)
+) where
+import "base" Control.Applicative as Base
+
+#if !MIN_VERSION_base(4,7,0)
+import Data.Monoid (Monoid(..),mempty,mappend)
+import Control.Monad (Monad(..))
+import Data.Function ((.))
+-- Added in base-4.7.0.0
+instance Monoid a => Monoid (Const a b) where
+    mempty = Const mempty
+    mappend (Const a) (Const b) = Const (mappend a b)
+
+-- Added in base-4.7.0.0 (GHC Trac #8218)
+instance Monad m => Monad (WrappedMonad m) where
+    return = WrapMonad . return
+    a >>= f = WrapMonad (unwrapMonad a >>= unwrapMonad . f)
+#endif
diff --git a/src/Control/Arrow.hs b/src/Control/Arrow.hs
deleted file mode 100644
--- a/src/Control/Arrow.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Arrow (
-  module Base
-) where
-import "base" Control.Arrow as Base
diff --git a/src/Control/Category.hs b/src/Control/Category.hs
deleted file mode 100644
--- a/src/Control/Category.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Category (
-  module Base
-) where
-import "base" Control.Category as Base
diff --git a/src/Control/Concurrent.hs b/src/Control/Concurrent.hs
deleted file mode 100644
--- a/src/Control/Concurrent.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Concurrent (
-  module Base
-) where
-import "base" Control.Concurrent as Base
diff --git a/src/Control/Concurrent/Chan.hs b/src/Control/Concurrent/Chan.hs
deleted file mode 100644
--- a/src/Control/Concurrent/Chan.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Concurrent.Chan (
-  module Base
-) where
-import "base" Control.Concurrent.Chan as Base
diff --git a/src/Control/Concurrent/MVar.hs b/src/Control/Concurrent/MVar.hs
deleted file mode 100644
--- a/src/Control/Concurrent/MVar.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Concurrent.MVar (
-  module Base
-) where
-import "base" Control.Concurrent.MVar as Base
diff --git a/src/Control/Exception.hs b/src/Control/Exception.hs
deleted file mode 100644
--- a/src/Control/Exception.hs
+++ /dev/null
@@ -1,5 +0,0 @@
-module Control.Exception (
-  module Base
-) where
-import "base" Control.Exception as Base
-import GHC.Exception ()
diff --git a/src/Control/Exception/Base.hs b/src/Control/Exception/Base.hs
deleted file mode 100644
--- a/src/Control/Exception/Base.hs
+++ /dev/null
@@ -1,5 +0,0 @@
-module Control.Exception.Base (
-  module Base
-) where
-import "base" Control.Exception.Base as Base
-import GHC.Exception ()
diff --git a/src/Control/Exception/Base/Compat.hs b/src/Control/Exception/Base/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Control/Exception/Base/Compat.hs
@@ -0,0 +1,5 @@
+module Control.Exception.Base.Compat (
+  module Base
+) where
+import "base" Control.Exception.Base as Base
+import GHC.Exception.Compat ()
diff --git a/src/Control/Exception/Compat.hs b/src/Control/Exception/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Control/Exception/Compat.hs
@@ -0,0 +1,5 @@
+module Control.Exception.Compat (
+  module Base
+) where
+import "base" Control.Exception as Base
+import GHC.Exception.Compat ()
diff --git a/src/Control/Monad.hs b/src/Control/Monad.hs
deleted file mode 100644
--- a/src/Control/Monad.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Monad (
-  module Base
-) where
-import "base" Control.Monad as Base
diff --git a/src/Control/Monad/Compat.hs b/src/Control/Monad/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Control/Monad/Compat.hs
@@ -0,0 +1,15 @@
+module Control.Monad.Compat (
+  module Base
+, void
+) where
+
+import           Control.Monad as Base
+
+#if !MIN_VERSION_base(4,3,0)
+
+import           Prelude.Compat
+
+-- | @'void' value@ discards or ignores the result of evaluation, such as the return value of an 'IO' action.
+void :: Functor f => f a -> f ()
+void = fmap (const ())
+#endif
diff --git a/src/Control/Monad/Fix.hs b/src/Control/Monad/Fix.hs
deleted file mode 100644
--- a/src/Control/Monad/Fix.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Monad.Fix (
-  module Base
-) where
-import "base" Control.Monad.Fix as Base
diff --git a/src/Control/Monad/Instances.hs b/src/Control/Monad/Instances.hs
deleted file mode 100644
--- a/src/Control/Monad/Instances.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Monad.Instances (
-  module Base
-) where
-import "base" Control.Monad.Instances as Base
diff --git a/src/Control/Monad/ST.hs b/src/Control/Monad/ST.hs
deleted file mode 100644
--- a/src/Control/Monad/ST.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Monad.ST (
-  module Base
-) where
-import "base" Control.Monad.ST as Base
diff --git a/src/Control/Monad/ST/Lazy.hs b/src/Control/Monad/ST/Lazy.hs
deleted file mode 100644
--- a/src/Control/Monad/ST/Lazy.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Monad.ST.Lazy (
-  module Base
-) where
-import "base" Control.Monad.ST.Lazy as Base
diff --git a/src/Control/Monad/ST/Lazy/Safe.hs b/src/Control/Monad/ST/Lazy/Safe.hs
deleted file mode 100644
--- a/src/Control/Monad/ST/Lazy/Safe.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Control.Monad.ST.Lazy.Safe (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Control.Monad.ST.Lazy.Safe as Base
-#else
-) where
-#endif
diff --git a/src/Control/Monad/ST/Lazy/Unsafe.hs b/src/Control/Monad/ST/Lazy/Unsafe.hs
deleted file mode 100644
--- a/src/Control/Monad/ST/Lazy/Unsafe.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Control.Monad.ST.Lazy.Unsafe (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Control.Monad.ST.Lazy.Unsafe as Base
-#else
-) where
-#endif
diff --git a/src/Control/Monad/ST/Safe.hs b/src/Control/Monad/ST/Safe.hs
deleted file mode 100644
--- a/src/Control/Monad/ST/Safe.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Control.Monad.ST.Safe (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Control.Monad.ST.Safe as Base
-#else
-) where
-#endif
diff --git a/src/Control/Monad/ST/Strict.hs b/src/Control/Monad/ST/Strict.hs
deleted file mode 100644
--- a/src/Control/Monad/ST/Strict.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Control.Monad.ST.Strict (
-  module Base
-) where
-import "base" Control.Monad.ST.Strict as Base
diff --git a/src/Control/Monad/ST/Unsafe.hs b/src/Control/Monad/ST/Unsafe.hs
deleted file mode 100644
--- a/src/Control/Monad/ST/Unsafe.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Control.Monad.ST.Unsafe (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Control.Monad.ST.Unsafe as Base
-#else
-) where
-#endif
diff --git a/src/Control/Monad/Zip.hs b/src/Control/Monad/Zip.hs
deleted file mode 100644
--- a/src/Control/Monad/Zip.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Control.Monad.Zip (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Control.Monad.Zip as Base
-#else
-) where
-#endif
diff --git a/src/Data/Bits.hs b/src/Data/Bits.hs
deleted file mode 100644
--- a/src/Data/Bits.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Bits (
-  module Base
-) where
-import "base" Data.Bits as Base
diff --git a/src/Data/Bool.hs b/src/Data/Bool.hs
deleted file mode 100644
--- a/src/Data/Bool.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Bool (
-  module Base
-) where
-import "base" Data.Bool as Base
diff --git a/src/Data/Bool/Compat.hs b/src/Data/Bool/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Bool/Compat.hs
@@ -0,0 +1,16 @@
+module Data.Bool.Compat (
+  module Base
+, bool
+) where
+import "base" Data.Bool as Base
+
+#if !MIN_VERSION_base(4,7,0)
+-- | Case analysis for the 'Bool' type.
+-- @bool a b p@ evaluates to @a@ when @p@ is @False@, and evaluates to @b@
+-- when @p@ is @True@.
+--
+-- /Since: 4.7.0.0/
+bool :: a -> a -> Bool -> a
+bool f _ False = f
+bool _ t True  = t
+#endif
diff --git a/src/Data/Char.hs b/src/Data/Char.hs
deleted file mode 100644
--- a/src/Data/Char.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Char (
-  module Base
-) where
-import "base" Data.Char as Base
diff --git a/src/Data/Complex.hs b/src/Data/Complex.hs
deleted file mode 100644
--- a/src/Data/Complex.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Complex (
-  module Base
-) where
-import "base" Data.Complex as Base
diff --git a/src/Data/Data.hs b/src/Data/Data.hs
deleted file mode 100644
--- a/src/Data/Data.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Data (
-  module Base
-) where
-import "base" Data.Data as Base
diff --git a/src/Data/Dynamic.hs b/src/Data/Dynamic.hs
deleted file mode 100644
--- a/src/Data/Dynamic.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Dynamic (
-  module Base
-) where
-import "base" Data.Dynamic as Base
diff --git a/src/Data/Either.hs b/src/Data/Either.hs
deleted file mode 100644
--- a/src/Data/Either.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Either (
-  module Base
-) where
-import "base" Data.Either as Base
diff --git a/src/Data/Either/Compat.hs b/src/Data/Either/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Either/Compat.hs
@@ -0,0 +1,23 @@
+module Data.Either.Compat (
+  module Base
+, isLeft
+, isRight
+) where
+import "base" Data.Either as Base
+
+#if !MIN_VERSION_base(4,7,0)
+import Data.Bool (Bool(..))
+-- | Return `True` if the given value is a `Left`-value, `False` otherwise.
+--
+-- /Since: 4.7.0.0/
+isLeft :: Either a b -> Bool
+isLeft (Left  _) = True
+isLeft (Right _) = False
+
+-- | Return `True` if the given value is a `Right`-value, `False` otherwise.
+--
+-- /Since: 4.7.0.0/
+isRight :: Either a b -> Bool
+isRight (Left  _) = False
+isRight (Right _) = True
+#endif
diff --git a/src/Data/Eq.hs b/src/Data/Eq.hs
deleted file mode 100644
--- a/src/Data/Eq.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Eq (
-  module Base
-) where
-import "base" Data.Eq as Base
diff --git a/src/Data/Fixed.hs b/src/Data/Fixed.hs
deleted file mode 100644
--- a/src/Data/Fixed.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Fixed (
-  module Base
-) where
-import "base" Data.Fixed as Base
diff --git a/src/Data/Foldable.hs b/src/Data/Foldable.hs
deleted file mode 100644
--- a/src/Data/Foldable.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Foldable (
-  module Base
-) where
-import "base" Data.Foldable as Base
diff --git a/src/Data/Foldable/Compat.hs b/src/Data/Foldable/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Foldable/Compat.hs
@@ -0,0 +1,27 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+module Data.Foldable.Compat (
+  module Base
+, Foldable(..)
+) where
+import "base" Data.Foldable as Base
+
+#if !MIN_VERSION_base(4,7,0)
+import Data.Either (Either(..))
+import Data.Monoid (mempty)
+import Control.Applicative (Const(..))
+
+instance Foldable (Either a) where
+    foldMap _ (Left _) = mempty
+    foldMap f (Right y) = f y
+
+    foldr _ z (Left _) = z
+    foldr f z (Right y) = f y z
+
+instance Foldable ((,) a) where
+    foldMap f (_, y) = f y
+
+    foldr f z (_, y) = f y z
+
+instance Foldable (Const m) where
+    foldMap _ _ = mempty
+#endif
diff --git a/src/Data/Function.hs b/src/Data/Function.hs
deleted file mode 100644
--- a/src/Data/Function.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Function (
-  module Base
-) where
-import "base" Data.Function as Base
diff --git a/src/Data/Functor.hs b/src/Data/Functor.hs
deleted file mode 100644
--- a/src/Data/Functor.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Functor (
-  module Base
-) where
-import "base" Data.Functor as Base
diff --git a/src/Data/Functor/Compat.hs b/src/Data/Functor/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Functor/Compat.hs
@@ -0,0 +1,20 @@
+module Data.Functor.Compat (
+  module Base
+, ($>)
+, void
+) where
+import "base" Data.Functor as Base
+
+#if !MIN_VERSION_base(4,7,0)
+import Control.Monad.Compat (void)
+import Data.Function (flip)
+
+infixl 4 $>
+
+-- | Flipped version of '$>'.
+--
+-- /Since: 4.7.0.0/
+($>) :: Functor f => f a -> b -> f b
+($>) = flip (<$)
+
+#endif
diff --git a/src/Data/IORef.hs b/src/Data/IORef.hs
deleted file mode 100644
--- a/src/Data/IORef.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.IORef (
-  module Base
-) where
-import "base" Data.IORef as Base
diff --git a/src/Data/Int.hs b/src/Data/Int.hs
deleted file mode 100644
--- a/src/Data/Int.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Int (
-  module Base
-) where
-import "base" Data.Int as Base
diff --git a/src/Data/Ix.hs b/src/Data/Ix.hs
deleted file mode 100644
--- a/src/Data/Ix.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Ix (
-  module Base
-) where
-import "base" Data.Ix as Base
diff --git a/src/Data/List.hs b/src/Data/List.hs
deleted file mode 100644
--- a/src/Data/List.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.List (
-  module Base
-) where
-import "base" Data.List as Base
diff --git a/src/Data/Maybe.hs b/src/Data/Maybe.hs
deleted file mode 100644
--- a/src/Data/Maybe.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Maybe (
-  module Base
-) where
-import "base" Data.Maybe as Base
diff --git a/src/Data/Monoid.hs b/src/Data/Monoid.hs
deleted file mode 100644
--- a/src/Data/Monoid.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-module Data.Monoid (
-  module Base
-, (<>)
-) where
-import "base" Data.Monoid as Base
-
-#if !MIN_VERSION_base(4,5,0)
--- | An infix synonym for 'mappend'.
-(<>) :: Monoid m => m -> m -> m
-(<>) = mappend
-{-# INLINE (<>) #-}
-#endif
diff --git a/src/Data/Monoid/Compat.hs b/src/Data/Monoid/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Monoid/Compat.hs
@@ -0,0 +1,12 @@
+module Data.Monoid.Compat (
+  module Base
+, (<>)
+) where
+import "base" Data.Monoid as Base
+
+#if !MIN_VERSION_base(4,5,0)
+-- | An infix synonym for 'mappend'.
+(<>) :: Monoid m => m -> m -> m
+(<>) = mappend
+{-# INLINE (<>) #-}
+#endif
diff --git a/src/Data/Ord.hs b/src/Data/Ord.hs
deleted file mode 100644
--- a/src/Data/Ord.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Ord (
-  module Base
-) where
-import "base" Data.Ord as Base
diff --git a/src/Data/Ratio.hs b/src/Data/Ratio.hs
deleted file mode 100644
--- a/src/Data/Ratio.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Ratio (
-  module Base
-) where
-import "base" Data.Ratio as Base
diff --git a/src/Data/STRef.hs b/src/Data/STRef.hs
deleted file mode 100644
--- a/src/Data/STRef.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.STRef (
-  module Base
-) where
-import "base" Data.STRef as Base
diff --git a/src/Data/STRef/Lazy.hs b/src/Data/STRef/Lazy.hs
deleted file mode 100644
--- a/src/Data/STRef/Lazy.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.STRef.Lazy (
-  module Base
-) where
-import "base" Data.STRef.Lazy as Base
diff --git a/src/Data/STRef/Strict.hs b/src/Data/STRef/Strict.hs
deleted file mode 100644
--- a/src/Data/STRef/Strict.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.STRef.Strict (
-  module Base
-) where
-import "base" Data.STRef.Strict as Base
diff --git a/src/Data/String.hs b/src/Data/String.hs
deleted file mode 100644
--- a/src/Data/String.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.String (
-  module Base
-) where
-import "base" Data.String as Base
diff --git a/src/Data/Traversable.hs b/src/Data/Traversable.hs
deleted file mode 100644
--- a/src/Data/Traversable.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Traversable (
-  module Base
-) where
-import "base" Data.Traversable as Base
diff --git a/src/Data/Traversable/Compat.hs b/src/Data/Traversable/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Traversable/Compat.hs
@@ -0,0 +1,23 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+module Data.Traversable.Compat (
+  module Base
+, Traversable(..)
+) where
+import "base" Data.Traversable as Base
+
+#if !MIN_VERSION_base(4,7,0)
+import Data.Either (Either(..))
+import Data.Foldable.Compat ()
+import Data.Function (($))
+import Control.Applicative (Const(..),pure,(<$>))
+
+instance Traversable (Either a) where
+    traverse _ (Left x) = pure (Left x)
+    traverse f (Right y) = Right <$> f y
+
+instance Traversable ((,) a) where
+    traverse f (x, y) = (,) x <$> f y
+
+instance Traversable (Const m) where
+    traverse _ (Const m) = pure $ Const m
+#endif
diff --git a/src/Data/Tuple.hs b/src/Data/Tuple.hs
deleted file mode 100644
--- a/src/Data/Tuple.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Tuple (
-  module Base
-) where
-import "base" Data.Tuple as Base
diff --git a/src/Data/Typeable.hs b/src/Data/Typeable.hs
deleted file mode 100644
--- a/src/Data/Typeable.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Typeable (
-  module Base
-) where
-import "base" Data.Typeable as Base
diff --git a/src/Data/Typeable/Internal.hs b/src/Data/Typeable/Internal.hs
deleted file mode 100644
--- a/src/Data/Typeable/Internal.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Data.Typeable.Internal (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Data.Typeable.Internal as Base
-#else
-) where
-#endif
diff --git a/src/Data/Unique.hs b/src/Data/Unique.hs
deleted file mode 100644
--- a/src/Data/Unique.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Unique (
-  module Base
-) where
-import "base" Data.Unique as Base
diff --git a/src/Data/Version.hs b/src/Data/Version.hs
deleted file mode 100644
--- a/src/Data/Version.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Version (
-  module Base
-) where
-import "base" Data.Version as Base
diff --git a/src/Data/Word.hs b/src/Data/Word.hs
deleted file mode 100644
--- a/src/Data/Word.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Data.Word (
-  module Base
-) where
-import "base" Data.Word as Base
diff --git a/src/Debug/Trace.hs b/src/Debug/Trace.hs
deleted file mode 100644
--- a/src/Debug/Trace.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Debug.Trace (
-  module Base
-) where
-import "base" Debug.Trace as Base
diff --git a/src/Foreign.hs b/src/Foreign.hs
deleted file mode 100644
--- a/src/Foreign.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign (
-  module Base
-) where
-import "base" Foreign as Base
diff --git a/src/Foreign/C.hs b/src/Foreign/C.hs
deleted file mode 100644
--- a/src/Foreign/C.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.C (
-  module Base
-) where
-import "base" Foreign.C as Base
diff --git a/src/Foreign/C/Error.hs b/src/Foreign/C/Error.hs
deleted file mode 100644
--- a/src/Foreign/C/Error.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.C.Error (
-  module Base
-) where
-import "base" Foreign.C.Error as Base
diff --git a/src/Foreign/C/String.hs b/src/Foreign/C/String.hs
deleted file mode 100644
--- a/src/Foreign/C/String.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.C.String (
-  module Base
-) where
-import "base" Foreign.C.String as Base
diff --git a/src/Foreign/C/Types.hs b/src/Foreign/C/Types.hs
deleted file mode 100644
--- a/src/Foreign/C/Types.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.C.Types (
-  module Base
-) where
-import "base" Foreign.C.Types as Base
diff --git a/src/Foreign/Concurrent.hs b/src/Foreign/Concurrent.hs
deleted file mode 100644
--- a/src/Foreign/Concurrent.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.Concurrent (
-  module Base
-) where
-import "base" Foreign.Concurrent as Base
diff --git a/src/Foreign/ForeignPtr.hs b/src/Foreign/ForeignPtr.hs
deleted file mode 100644
--- a/src/Foreign/ForeignPtr.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.ForeignPtr (
-  module Base
-) where
-import "base" Foreign.ForeignPtr as Base
diff --git a/src/Foreign/ForeignPtr/Safe.hs b/src/Foreign/ForeignPtr/Safe.hs
deleted file mode 100644
--- a/src/Foreign/ForeignPtr/Safe.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Foreign.ForeignPtr.Safe (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Foreign.ForeignPtr.Safe as Base
-#else
-) where
-#endif
diff --git a/src/Foreign/ForeignPtr/Unsafe.hs b/src/Foreign/ForeignPtr/Unsafe.hs
deleted file mode 100644
--- a/src/Foreign/ForeignPtr/Unsafe.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Foreign.ForeignPtr.Unsafe (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Foreign.ForeignPtr.Unsafe as Base
-#else
-) where
-#endif
diff --git a/src/Foreign/Marshal.hs b/src/Foreign/Marshal.hs
deleted file mode 100644
--- a/src/Foreign/Marshal.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.Marshal (
-  module Base
-) where
-import "base" Foreign.Marshal as Base
diff --git a/src/Foreign/Marshal/Alloc.hs b/src/Foreign/Marshal/Alloc.hs
deleted file mode 100644
--- a/src/Foreign/Marshal/Alloc.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.Marshal.Alloc (
-  module Base
-) where
-import "base" Foreign.Marshal.Alloc as Base
diff --git a/src/Foreign/Marshal/Array.hs b/src/Foreign/Marshal/Array.hs
deleted file mode 100644
--- a/src/Foreign/Marshal/Array.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.Marshal.Array (
-  module Base
-) where
-import "base" Foreign.Marshal.Array as Base
diff --git a/src/Foreign/Marshal/Error.hs b/src/Foreign/Marshal/Error.hs
deleted file mode 100644
--- a/src/Foreign/Marshal/Error.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.Marshal.Error (
-  module Base
-) where
-import "base" Foreign.Marshal.Error as Base
diff --git a/src/Foreign/Marshal/Pool.hs b/src/Foreign/Marshal/Pool.hs
deleted file mode 100644
--- a/src/Foreign/Marshal/Pool.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.Marshal.Pool (
-  module Base
-) where
-import "base" Foreign.Marshal.Pool as Base
diff --git a/src/Foreign/Marshal/Safe.hs b/src/Foreign/Marshal/Safe.hs
deleted file mode 100644
--- a/src/Foreign/Marshal/Safe.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Foreign.Marshal.Safe (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Foreign.Marshal.Safe as Base
-#else
-) where
-#endif
diff --git a/src/Foreign/Marshal/Unsafe.hs b/src/Foreign/Marshal/Unsafe.hs
deleted file mode 100644
--- a/src/Foreign/Marshal/Unsafe.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Foreign.Marshal.Unsafe (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Foreign.Marshal.Unsafe as Base
-#else
-) where
-#endif
diff --git a/src/Foreign/Marshal/Utils.hs b/src/Foreign/Marshal/Utils.hs
deleted file mode 100644
--- a/src/Foreign/Marshal/Utils.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.Marshal.Utils (
-  module Base
-) where
-import "base" Foreign.Marshal.Utils as Base
diff --git a/src/Foreign/Ptr.hs b/src/Foreign/Ptr.hs
deleted file mode 100644
--- a/src/Foreign/Ptr.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.Ptr (
-  module Base
-) where
-import "base" Foreign.Ptr as Base
diff --git a/src/Foreign/Safe.hs b/src/Foreign/Safe.hs
deleted file mode 100644
--- a/src/Foreign/Safe.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Foreign.Safe (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" Foreign.Safe as Base
-#else
-) where
-#endif
diff --git a/src/Foreign/StablePtr.hs b/src/Foreign/StablePtr.hs
deleted file mode 100644
--- a/src/Foreign/StablePtr.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.StablePtr (
-  module Base
-) where
-import "base" Foreign.StablePtr as Base
diff --git a/src/Foreign/Storable.hs b/src/Foreign/Storable.hs
deleted file mode 100644
--- a/src/Foreign/Storable.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Foreign.Storable (
-  module Base
-) where
-import "base" Foreign.Storable as Base
diff --git a/src/GHC/Arr.hs b/src/GHC/Arr.hs
deleted file mode 100644
--- a/src/GHC/Arr.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Arr (
-  module Base
-) where
-import "base" GHC.Arr as Base
diff --git a/src/GHC/Base.hs b/src/GHC/Base.hs
deleted file mode 100644
--- a/src/GHC/Base.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Base (
-  module Base
-) where
-import "base" GHC.Base as Base
diff --git a/src/GHC/Conc.hs b/src/GHC/Conc.hs
deleted file mode 100644
--- a/src/GHC/Conc.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Conc (
-  module Base
-) where
-import "base" GHC.Conc as Base
diff --git a/src/GHC/Conc/IO.hs b/src/GHC/Conc/IO.hs
deleted file mode 100644
--- a/src/GHC/Conc/IO.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Conc.IO (
-#if MIN_VERSION_base(4,3,0)
-  module Base
-) where
-import "base" GHC.Conc.IO as Base
-#else
-) where
-#endif
diff --git a/src/GHC/Conc/Signal.hs b/src/GHC/Conc/Signal.hs
deleted file mode 100644
--- a/src/GHC/Conc/Signal.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Conc.Signal (
-#if MIN_VERSION_base(4,3,0)
-  module Base
-) where
-import "base" GHC.Conc.Signal as Base
-#else
-) where
-#endif
diff --git a/src/GHC/Conc/Sync.hs b/src/GHC/Conc/Sync.hs
deleted file mode 100644
--- a/src/GHC/Conc/Sync.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Conc.Sync (
-#if MIN_VERSION_base(4,3,0)
-  module Base
-) where
-import "base" GHC.Conc.Sync as Base
-#else
-) where
-#endif
diff --git a/src/GHC/ConsoleHandler.hs b/src/GHC/ConsoleHandler.hs
deleted file mode 100644
--- a/src/GHC/ConsoleHandler.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-{-# OPTIONS_GHC -fno-warn-dodgy-exports #-}
-{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-module GHC.ConsoleHandler (module Base) where
-import "base" GHC.ConsoleHandler as Base
diff --git a/src/GHC/Constants.hs b/src/GHC/Constants.hs
deleted file mode 100644
--- a/src/GHC/Constants.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Constants (
-  module Base
-) where
-import "base" GHC.Constants as Base
diff --git a/src/GHC/Desugar.hs b/src/GHC/Desugar.hs
deleted file mode 100644
--- a/src/GHC/Desugar.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Desugar (
-  module Base
-) where
-import "base" GHC.Desugar as Base
diff --git a/src/GHC/Enum.hs b/src/GHC/Enum.hs
deleted file mode 100644
--- a/src/GHC/Enum.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Enum (
-  module Base
-) where
-import "base" GHC.Enum as Base
diff --git a/src/GHC/Environment.hs b/src/GHC/Environment.hs
deleted file mode 100644
--- a/src/GHC/Environment.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Environment (
-  module Base
-) where
-import "base" GHC.Environment as Base
diff --git a/src/GHC/Err.hs b/src/GHC/Err.hs
deleted file mode 100644
--- a/src/GHC/Err.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Err (
-  module Base
-) where
-import "base" GHC.Err as Base
diff --git a/src/GHC/Event.hs b/src/GHC/Event.hs
deleted file mode 100644
--- a/src/GHC/Event.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Event (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" GHC.Event as Base
-#else
-) where
-#endif
diff --git a/src/GHC/Exception.hs b/src/GHC/Exception.hs
deleted file mode 100644
--- a/src/GHC/Exception.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-{-# LANGUAGE StandaloneDeriving #-}
-{-# OPTIONS_GHC -fno-warn-orphans #-}
-module GHC.Exception (
-  module Base
-) where
-import "base" GHC.Exception as Base
-import Control.Exception.ErrorCall.EqInstance ()
-
-#if __GLASGOW_HASKELL__ <= 706
-import Prelude
-deriving instance Ord ErrorCall
-#endif
diff --git a/src/GHC/Exception/Compat.hs b/src/GHC/Exception/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/GHC/Exception/Compat.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE StandaloneDeriving #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+module GHC.Exception.Compat (
+  module Base
+) where
+import "base" GHC.Exception as Base
+import Control.Exception.ErrorCall.EqInstance ()
+
+#if __GLASGOW_HASKELL__ <= 706
+import Prelude
+deriving instance Ord ErrorCall
+#endif
diff --git a/src/GHC/Exts.hs b/src/GHC/Exts.hs
deleted file mode 100644
--- a/src/GHC/Exts.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Exts (
-  module Base
-) where
-import "base" GHC.Exts as Base
diff --git a/src/GHC/Fingerprint.hs b/src/GHC/Fingerprint.hs
deleted file mode 100644
--- a/src/GHC/Fingerprint.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Fingerprint (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" GHC.Fingerprint as Base
-#else
-) where
-#endif
diff --git a/src/GHC/Fingerprint/Type.hs b/src/GHC/Fingerprint/Type.hs
deleted file mode 100644
--- a/src/GHC/Fingerprint/Type.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Fingerprint.Type (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" GHC.Fingerprint.Type as Base
-#else
-) where
-#endif
diff --git a/src/GHC/Float.hs b/src/GHC/Float.hs
deleted file mode 100644
--- a/src/GHC/Float.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Float (
-  module Base
-) where
-import "base" GHC.Float as Base
diff --git a/src/GHC/Float/ConversionUtils.hs b/src/GHC/Float/ConversionUtils.hs
deleted file mode 100644
--- a/src/GHC/Float/ConversionUtils.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Float.ConversionUtils (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" GHC.Float.ConversionUtils as Base
-#else
-) where
-#endif
diff --git a/src/GHC/Float/RealFracMethods.hs b/src/GHC/Float/RealFracMethods.hs
deleted file mode 100644
--- a/src/GHC/Float/RealFracMethods.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Float.RealFracMethods (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" GHC.Float.RealFracMethods as Base
-#else
-) where
-#endif
diff --git a/src/GHC/Foreign.hs b/src/GHC/Foreign.hs
deleted file mode 100644
--- a/src/GHC/Foreign.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Foreign (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" GHC.Foreign as Base
-#else
-) where
-#endif
diff --git a/src/GHC/ForeignPtr.hs b/src/GHC/ForeignPtr.hs
deleted file mode 100644
--- a/src/GHC/ForeignPtr.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.ForeignPtr (
-  module Base
-) where
-import "base" GHC.ForeignPtr as Base
diff --git a/src/GHC/IO.hs b/src/GHC/IO.hs
deleted file mode 100644
--- a/src/GHC/IO.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO (
-  module Base
-) where
-import "base" GHC.IO as Base
diff --git a/src/GHC/IO/Buffer.hs b/src/GHC/IO/Buffer.hs
deleted file mode 100644
--- a/src/GHC/IO/Buffer.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Buffer (
-  module Base
-) where
-import "base" GHC.IO.Buffer as Base
diff --git a/src/GHC/IO/BufferedIO.hs b/src/GHC/IO/BufferedIO.hs
deleted file mode 100644
--- a/src/GHC/IO/BufferedIO.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.BufferedIO (
-  module Base
-) where
-import "base" GHC.IO.BufferedIO as Base
diff --git a/src/GHC/IO/Device.hs b/src/GHC/IO/Device.hs
deleted file mode 100644
--- a/src/GHC/IO/Device.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Device (
-  module Base
-) where
-import "base" GHC.IO.Device as Base
diff --git a/src/GHC/IO/Encoding.hs b/src/GHC/IO/Encoding.hs
deleted file mode 100644
--- a/src/GHC/IO/Encoding.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Encoding (
-  module Base
-) where
-import "base" GHC.IO.Encoding as Base
diff --git a/src/GHC/IO/Encoding/CodePage.hs b/src/GHC/IO/Encoding/CodePage.hs
deleted file mode 100644
--- a/src/GHC/IO/Encoding/CodePage.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-{-# OPTIONS_GHC -fno-warn-dodgy-exports #-}
-{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-module GHC.IO.Encoding.CodePage (module Base) where
-import "base" GHC.IO.Encoding.CodePage as Base
diff --git a/src/GHC/IO/Encoding/Failure.hs b/src/GHC/IO/Encoding/Failure.hs
deleted file mode 100644
--- a/src/GHC/IO/Encoding/Failure.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.IO.Encoding.Failure (
-#if MIN_VERSION_base(4,4,0)
-  module Base
-) where
-import "base" GHC.IO.Encoding.Failure as Base
-#else
-) where
-#endif
diff --git a/src/GHC/IO/Encoding/Iconv.hs b/src/GHC/IO/Encoding/Iconv.hs
deleted file mode 100644
--- a/src/GHC/IO/Encoding/Iconv.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Encoding.Iconv (
-  module Base
-) where
-import "base" GHC.IO.Encoding.Iconv as Base
diff --git a/src/GHC/IO/Encoding/Latin1.hs b/src/GHC/IO/Encoding/Latin1.hs
deleted file mode 100644
--- a/src/GHC/IO/Encoding/Latin1.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Encoding.Latin1 (
-  module Base
-) where
-import "base" GHC.IO.Encoding.Latin1 as Base
diff --git a/src/GHC/IO/Encoding/Types.hs b/src/GHC/IO/Encoding/Types.hs
deleted file mode 100644
--- a/src/GHC/IO/Encoding/Types.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Encoding.Types (
-  module Base
-) where
-import "base" GHC.IO.Encoding.Types as Base
diff --git a/src/GHC/IO/Encoding/UTF16.hs b/src/GHC/IO/Encoding/UTF16.hs
deleted file mode 100644
--- a/src/GHC/IO/Encoding/UTF16.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Encoding.UTF16 (
-  module Base
-) where
-import "base" GHC.IO.Encoding.UTF16 as Base
diff --git a/src/GHC/IO/Encoding/UTF32.hs b/src/GHC/IO/Encoding/UTF32.hs
deleted file mode 100644
--- a/src/GHC/IO/Encoding/UTF32.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Encoding.UTF32 (
-  module Base
-) where
-import "base" GHC.IO.Encoding.UTF32 as Base
diff --git a/src/GHC/IO/Encoding/UTF8.hs b/src/GHC/IO/Encoding/UTF8.hs
deleted file mode 100644
--- a/src/GHC/IO/Encoding/UTF8.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Encoding.UTF8 (
-  module Base
-) where
-import "base" GHC.IO.Encoding.UTF8 as Base
diff --git a/src/GHC/IO/Exception.hs b/src/GHC/IO/Exception.hs
deleted file mode 100644
--- a/src/GHC/IO/Exception.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Exception (
-  module Base
-) where
-import "base" GHC.IO.Exception as Base
diff --git a/src/GHC/IO/FD.hs b/src/GHC/IO/FD.hs
deleted file mode 100644
--- a/src/GHC/IO/FD.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.FD (
-  module Base
-) where
-import "base" GHC.IO.FD as Base
diff --git a/src/GHC/IO/Handle.hs b/src/GHC/IO/Handle.hs
deleted file mode 100644
--- a/src/GHC/IO/Handle.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Handle (
-  module Base
-) where
-import "base" GHC.IO.Handle as Base
diff --git a/src/GHC/IO/Handle/FD.hs b/src/GHC/IO/Handle/FD.hs
deleted file mode 100644
--- a/src/GHC/IO/Handle/FD.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Handle.FD (
-  module Base
-) where
-import "base" GHC.IO.Handle.FD as Base
diff --git a/src/GHC/IO/Handle/Internals.hs b/src/GHC/IO/Handle/Internals.hs
deleted file mode 100644
--- a/src/GHC/IO/Handle/Internals.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Handle.Internals (
-  module Base
-) where
-import "base" GHC.IO.Handle.Internals as Base
diff --git a/src/GHC/IO/Handle/Text.hs b/src/GHC/IO/Handle/Text.hs
deleted file mode 100644
--- a/src/GHC/IO/Handle/Text.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Handle.Text (
-  module Base
-) where
-import "base" GHC.IO.Handle.Text as Base
diff --git a/src/GHC/IO/Handle/Types.hs b/src/GHC/IO/Handle/Types.hs
deleted file mode 100644
--- a/src/GHC/IO/Handle/Types.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.Handle.Types (
-  module Base
-) where
-import "base" GHC.IO.Handle.Types as Base
diff --git a/src/GHC/IO/IOMode.hs b/src/GHC/IO/IOMode.hs
deleted file mode 100644
--- a/src/GHC/IO/IOMode.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IO.IOMode (
-  module Base
-) where
-import "base" GHC.IO.IOMode as Base
diff --git a/src/GHC/IOArray.hs b/src/GHC/IOArray.hs
deleted file mode 100644
--- a/src/GHC/IOArray.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IOArray (
-  module Base
-) where
-import "base" GHC.IOArray as Base
diff --git a/src/GHC/IORef.hs b/src/GHC/IORef.hs
deleted file mode 100644
--- a/src/GHC/IORef.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.IORef (
-  module Base
-) where
-import "base" GHC.IORef as Base
diff --git a/src/GHC/Int.hs b/src/GHC/Int.hs
deleted file mode 100644
--- a/src/GHC/Int.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Int (
-  module Base
-) where
-import "base" GHC.Int as Base
diff --git a/src/GHC/List.hs b/src/GHC/List.hs
deleted file mode 100644
--- a/src/GHC/List.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.List (
-  module Base
-) where
-import "base" GHC.List as Base
diff --git a/src/GHC/MVar.hs b/src/GHC/MVar.hs
deleted file mode 100644
--- a/src/GHC/MVar.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.MVar (
-  module Base
-) where
-import "base" GHC.MVar as Base
diff --git a/src/GHC/Num.hs b/src/GHC/Num.hs
deleted file mode 100644
--- a/src/GHC/Num.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Num (
-  module Base
-) where
-import "base" GHC.Num as Base
diff --git a/src/GHC/PArr.hs b/src/GHC/PArr.hs
deleted file mode 100644
--- a/src/GHC/PArr.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.PArr (
-  module Base
-) where
-import "base" GHC.PArr as Base
diff --git a/src/GHC/Pack.hs b/src/GHC/Pack.hs
deleted file mode 100644
--- a/src/GHC/Pack.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Pack (
-  module Base
-) where
-import "base" GHC.Pack as Base
diff --git a/src/GHC/Ptr.hs b/src/GHC/Ptr.hs
deleted file mode 100644
--- a/src/GHC/Ptr.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Ptr (
-  module Base
-) where
-import "base" GHC.Ptr as Base
diff --git a/src/GHC/Read.hs b/src/GHC/Read.hs
deleted file mode 100644
--- a/src/GHC/Read.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Read (
-  module Base
-) where
-import "base" GHC.Read as Base
diff --git a/src/GHC/Real.hs b/src/GHC/Real.hs
deleted file mode 100644
--- a/src/GHC/Real.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Real (
-  module Base
-) where
-import "base" GHC.Real as Base
diff --git a/src/GHC/ST.hs b/src/GHC/ST.hs
deleted file mode 100644
--- a/src/GHC/ST.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.ST (
-  module Base
-) where
-import "base" GHC.ST as Base
diff --git a/src/GHC/STRef.hs b/src/GHC/STRef.hs
deleted file mode 100644
--- a/src/GHC/STRef.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.STRef (
-  module Base
-) where
-import "base" GHC.STRef as Base
diff --git a/src/GHC/Show.hs b/src/GHC/Show.hs
deleted file mode 100644
--- a/src/GHC/Show.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Show (
-  module Base
-) where
-import "base" GHC.Show as Base
diff --git a/src/GHC/Stable.hs b/src/GHC/Stable.hs
deleted file mode 100644
--- a/src/GHC/Stable.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Stable (
-  module Base
-) where
-import "base" GHC.Stable as Base
diff --git a/src/GHC/Stack.hs b/src/GHC/Stack.hs
deleted file mode 100644
--- a/src/GHC/Stack.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Stack (
-#if MIN_VERSION_base(4,5,0)
-  module Base
-) where
-import "base" GHC.Stack as Base
-#else
-) where
-#endif
diff --git a/src/GHC/Stats.hs b/src/GHC/Stats.hs
deleted file mode 100644
--- a/src/GHC/Stats.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module GHC.Stats (
-#if MIN_VERSION_base(4,5,0)
-  module Base
-) where
-import "base" GHC.Stats as Base
-#else
-) where
-#endif
diff --git a/src/GHC/Storable.hs b/src/GHC/Storable.hs
deleted file mode 100644
--- a/src/GHC/Storable.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Storable (
-  module Base
-) where
-import "base" GHC.Storable as Base
diff --git a/src/GHC/TopHandler.hs b/src/GHC/TopHandler.hs
deleted file mode 100644
--- a/src/GHC/TopHandler.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.TopHandler (
-  module Base
-) where
-import "base" GHC.TopHandler as Base
diff --git a/src/GHC/Unicode.hs b/src/GHC/Unicode.hs
deleted file mode 100644
--- a/src/GHC/Unicode.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Unicode (
-  module Base
-) where
-import "base" GHC.Unicode as Base
diff --git a/src/GHC/Weak.hs b/src/GHC/Weak.hs
deleted file mode 100644
--- a/src/GHC/Weak.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Weak (
-  module Base
-) where
-import "base" GHC.Weak as Base
diff --git a/src/GHC/Word.hs b/src/GHC/Word.hs
deleted file mode 100644
--- a/src/GHC/Word.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module GHC.Word (
-  module Base
-) where
-import "base" GHC.Word as Base
diff --git a/src/Numeric.hs b/src/Numeric.hs
deleted file mode 100644
--- a/src/Numeric.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Numeric (
-  module Base
-) where
-import "base" Numeric as Base
diff --git a/src/Prelude.hs b/src/Prelude.hs
deleted file mode 100644
--- a/src/Prelude.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Prelude (
-  module Base
-) where
-#if MIN_VERSION_base(4,6,0)
-import "base" Prelude as Base
-#else
-import "base" Prelude as Base hiding (catch)
-#endif
diff --git a/src/Prelude/Compat.hs b/src/Prelude/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Prelude/Compat.hs
@@ -0,0 +1,8 @@
+module Prelude.Compat (
+  module Base
+) where
+#if MIN_VERSION_base(4,6,0)
+import "base" Prelude as Base
+#else
+import "base" Prelude as Base hiding (catch)
+#endif
diff --git a/src/System/CPUTime.hs b/src/System/CPUTime.hs
deleted file mode 100644
--- a/src/System/CPUTime.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.CPUTime (
-  module Base
-) where
-import "base" System.CPUTime as Base
diff --git a/src/System/Console/GetOpt.hs b/src/System/Console/GetOpt.hs
deleted file mode 100644
--- a/src/System/Console/GetOpt.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.Console.GetOpt (
-  module Base
-) where
-import "base" System.Console.GetOpt as Base
diff --git a/src/System/Environment.hs b/src/System/Environment.hs
deleted file mode 100644
--- a/src/System/Environment.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module System.Environment (
-  module Base
-, lookupEnv
-) where
-
-import "base" System.Environment as Base
-
-#if !MIN_VERSION_base(4,6,0)
-import Prelude
--- | Return the value of the environment variable @var@, or @Nothing@ if
--- there is no such value.
---
--- For POSIX users, this is equivalent to 'System.Posix.Env.getEnv'.
-lookupEnv :: String -> IO (Maybe String)
-lookupEnv k = lookup k `fmap` getEnvironment
-#endif
diff --git a/src/System/Environment/Compat.hs b/src/System/Environment/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/System/Environment/Compat.hs
@@ -0,0 +1,16 @@
+module System.Environment.Compat (
+  module Base
+, lookupEnv
+) where
+
+import "base" System.Environment as Base
+
+#if !MIN_VERSION_base(4,6,0)
+import Prelude
+-- | Return the value of the environment variable @var@, or @Nothing@ if
+-- there is no such value.
+--
+-- For POSIX users, this is equivalent to 'System.Posix.Env.getEnv'.
+lookupEnv :: String -> IO (Maybe String)
+lookupEnv k = lookup k `fmap` getEnvironment
+#endif
diff --git a/src/System/Exit.hs b/src/System/Exit.hs
deleted file mode 100644
--- a/src/System/Exit.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.Exit (
-  module Base
-) where
-import "base" System.Exit as Base
diff --git a/src/System/IO.hs b/src/System/IO.hs
deleted file mode 100644
--- a/src/System/IO.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.IO (
-  module Base
-) where
-import "base" System.IO as Base
diff --git a/src/System/IO/Error.hs b/src/System/IO/Error.hs
deleted file mode 100644
--- a/src/System/IO/Error.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.IO.Error (
-  module Base
-) where
-import "base" System.IO.Error as Base
diff --git a/src/System/IO/Unsafe.hs b/src/System/IO/Unsafe.hs
deleted file mode 100644
--- a/src/System/IO/Unsafe.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.IO.Unsafe (
-  module Base
-) where
-import "base" System.IO.Unsafe as Base
diff --git a/src/System/Info.hs b/src/System/Info.hs
deleted file mode 100644
--- a/src/System/Info.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.Info (
-  module Base
-) where
-import "base" System.Info as Base
diff --git a/src/System/Mem.hs b/src/System/Mem.hs
deleted file mode 100644
--- a/src/System/Mem.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.Mem (
-  module Base
-) where
-import "base" System.Mem as Base
diff --git a/src/System/Mem/StableName.hs b/src/System/Mem/StableName.hs
deleted file mode 100644
--- a/src/System/Mem/StableName.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.Mem.StableName (
-  module Base
-) where
-import "base" System.Mem.StableName as Base
diff --git a/src/System/Mem/Weak.hs b/src/System/Mem/Weak.hs
deleted file mode 100644
--- a/src/System/Mem/Weak.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.Mem.Weak (
-  module Base
-) where
-import "base" System.Mem.Weak as Base
diff --git a/src/System/Posix/Internals.hs b/src/System/Posix/Internals.hs
deleted file mode 100644
--- a/src/System/Posix/Internals.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.Posix.Internals (
-  module Base
-) where
-import "base" System.Posix.Internals as Base
diff --git a/src/System/Posix/Types.hs b/src/System/Posix/Types.hs
deleted file mode 100644
--- a/src/System/Posix/Types.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.Posix.Types (
-  module Base
-) where
-import "base" System.Posix.Types as Base
diff --git a/src/System/Timeout.hs b/src/System/Timeout.hs
deleted file mode 100644
--- a/src/System/Timeout.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module System.Timeout (
-  module Base
-) where
-import "base" System.Timeout as Base
diff --git a/src/Text/ParserCombinators/ReadP.hs b/src/Text/ParserCombinators/ReadP.hs
deleted file mode 100644
--- a/src/Text/ParserCombinators/ReadP.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Text.ParserCombinators.ReadP (
-  module Base
-) where
-import "base" Text.ParserCombinators.ReadP as Base
diff --git a/src/Text/ParserCombinators/ReadPrec.hs b/src/Text/ParserCombinators/ReadPrec.hs
deleted file mode 100644
--- a/src/Text/ParserCombinators/ReadPrec.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Text.ParserCombinators.ReadPrec (
-  module Base
-) where
-import "base" Text.ParserCombinators.ReadPrec as Base
diff --git a/src/Text/Printf.hs b/src/Text/Printf.hs
deleted file mode 100644
--- a/src/Text/Printf.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Text.Printf (
-  module Base
-) where
-import "base" Text.Printf as Base
diff --git a/src/Text/Read.hs b/src/Text/Read.hs
deleted file mode 100644
--- a/src/Text/Read.hs
+++ /dev/null
@@ -1,33 +0,0 @@
-module Text.Read (
-  module Base
-, readEither
-, readMaybe
-) where
-import "base" Text.Read as Base
-
-#if !MIN_VERSION_base(4,6,0)
-import qualified Text.ParserCombinators.ReadP as P
-import Prelude
-
--- | Parse a string using the 'Read' instance.
--- Succeeds if there is exactly one valid result.
--- A 'Left' value indicates a parse error.
-readEither :: Read a => String -> Either String a
-readEither s =
-  case [ x | (x,"") <- readPrec_to_S read' minPrec s ] of
-    [x] -> Right x
-    []  -> Left "Prelude.read: no parse"
-    _   -> Left "Prelude.read: ambiguous parse"
- where
-  read' =
-    do x <- readPrec
-       lift P.skipSpaces
-       return x
-
--- | Parse a string using the 'Read' instance.
--- Succeeds if there is exactly one valid result.
-readMaybe :: Read a => String -> Maybe a
-readMaybe s = case readEither s of
-                Left _  -> Nothing
-                Right a -> Just a
-#endif
diff --git a/src/Text/Read/Compat.hs b/src/Text/Read/Compat.hs
new file mode 100644
--- /dev/null
+++ b/src/Text/Read/Compat.hs
@@ -0,0 +1,33 @@
+module Text.Read.Compat (
+  module Base
+, readEither
+, readMaybe
+) where
+import "base" Text.Read as Base
+
+#if !MIN_VERSION_base(4,6,0)
+import qualified Text.ParserCombinators.ReadP as P
+import Prelude
+
+-- | Parse a string using the 'Read' instance.
+-- Succeeds if there is exactly one valid result.
+-- A 'Left' value indicates a parse error.
+readEither :: Read a => String -> Either String a
+readEither s =
+  case [ x | (x,"") <- readPrec_to_S read' minPrec s ] of
+    [x] -> Right x
+    []  -> Left "Prelude.read: no parse"
+    _   -> Left "Prelude.read: ambiguous parse"
+ where
+  read' =
+    do x <- readPrec
+       lift P.skipSpaces
+       return x
+
+-- | Parse a string using the 'Read' instance.
+-- Succeeds if there is exactly one valid result.
+readMaybe :: Read a => String -> Maybe a
+readMaybe s = case readEither s of
+                Left _  -> Nothing
+                Right a -> Just a
+#endif
diff --git a/src/Text/Read/Lex.hs b/src/Text/Read/Lex.hs
deleted file mode 100644
--- a/src/Text/Read/Lex.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Text.Read.Lex (
-  module Base
-) where
-import "base" Text.Read.Lex as Base
diff --git a/src/Text/Show.hs b/src/Text/Show.hs
deleted file mode 100644
--- a/src/Text/Show.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Text.Show (
-  module Base
-) where
-import "base" Text.Show as Base
diff --git a/src/Text/Show/Functions.hs b/src/Text/Show/Functions.hs
deleted file mode 100644
--- a/src/Text/Show/Functions.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-{-# OPTIONS_GHC -fno-warn-dodgy-exports #-}
-{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-module Text.Show.Functions (module Base) where
-import "base" Text.Show.Functions as Base
diff --git a/src/Unsafe/Coerce.hs b/src/Unsafe/Coerce.hs
deleted file mode 100644
--- a/src/Unsafe/Coerce.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module Unsafe.Coerce (
-  module Base
-) where
-import "base" Unsafe.Coerce as Base
