diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
+2018-01-06  John D. Ramsdell  <ramsdell@mitre.org>
+
+	* src/Algebra/CommutativeMonad/Main.hs (readM): Adapted the code
+	to work when Monad no longer has a fail method.
+
 2015-04-27  John D. Ramsdell  <ramsdell@mitre.org>
 
-	* src/Algebra/AbelianGroup/Main.hs (AnsErr): Added Functor and
+	* src/Algebra/CommutativeMonad/Main.hs (AnsErr): Added Functor and
 	Applicative instance so that the code compiles with GHC 7.10.
 	Thanks go to Douglas McClean.
 
diff --git a/cmu.cabal b/cmu.cabal
--- a/cmu.cabal
+++ b/cmu.cabal
@@ -1,5 +1,5 @@
 Name:			cmu
-Version:		1.10
+Version:		1.11
 Maintainer:		ramsdell@mitre.org
 Cabal-Version:		>= 1.6
 License:		GPL
diff --git a/src/Algebra/CommutativeMonoid/Main.hs b/src/Algebra/CommutativeMonoid/Main.hs
--- a/src/Algebra/CommutativeMonoid/Main.hs
+++ b/src/Algebra/CommutativeMonoid/Main.hs
@@ -17,7 +17,7 @@
 
 module Main (main, test) where
 
-import Control.Applicative
+import qualified Control.Monad.Fail as Fail
 import System.IO (isEOF, hFlush, stdout)
 import Algebra.CommutativeMonoid.Unification
 
@@ -37,12 +37,12 @@
             print subst
             putStrLn ""
 
-readM :: (Read a, Monad m) => String -> m a
+readM :: (Read a, Fail.MonadFail m) => String -> m a
 readM s =
     case [ x | (x, t) <- reads s, ("", "") <- lex t ] of
       [x] -> return x
-      [] -> fail "no parse"
-      _ -> fail "ambiguous parse"
+      [] -> Fail.fail "no parse"
+      _ -> Fail.fail "ambiguous parse"
 
 -- Like Either String but with fail method defined
 data AnsErr a
@@ -62,6 +62,8 @@
     (Ans x) >>= k = k x
     (Err s) >>= _ = Err s
     return        = Ans
+
+instance Fail.MonadFail AnsErr where
     fail          = Err         -- fail is Err
 
 -- Main loop
