diff --git a/Data/Loc.hs b/Data/Loc.hs
--- a/Data/Loc.hs
+++ b/Data/Loc.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveFunctor #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE Safe #-}
 
 -- |
 -- Module      :  Data.Loc
@@ -121,7 +121,7 @@
          |  -- | Beginning and end positions
             Loc  {-# UNPACK #-} !Pos
                  {-# UNPACK #-} !Pos
-  deriving (Eq, Read, Show, Data, Typeable)
+  deriving (Eq, Ord, Read, Show, Data, Typeable)
 
 -- | Starting position of the location.
 locStart :: Loc -> Loc
@@ -159,7 +159,13 @@
 -- | Source location type. Source location are all equal, which allows AST nodes
 -- to be compared modulo location information.
 newtype SrcLoc = SrcLoc Loc
-  deriving (Monoid, Data, Typeable)
+  deriving (Data, Typeable)
+
+instance Monoid SrcLoc where
+    mempty = SrcLoc mempty
+#if !(MIN_VERSION_base(4,11,0))
+    mappend (SrcLoc l1) (SrcLoc l2) = SrcLoc (l1 `mappend` l2)
+#endif
 
 #if MIN_VERSION_base(4,9,0)
 instance Semigroup SrcLoc where
diff --git a/srcloc.cabal b/srcloc.cabal
--- a/srcloc.cabal
+++ b/srcloc.cabal
@@ -1,6 +1,6 @@
 name:           srcloc
-version:        0.5.1.2
-cabal-version:  >= 1.6
+version:        0.6
+cabal-version:  >= 1.10
 license:        BSD3
 license-file:   LICENSE
 copyright:      (c) 2006-2011 Harvard University
@@ -13,11 +13,14 @@
 synopsis:       Data types for managing source code locations.
 description:    Data types for tracking, combining, and printing source code locations.
 tested-with:    GHC==7.4.2, GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2,
-                GHC==8.2.2, GHC==8.4.1
+                GHC==8.2.2, GHC==8.4.3, GHC==8.6.5, GHC==8.8.4, GHC==8.10.4
+                GHC==9.0.1
 
 build-type:     Simple
 
 library
+  default-language: Haskell2010
+
   exposed-modules:
     Data.Loc
 
