diff --git a/Changelog b/Changelog
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,6 @@
+version 0.3.0.1
+	- compatibility with ghc-8.6.1
+
 version 0.3
 	- drop Control.Monad.Error import in Data.Rewriting.Term.Parse
 	- fix testsuite
diff --git a/src/Data/Rewriting/Substitution/Unify.hs b/src/Data/Rewriting/Substitution/Unify.hs
--- a/src/Data/Rewriting/Substitution/Unify.hs
+++ b/src/Data/Rewriting/Substitution/Unify.hs
@@ -68,11 +68,14 @@
             -- assign term to variable
             UM.merge (\_ _ -> (t', ())) t u
             solve xs
-        _ | funari t' == funari u' -> do
+        _ | funari t' == funari u' ->
             -- matching function applications: expand ...
-            FunA _ ts <- expand t t'
-            FunA _ us <- expand u u'
-            UM.merge (\t _ -> (t, ())) t u
+            -- note: avoid `do` notation because `FunA _ ts` is a "failable"
+            -- pattern and `UnionM` doesn't have a `MonadFail` instance;
+            -- cf. https://wiki.haskell.org/MonadFail_Proposal
+            expand t t' >>= \(FunA _ ts) ->
+            expand u u' >>= \(FunA _ us) ->
+            UM.merge (\t _ -> (t, ())) t u >>
             -- ... and equate the argument lists.
             solve (zip ts us ++ xs)
         _ -> do
diff --git a/term-rewriting.cabal b/term-rewriting.cabal
--- a/term-rewriting.cabal
+++ b/term-rewriting.cabal
@@ -1,5 +1,5 @@
 name:          term-rewriting
-version:       0.3
+version:       0.3.0.1
 stability:     experimental
 author:        Martin Avanzini,
                Bertram Felgenhauer,
