diff --git a/System/Console/Haskeline/Backend/IConv.hsc b/System/Console/Haskeline/Backend/IConv.hsc
--- a/System/Console/Haskeline/Backend/IConv.hsc
+++ b/System/Console/Haskeline/Backend/IConv.hsc
@@ -65,8 +65,8 @@
 foreign import ccall "setlocale" c_setlocale :: CInt -> CString -> IO CString
 
 setLocale :: Maybe String -> IO (Maybe String)
-setLocale oldLocale = (maybeWith withCString) oldLocale $ \loc_p -> do
-    c_setlocale (#const LC_CTYPE) loc_p >>= maybePeek peekCString
+setLocale oldLocale = (maybeWith withCAString) oldLocale $ \loc_p -> do
+    c_setlocale (#const LC_CTYPE) loc_p >>= maybePeek peekCAString
 
 -----------------
 -- Getting the encoding
@@ -77,7 +77,7 @@
 
 getCodeset :: IO String
 getCodeset = do
-    str <- nl_langinfo (#const CODESET) >>= peekCString
+    str <- nl_langinfo (#const CODESET) >>= peekCAString
     -- check for codesets which may be returned by Solaris, but not understood
     -- by GNU iconv.
     if str `elem` ["","646"]
@@ -95,8 +95,8 @@
     :: CString -> CString -> IO IConvTPtr
 
 iconvOpen :: String -> String -> IO IConvT
-iconvOpen destName srcName = withCString destName $ \dest ->
-                            withCString srcName $ \src -> do
+iconvOpen destName srcName = withCAString destName $ \dest ->
+                            withCAString srcName $ \src -> do
                                 res <- iconv_open dest src
                                 if res == nullPtr `plusPtr` (-1)
                                     then throwErrno $ "iconvOpen "
diff --git a/haskeline.cabal b/haskeline.cabal
--- a/haskeline.cabal
+++ b/haskeline.cabal
@@ -1,6 +1,6 @@
 Name:           haskeline
 Cabal-Version:  >=1.6
-Version:        0.6.4.1
+Version:        0.6.4.2
 Category:       User Interfaces
 License:        BSD3
 License-File:   LICENSE
@@ -67,8 +67,10 @@
                 ScopedTypeVariables, GeneralizedNewtypeDeriving
                 MultiParamTypeClasses, OverlappingInstances
                 UndecidableInstances
-                ScopedTypeVariables, CPP, DeriveDataTypeable,
+                PatternSignatures, CPP, DeriveDataTypeable,
                 PatternGuards
+    if impl(ghc >= 7.1)
+        Extensions: NondecreasingIndentation
     Exposed-Modules:
                 System.Console.Haskeline
                 System.Console.Haskeline.Completion
