diff --git a/ghc-srcspan-plugin.cabal b/ghc-srcspan-plugin.cabal
--- a/ghc-srcspan-plugin.cabal
+++ b/ghc-srcspan-plugin.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                ghc-srcspan-plugin
-version:             0.2.1.0
+version:             0.2.2.0
 synopsis:            Generic GHC Plugin for annotating Haskell code with source
                      location data.
 description:         This package provides a generic Core-to-Core pass for
diff --git a/src/GHC/Plugins/ErrorLoc.hs b/src/GHC/Plugins/ErrorLoc.hs
--- a/src/GHC/Plugins/ErrorLoc.hs
+++ b/src/GHC/Plugins/ErrorLoc.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 module GHC.Plugins.ErrorLoc
   (plugin, errorAt, undefinedAt, fromJustAt)
   where
@@ -23,9 +24,16 @@
   maybeM   <- lookupModule (mkModuleName "Data.Maybe") Nothing
   fmjstVar <- lookupId =<< lookupName maybeM (mkVarOcc "fromJust")
 
+#if __GLASGOW_HASKELL__ < 800
   let subst = [ (eRROR_ID, errorAtVar), (uNDEFINED_ID, undefAtVar)
               , (fmjstVar, fmjstAtVar)
               ]
+#else
+  -- GHC 8 uses HasCallStack to provide source locations for
+  -- error and undefined, so rewriting them is pointless
+  let subst = [ (fmjstVar, fmjstAtVar) ]
+#endif
+
 
   let annotate = mkErrorAt subst
 
diff --git a/src/GHC/Plugins/SrcSpan.hs b/src/GHC/Plugins/SrcSpan.hs
--- a/src/GHC/Plugins/SrcSpan.hs
+++ b/src/GHC/Plugins/SrcSpan.hs
@@ -84,7 +84,11 @@
   mixEntries <- getMixEntries modName (hpcDir df) 
                   `catch` \(_ :: SomeException) -> return []
   let hpc = IntMap.fromList $ zip [0..] mixEntries
+#if __GLASGOW_HASKELL__ < 800
   let bk  = IntMap.fromList $ Array.assocs $ modBreaks_locs mg_modBreaks
+#else
+  let bk  = maybe IntMap.empty (IntMap.fromList . Array.assocs . modBreaks_locs) mg_modBreaks
+#endif
   return (tickSpan hpc bk)
 
 
