diff --git a/Shellac-haskeline.cabal b/Shellac-haskeline.cabal
--- a/Shellac-haskeline.cabal
+++ b/Shellac-haskeline.cabal
@@ -1,6 +1,6 @@
 Name:           Shellac-haskeline
 Cabal-Version:  >=1.6
-Version:        0.2.0.1
+Version:        0.2.0.2
 Category:       User Interfaces
 License:        BSD3
 License-File:   LICENSE
@@ -16,9 +16,8 @@
 Build-Type:     Simple
 
 Library
-    Build-depends: base>=3 && <5, Shellac==0.9.*, haskeline==0.6.*, 
-                   mtl>=1.1 && < 2.1,
-                   bytestring==0.9.*
+    Build-depends: base>=3 && <5, Shellac==0.9.*, haskeline==0.7.*, 
+                   mtl>=2.0 && < 2.2
     Exposed-Modules:
                 System.Console.Shell.Backend.Haskeline
     ghc-options: -Wall
diff --git a/System/Console/Shell/Backend/Haskeline.hs b/System/Console/Shell/Backend/Haskeline.hs
--- a/System/Console/Shell/Backend/Haskeline.hs
+++ b/System/Console/Shell/Backend/Haskeline.hs
@@ -4,14 +4,12 @@
 
 import System.Console.Shell.Backend
 import System.Console.Haskeline hiding (completeFilename)
-import qualified System.Console.Haskeline.Encoding as Encoding
 import qualified System.Console.Haskeline.History as History
 import System.Console.Haskeline.IO
 import System.IO
 import Data.IORef
 import Control.Monad.State
 import Data.Maybe(fromMaybe)
-import qualified Data.ByteString as B
 
 data ShellacState = ShellacState {
                         inputState :: InputState,
@@ -49,7 +47,7 @@
             getSingleChar = \ss pre -> queryInputState ss $ getInputChar pre,
             getInput = \ss pre -> queryInputState ss $ getInputLine pre,
             addHistory = \ss line -> queryInputState ss 
-                    $ modify $ History.addHistory line,
+                    $ modifyHistory $ History.addHistory line,
             setWordBreakChars = \ss -> writeIORef (wordBreakChars ss),
             getWordBreakChars = readIORef . wordBreakChars,
             onCancel = cancelInput . inputState,
@@ -57,15 +55,16 @@
             setDefaultCompletionFunction = \ss -> writeIORef (defaultCompleter ss),
             completeFilename = \_ -> fmap (map replacement) . listFiles,
             completeUsername = \_ _ -> return [],
-            clearHistoryState = \ss -> queryInputState ss $ put History.emptyHistory,
+            clearHistoryState = \ss -> queryInputState ss $ putHistory History.emptyHistory,
             setMaxHistoryEntries = \ss n -> let
                         stifle = if n < 0 then Nothing else Just n
-                        in queryInputState ss $ modify $ History.stifleHistory stifle,
-            getMaxHistoryEntries = \ss -> queryInputState ss $ gets
-                                    $ fromMaybe (-1) . History.stifleAmount,
+                        in queryInputState ss $ modifyHistory $ History.stifleHistory stifle,
+            getMaxHistoryEntries = \ss -> queryInputState ss 
+                            $ fmap (fromMaybe (-1) . History.stifleAmount)
+                                getHistory,
             readHistory = \ss file -> History.readHistory file 
-                                >>= queryInputState ss . put,
-            writeHistory = \ss file -> queryInputState ss get 
+                                >>= queryInputState ss . putHistory,
+            writeHistory = \ss file -> queryInputState ss getHistory
                                         >>= History.writeHistory file
             }
 
@@ -73,8 +72,11 @@
 outputter :: BackendOutput -> InputT IO ()
 outputter (RegularOutput str) = outputStr str
 outputter (InfoOutput str) = outputStr str
-outputter (ErrorOutput str) = Encoding.encode str
-                                >>= liftIO . B.hPutStr stderr
+-- Haskeline has no way to directly write to stderr.
+-- (outputStr may or may not go to the tty, depending on whether
+-- we're running in interactive or file mode.)
+-- So instead, we just use hPutStr and rely on ghc>=6.12's I/O encoding.
+outputter (ErrorOutput str) = liftIO $ hPutStr stderr str
 
 
 wrapShellacCompleter :: String -> CompletionFunction -> Maybe (String -> IO [String])
