diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 0.1.2.2
+
+- Allow newer versions of dependencies: generics-sop-0.5, base-4.13
+
 # 0.1.2.1
 
 - Fix compilation issue with generics-sop-0.2.3.0
diff --git a/ansi-pretty.cabal b/ansi-pretty.cabal
--- a/ansi-pretty.cabal
+++ b/ansi-pretty.cabal
@@ -1,51 +1,54 @@
--- This file has been generated from package.yaml by hpack version 0.14.1.
---
--- see: https://github.com/sol/hpack
-
-name:           ansi-pretty
-version:        0.1.2.1
-synopsis:       AnsiPretty for ansi-wl-pprint
-description:    'AnsiPretty' type class, more colorful than 'Pretty'.
-category:       Web
-homepage:       https://github.com/futurice/haskell-ansi-pretty#readme
-bug-reports:    https://github.com/futurice/haskell-ansi-pretty/issues
-author:         Oleg Grenrus <oleg.grenrus@iki.fi>
-maintainer:     Oleg Grenrus <oleg.grenrus@iki.fi>
-license:        BSD3
-license-file:   LICENSE
-tested-with:    GHC==7.8.4, GHC==7.10.3, GHC==8.0.1
-build-type:     Simple
-cabal-version:  >= 1.10
+name:               ansi-pretty
+version:            0.1.2.2
+synopsis:           AnsiPretty for ansi-wl-pprint
+description:        'AnsiPretty' type class, more colorful than 'Pretty'.
+category:           User Interfaces, Text
+homepage:           https://github.com/futurice/haskell-ansi-pretty#readme
+bug-reports:        https://github.com/futurice/haskell-ansi-pretty/issues
+author:             Oleg Grenrus <oleg.grenrus@iki.fi>
+maintainer:         Oleg Grenrus <oleg.grenrus@iki.fi>
+license:            BSD3
+license-file:       LICENSE
+tested-with:
+  GHC ==7.8.4
+   || ==7.10.3
+   || ==8.0.2
+   || ==8.2.2
+   || ==8.4.4
+   || ==8.6.5
+   || ==8.8.1
 
+build-type:         Simple
+cabal-version:      >=1.10
 extra-source-files:
-    CHANGELOG.md
-    README.md
+  CHANGELOG.md
+  README.md
 
 source-repository head
-  type: git
+  type:     git
   location: https://github.com/futurice/haskell-ansi-pretty
 
 library
-  hs-source-dirs:
-      src
-  ghc-options: -Wall
+  default-language: Haskell2010
+  hs-source-dirs:   src
+  ghc-options:      -Wall
   build-depends:
-      aeson                 >=0.8   && <1.1
-    , ansi-wl-pprint        >=0.6   && <0.7
-    , array                 >=0.5   && <0.6
-    , base                  >=4.7   && <4.10
-    , bytestring            >=0.10  && <0.11
-    , containers            >=0.5   && <0.6
-    , generics-sop          >=0.1   && <0.3
-    , nats                  >=1     && <1.2
-    , scientific            >=0.3   && <0.4
-    , semigroups            >=0.16  && <0.19
-    , tagged                >=0.7   && <0.9
-    , text                  >=1.2   && <1.3
-    , time                  >=1.4   && <1.7
-    , unordered-containers  >=0.2   && <0.3
-    , vector                >=0.10  && <0.12
+      aeson                 >=0.8  && <1.5
+    , ansi-wl-pprint        >=0.6  && <0.7
+    , array                 >=0.5  && <0.6
+    , base                  >=4.7  && <4.14
+    , bytestring            >=0.10 && <0.11
+    , containers            >=0.5  && <0.7
+    , generics-sop          >=0.1  && <0.6
+    , nats                  >=1    && <1.2
+    , scientific            >=0.3  && <0.4
+    , semigroups            >=0.16 && <0.20
+    , tagged                >=0.7  && <0.9
+    , text                  >=1.2  && <1.3
+    , time                  >=1.4  && <1.10
+    , unordered-containers  >=0.2  && <0.3
+    , vector                >=0.10 && <0.13
+
   exposed-modules:
-      Data.List.CommonPrefix
-      Text.PrettyPrint.ANSI.Leijen.AnsiPretty
-  default-language: Haskell2010
+    Data.List.CommonPrefix
+    Text.PrettyPrint.ANSI.Leijen.AnsiPretty
diff --git a/src/Data/List/CommonPrefix.hs b/src/Data/List/CommonPrefix.hs
--- a/src/Data/List/CommonPrefix.hs
+++ b/src/Data/List/CommonPrefix.hs
@@ -26,7 +26,7 @@
 getCommonPrefix :: CommonPrefix a -> [a]
 getCommonPrefix (CommonPrefix pfx) = pfx
 
-instance Eq a => Semigroup (CommonPrefix a) where
+instance Eq a => Data.Semigroup.Semigroup (CommonPrefix a) where
   CommonPrefix as <> CommonPrefix bs = CommonPrefix (impl as bs)
     where
       impl []     _       = []
diff --git a/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs b/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs
--- a/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs
+++ b/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs
@@ -89,7 +89,7 @@
 class AnsiPretty a where
   ansiPretty :: a -> Doc
 
-  default ansiPretty :: (GHC.Generic a, All2 AnsiPretty (GCode a), GFrom a, GDatatypeInfo a, SListI (GCode a)) => a -> Doc
+  default ansiPretty :: (GHC.Generic a, All2 AnsiPretty (GCode a), GFrom a, GDatatypeInfo a) => a -> Doc
   ansiPretty = ghcAnsiPretty
 
   ansiPrettyList :: [a] -> Doc
@@ -129,10 +129,10 @@
 
 -- GHC
 
-ghcAnsiPretty :: forall a. (GHC.Generic a, All2 AnsiPretty (GCode a), GFrom a, GDatatypeInfo a, SListI (GCode a)) => a -> Doc
+ghcAnsiPretty :: forall a. (GHC.Generic a, All2 AnsiPretty (GCode a), GFrom a, GDatatypeInfo a) => a -> Doc
 ghcAnsiPretty = ghcAnsiPrettyWith defAnsiPrettyOpts
 
-ghcAnsiPrettyWith :: forall a. (GHC.Generic a, All2 AnsiPretty (GCode a), GFrom a, GDatatypeInfo a, SListI (GCode a)) => AnsiPrettyOpts -> a -> Doc
+ghcAnsiPrettyWith :: forall a. (GHC.Generic a, All2 AnsiPretty (GCode a), GFrom a, GDatatypeInfo a) => AnsiPrettyOpts -> a -> Doc
 ghcAnsiPrettyWith opts x = sopAnsiPrettyS opts (gfrom x) (gdatatypeInfo (Proxy :: Proxy a))
 
 -- SOP
@@ -145,15 +145,25 @@
 
 sopAnsiPrettyS :: (All2 AnsiPretty xss) => AnsiPrettyOpts -> SOP I xss -> DatatypeInfo xss -> Doc
 sopAnsiPrettyS  opts (SOP (Z (I x :* Nil))) (Newtype _ _ ci)  = poPrettyNewtype opts (constructorName ci) (ansiPretty x)
+#if MIN_VERSION_generics_sop(0,5,0)
+sopAnsiPrettyS  opts (SOP (Z xs)) (ADT _ _ (ci :* Nil) _) = poPrettyRecord opts (constructorName ci) (gAnsiPrettyP xs (fieldInfo ci))
+#else
 sopAnsiPrettyS  opts (SOP (Z xs)) (ADT _ _ (ci :* Nil)) = poPrettyRecord opts (constructorName ci) (gAnsiPrettyP xs (fieldInfo ci))
+#endif
 sopAnsiPrettyS _opts (SOP (Z _ )) _ = error "gAnsiPrettyS: redundant Z case" -- TODO
+#if MIN_VERSION_generics_sop(0,5,0)
+sopAnsiPrettyS  opts (SOP (S xss)) (ADT m d (_ :* cis) (POP (_ :* sis))) = sopAnsiPrettyS opts (SOP xss) (ADT m d cis (POP sis))
+#else
 sopAnsiPrettyS  opts (SOP (S xss)) (ADT m d (_ :* cis)) = sopAnsiPrettyS opts (SOP xss) (ADT m d cis)
+#endif
 sopAnsiPrettyS _opts (SOP (S _)) _  = error "gAnsiPrettyS: redundant S case"
 
 gAnsiPrettyP :: (All AnsiPretty xs) => NP I xs -> NP FieldInfo xs -> [(FieldName, Doc)]
 gAnsiPrettyP Nil Nil = []
-gAnsiPrettyP (I x :* xs) (FieldInfo fieldName :* fis) = (fieldName, ansiPretty x) : gAnsiPrettyP xs fis
+gAnsiPrettyP (I x :* xs) (FieldInfo f :* fis) = (f, ansiPretty x) : gAnsiPrettyP xs fis
+#if __GLASGOW_HASKELL__ < 800
 gAnsiPrettyP _ _ = error "gAnsiPrettyP: redundant case"
+#endif
 
 #if !MIN_VERSION_generics_sop(0,2,3)
 constructorName :: ConstructorInfo a -> ConstructorName
@@ -231,7 +241,11 @@
 instance AnsiPretty Natural where ansiPretty = dullyellow . integer . toInteger
 
 instance Fixed.HasResolution e => AnsiPretty (Fixed.Fixed e) where ansiPretty = dullyellow . text . show
+#if MIN_VERSION_base(4,9,0)
+instance (AnsiPretty a) => AnsiPretty (Ratio.Ratio a) where
+#else
 instance (AnsiPretty a, Integral a) => AnsiPretty (Ratio.Ratio a) where
+#endif
   ansiPretty r = ansiPretty (Ratio.numerator r) <+> dullyellow (char '%') <+> ansiPretty (Ratio.denominator r)
 
 -- Generic instances
