diff --git a/hspec-core.cabal b/hspec-core.cabal
--- a/hspec-core.cabal
+++ b/hspec-core.cabal
@@ -1,9 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.5.4.
+-- This file has been generated from package.yaml by hpack version 0.8.0.
 --
 -- see: https://github.com/sol/hpack
 
 name:             hspec-core
-version:          2.2.1
+version:          2.2.2
 license:          MIT
 license-file:     LICENSE
 copyright:        (c) 2011-2015 Simon Hengel,
diff --git a/src/Test/Hspec/Core/Tree.hs b/src/Test/Hspec/Core/Tree.hs
--- a/src/Test/Hspec/Core/Tree.hs
+++ b/src/Test/Hspec/Core/Tree.hs
@@ -17,7 +17,9 @@
 ) where
 
 #ifdef HAS_SOURCE_LOCATIONS
+#if !MIN_VERSION_base(4,9,0)
 import           GHC.SrcLoc
+#endif
 import           GHC.Stack
 #endif
 
diff --git a/test/Test/Hspec/Core/SpecSpec.hs b/test/Test/Hspec/Core/SpecSpec.hs
--- a/test/Test/Hspec/Core/SpecSpec.hs
+++ b/test/Test/Hspec/Core/SpecSpec.hs
@@ -11,7 +11,9 @@
 import           Helper
 
 #ifdef HAS_SOURCE_LOCATIONS
+#if !MIN_VERSION_base(4,9,0)
 import           GHC.SrcLoc
+#endif
 import           GHC.Stack
 #endif
 
diff --git a/test/Test/Hspec/Core/UtilSpec.hs b/test/Test/Hspec/Core/UtilSpec.hs
--- a/test/Test/Hspec/Core/UtilSpec.hs
+++ b/test/Test/Hspec/Core/UtilSpec.hs
@@ -51,8 +51,8 @@
       show e `shouldBe` "foobar"
 
     it "evaluates result to weak head normal form" $ do
-      Left e <- safeTry (return undefined)
-      show e `shouldBe` "Prelude.undefined"
+      Left e <- safeTry (return $ E.throw $ E.ErrorCall "foo")
+      show e `shouldBe` "foo"
 
     it "does not catch asynchronous exceptions" $ do
       mvar <- newEmptyMVar
