diff --git a/library/Neovim/Compat/Megaparsec.hs b/library/Neovim/Compat/Megaparsec.hs
--- a/library/Neovim/Compat/Megaparsec.hs
+++ b/library/Neovim/Compat/Megaparsec.hs
@@ -2,6 +2,7 @@
 module Neovim.Compat.Megaparsec
     ( Parser
     , module X
+    , anyChar
     ) where
 
 
@@ -19,3 +20,9 @@
 import           Text.Megaparsec.String as X
 
 #endif
+
+#if MIN_VERSION_megaparsec(7,0,0)
+anyChar :: Parser Char
+anyChar = anySingle
+#endif
+
diff --git a/library/Neovim/Context/Internal.hs b/library/Neovim/Context/Internal.hs
--- a/library/Neovim/Context/Internal.hs
+++ b/library/Neovim/Context/Internal.hs
@@ -46,6 +46,7 @@
                                                             viaShow)
 import           Data.Text.Prettyprint.Doc.Render.Terminal (AnsiStyle)
 
+import qualified Control.Monad.Fail as Fail
 import           Prelude
 
 
@@ -79,6 +80,11 @@
 instance MonadUnliftIO (Neovim env) where
     askUnliftIO = Neovim . withUnliftIO $ \x ->
         return (UnliftIO (unliftIO x . unNeovim))
+
+
+instance Fail.MonadFail (Neovim env) where
+  fail = throwIO . ErrorMessage . pretty
+
 
 -- | Same as 'ask' for the 'InternalConfig'.
 ask' :: Neovim env (Config env)
diff --git a/nvim-hs.cabal b/nvim-hs.cabal
--- a/nvim-hs.cabal
+++ b/nvim-hs.cabal
@@ -1,5 +1,5 @@
 name:                nvim-hs
-version:             1.0.0.2
+version:             1.0.0.3
 synopsis:            Haskell plugin backend for neovim
 description:
   This package provides a plugin provider for neovim. It allows you to write
@@ -26,7 +26,7 @@
 license-file:        LICENSE
 author:              Sebastian Witte
 maintainer:          woozletoff@gmail.com
-copyright:           Copyright 2017 Sebastian Witte <woozletoff@gmail.com>
+copyright:           Copyright 2017-2018 Sebastian Witte <woozletoff@gmail.com>
 category:            Editor
 build-type:          Simple
 cabal-version:       >=1.18
@@ -55,7 +55,7 @@
   main-is:              Main.hs
   hs-source-dirs:       executable
   default-language:     Haskell2010
-  build-depends:        base >=4.6 && <5, nvim-hs, data-default
+  build-depends:        base >=4.9 && <5, nvim-hs, data-default
   ghc-options:          -threaded -rtsopts -with-rtsopts=-N
 
 library
@@ -94,7 +94,7 @@
                       , Neovim.API.Parser
                       , Neovim.API.TH
   other-extensions:     DeriveGeneric
-  build-depends:        base >=4.6 && < 5
+  build-depends:        base >=4.9 && < 5
                       , bytestring
                       , cereal
                       , cereal-conduit >= 0.8.0
@@ -112,7 +112,7 @@
                       , mtl >= 2.2.1 && < 2.3
                       , optparse-applicative
                       , time-locale-compat
-                      , megaparsec
+                      , megaparsec < 8
                       , prettyprinter >= 1.2 && < 2
                       , prettyprinter-ansi-terminal
                       , process
