diff --git a/ede.cabal b/ede.cabal
--- a/ede.cabal
+++ b/ede.cabal
@@ -1,5 +1,5 @@
 name:                  ede
-version:               0.2.8.7
+version:               0.2.9
 synopsis:              Templating language with similar syntax and features to Liquid or Jinja2.
 homepage:              http://github.com/brendanhay/ede
 license:               OtherLicense
diff --git a/src/Text/EDE.hs b/src/Text/EDE.hs
--- a/src/Text/EDE.hs
+++ b/src/Text/EDE.hs
@@ -471,7 +471,7 @@
 --
 -- In the case of a literal it conforms directly to the supported boolean or relation logical
 -- operators from Haskell.
--- If a variable is singuarly used its existence determines the result of the predicate,
+-- If a variable is singularly used its existence determines the result of the predicate;
 -- the exception to this rule is boolean values which will be substituted into the
 -- expression if they exist in the supplied environment.
 --
diff --git a/src/Text/EDE/Internal/Types.hs b/src/Text/EDE/Internal/Types.hs
--- a/src/Text/EDE/Internal/Types.hs
+++ b/src/Text/EDE/Internal/Types.hs
@@ -42,6 +42,10 @@
 import           Text.PrettyPrint.ANSI.Leijen (Doc, Pretty (..))
 import qualified Text.PrettyPrint.ANSI.Leijen as PP
 import           Text.Trifecta.Delta
+#if MIN_VERSION_base(4,9,0)
+import qualified Data.List                    as List
+import qualified Data.Functor.Classes         as FunctorClasses
+#endif
 
 -- | Convenience wrapper for Pretty instances.
 newtype PP a = PP { unPP :: a }
@@ -186,6 +190,19 @@
     | ELoop !Id !a !a
     | EIncl !Text
       deriving (Eq, Show, Functor)
+#if MIN_VERSION_base(4,9,0)
+instance FunctorClasses.Eq1 ExpF where
+    liftEq _ (ELit a) (ELit b) = a == b
+    liftEq _ (EVar a) (EVar b) = a == b
+    liftEq _ (EFun a) (EFun b) = a == b
+    liftEq c (EApp a1 a2) (EApp b1 b2) = a1 `c` b1 && a2 `c` b2
+    liftEq c (ELet a0 a1 a2) (ELet b0 b1 b2) = a0 == b0 && a1 `c` b1 && a2 `c` b2
+    liftEq c (ECase a as) (ECase b bs) = a `c` b && (List.all (uncurry altEq) $ zip as bs)
+        where altEq (pA, a') (pB, b') = pA == pB && a' `c` b'
+    liftEq c (ELoop a0 a1 a2) (ELoop b0 b1 b2) = a0 == b0 && a1 `c` b1 && a2 `c` b2
+    liftEq _ (EIncl a) (EIncl b) = a == b
+    liftEq _ _ _ = False
+#endif
 
 type Exp = Cofree ExpF
 
