diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
 Changes
 =======
 
+Version 0.6.1.1
+---------------
+
+Fix to build with GHC 7.8 on Windows
+
 Version 0.6.1
 -------------
 
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -47,22 +47,24 @@
 [available](http://github.com/feuerbach/ansi-terminal/tree/master/System/Console/ANSI/Example.hs),
 but for a taste of how the library works try the following code:
 
-    import System.Console.ANSI
+``` haskell
+import System.Console.ANSI
 
-    main = do
-        setCursorPosition 5 0
-        setTitle "ANSI Terminal Short Example"
+main = do
+    setCursorPosition 5 0
+    setTitle "ANSI Terminal Short Example"
 
-        setSGR [ SetConsoleIntensity BoldIntensity
-               , SetColor Foreground Vivid Red
-               ]
-        putStr "Hello"
-        
-        setSGR [ SetConsoleIntensity NormalIntensity
-               , SetColor Foreground Vivid White
-               , SetColor Background Dull Blue
-               ]
-        putStrLn "World!"
+    setSGR [ SetConsoleIntensity BoldIntensity
+           , SetColor Foreground Vivid Red
+           ]
+    putStr "Hello"
+
+    setSGR [ SetConsoleIntensity NormalIntensity
+           , SetColor Foreground Vivid White
+           , SetColor Background Dull Blue
+           ]
+    putStrLn "World!"
+```
 
 ![](images/example.png)
 
diff --git a/System/Console/ANSI/Windows/Foreign.hs b/System/Console/ANSI/Windows/Foreign.hs
--- a/System/Console/ANSI/Windows/Foreign.hs
+++ b/System/Console/ANSI/Windows/Foreign.hs
@@ -45,12 +45,13 @@
 
 import Foreign.StablePtr
 
-import GHC.IOBase (Handle(..), Handle__(..))
-import qualified GHC.IOBase as IOBase (FD) -- Just an Int32
-
 #if __GLASGOW_HASKELL__ >= 612
+import GHC.IO.Handle.Types (Handle(..), Handle__(..))
 import GHC.IO.FD (FD(..)) -- A wrapper around an Int32
 import Data.Typeable
+#else
+import GHC.IOBase (Handle(..), Handle__(..))
+import qualified GHC.IOBase as IOBase (FD) -- Just an Int32
 #endif
 
 
@@ -287,7 +288,11 @@
 
 
 -- This essential function comes from the C runtime system. It is certainly provided by msvcrt, and also seems to be provided by the mingw C library - hurrah!
+#if __GLASGOW_HASKELL__ >= 612
+foreign import ccall unsafe "_get_osfhandle" cget_osfhandle :: CInt -> IO HANDLE
+#else
 foreign import ccall unsafe "_get_osfhandle" cget_osfhandle :: IOBase.FD -> IO HANDLE
+#endif
 
 -- | This bit is all highly dubious.  The problem is that we want to output ANSI to arbitrary Handles rather than forcing
 -- people to use stdout.  However, the Windows ANSI emulator needs a Windows HANDLE to work it's magic, so we need to be able
diff --git a/ansi-terminal.cabal b/ansi-terminal.cabal
--- a/ansi-terminal.cabal
+++ b/ansi-terminal.cabal
@@ -1,5 +1,5 @@
 Name:                ansi-terminal
-Version:             0.6.1
+Version:             0.6.1.1
 Cabal-Version:       >= 1.6
 Category:            User Interfaces
 Synopsis:            Simple ANSI terminal support, with Windows compatibility
