diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+### 0.1.3 [2017.03.15]
+* Fix the build on GHC 7.8 and older
+
 ### 0.1.2 [2017.02.20]
 * Squash minor bug in fixCodePage (the same bug reported in
   https://github.com/commercialhaskell/stack/pull/3002)
diff --git a/code-page.cabal b/code-page.cabal
--- a/code-page.cabal
+++ b/code-page.cabal
@@ -1,5 +1,5 @@
 name:                code-page
-version:             0.1.2
+version:             0.1.3
 synopsis:            Windows code page library for Haskell
 description:         This library provides two modules:
                      .
diff --git a/src/System/IO/CodePage.hs b/src/System/IO/CodePage.hs
--- a/src/System/IO/CodePage.hs
+++ b/src/System/IO/CodePage.hs
@@ -31,6 +31,7 @@
 #ifdef WINDOWS
 import           Control.Exception (bracket_)
 import           Control.Monad (when)
+import           Data.Foldable (forM_)
 import           System.IO (hGetEncoding, hPutStrLn, hSetEncoding, stderr, stdin, stdout)
 import qualified System.Win32.CodePage as Win32 (CodePage)
 import           System.Win32.CodePage hiding (CodePage)
@@ -116,7 +117,7 @@
                     )
                 (do
                     setConsoleCP origCPI
-                    mapM_ (hSetEncoding stdin) mbOrigStdinEnc
+                    forM_ mbOrigStdinEnc $ hSetEncoding stdin
                     )
             | otherwise = id
         fixOutput
@@ -128,8 +129,8 @@
                     )
                 (do
                     setConsoleOutputCP origCPO
-                    mapM_ (hSetEncoding stdout) mbOrigStdoutEnc
-                    mapM_ (hSetEncoding stderr) mbOrigStderrEnc
+                    forM_ mbOrigStdoutEnc $ hSetEncoding stdout
+                    forM_ mbOrigStderrEnc $ hSetEncoding stderr
                     )
             | otherwise = id
 
