diff --git a/fpco-api.cabal b/fpco-api.cabal
--- a/fpco-api.cabal
+++ b/fpco-api.cabal
@@ -1,5 +1,5 @@
 name:          fpco-api
-version:       1.2.0.4
+version:       1.2.0.5
 synopsis:      Simple interface to the FP Complete IDE API.
 description:   A server and library for communicating with the FP Complete IDE API.
 homepage:      https://www.fpcomplete.com/page/api
diff --git a/src/library/FP/API/Types.hs b/src/library/FP/API/Types.hs
--- a/src/library/FP/API/Types.hs
+++ b/src/library/FP/API/Types.hs
@@ -161,9 +161,16 @@
 instance MonadThrow m => MonadThrow (CanFailT m) where
     throwM = lift . throwM
 
+#if MIN_VERSION_monad_control(1,0,0)
+newtype StCFR m a = StCFR { unStCFR :: StM m (CanFail a) }
+#endif
 instance MonadBaseControl IO m => MonadBaseControl IO (CanFailT m) where
+#if MIN_VERSION_monad_control(1,0,0)
+  type StM (CanFailT m) a = StCFR m a
+#else
   data StM (CanFailT m) a =
       StCFR { unStCFR :: StM m (CanFail a) }
+#endif
   liftBaseWith f = CanFailT $ fmap Success $
       liftBaseWith $ \runInBase ->
           f (\(CanFailT sT) -> liftM StCFR . runInBase $ sT)
