diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,6 +1,26 @@
 # ChangeLog / ReleaseNotes
 
 
+## Version 0.3.0.0
+
+* Optional instances for `JoinSemiLattice`, `MeetSemiLattice`,
+  `BoundedJoinSemiLattice`, `BoundedMeetSemiLattice`, `Lattice`, and
+  `BoundedLattice`. Dependency on `lattices` package can be enabled using
+  `-flattices` build flag. (**new**)
+* Optional instances for `Dhall.Interpret` `Dhall.Inject` type classes.
+  Dependency on `dhall` package can be enabled using `-fdhall` build flag.
+  Enabled by default. (**new**)
+* Optional instances for `Serialise` type class from `serialise` package that
+  provides CBOR serialisation/deserialisation.  Dependency on `serialise`
+  package can be enabled using `-fserialise` build flag.  Enabled by default.
+  (**new**)
+* `HasVerbosity` type class now provides default implementation for `verbosity`
+   lens that uses `generic-lens`. (**change/new**)
+* Dropped support for GHC \< 8.2.  As a consequence `Data`, `Generic`, and
+  `Typeable` are always derived.  The last one is implied by the fact that GHC
+  now always derives it. (**breaking change**)
+
+
 ## Version 0.2.3.0
 
 * Introducing function
@@ -8,6 +28,7 @@
   (**new**)
 * Introducing optional instance for safecopy's `SafeCopy` type class. Dependency
   on `safecopy` package can be enabled using `-fsafecopy` build flag. (**new**)
+* Uploaded to [Hackage][]: <http://hackage.haskell.org/package/verbosity-0.2.3.0>
 
 
 ## Version 0.2.2.0
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2015-2016 Peter Trško
+Copyright (c) 2015-2019 Peter Trško
 
 All rights reserved.
 
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,24 +1,77 @@
 # verbosity
 
 [![Hackage](http://img.shields.io/hackage/v/verbosity.svg)][Hackage: verbosity]
-[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/verbosity.svg)](http://packdeps.haskellers.com/reverse/verbosity)
+[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/verbosity.svg)](http://packdeps.haskellers.com/feed?needle=verbosity)
 [![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg)][Haskell.org]
 [![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)][tl;dr Legal: BSD3]
 
 [![Build](https://travis-ci.org/trskop/verbosity.svg)](https://travis-ci.org/trskop/verbosity)
 
 
-# Description
+## Description
 
 Simple enum that encodes application verbosity with various useful instances.
 
+## Example
 
-[Hackage: verbosity]:
-  http://hackage.haskell.org/package/verbosity
-  "verbosity package on Hackage"
-[Haskell.org]:
-  http://www.haskell.org
-  "The Haskell Programming Language"
-[tl;dr Legal: BSD3]:
-  https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29
-  "BSD 3-Clause License (Revised)"
+```Haskell
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DerivingStrategies #-}
+module Main.Options
+    ( AppConfig(..)
+    , quietFlag
+    , incrementVerbosityFlag
+    )
+  where
+
+import GHC.Generics (Generic)
+
+import Data.Verbosity (Verbosity)
+import qualified Data.Verbosity as Verbosity (Verbosity(Silent), increment')
+import Data.Verbosity.Class (HasVerbosity, modifyVerbosity, setVerbosity)
+import qualified Options.Applicative as Options
+
+
+-- | Application configuration.
+data AppConfig = AppConfig
+    { verbosity :: Verbosity
+--  , ...
+    }
+  deriving stock (Generic, Show)
+  deriving anyclass (HasVerbosity)
+
+-- | Option for suppressing unnecessary output.
+--
+-- > -q, --quiet
+-- >     Quiet mode. Suppress normal diagnostic or result output.
+quietFlag :: HasVerbosity a => Options.Parser (a -> a)
+quietFlag = Options.flag id (setVerbosity Verbosity.Silent) $ mconcat
+    [ Options.long "quiet"
+    , Options.short 'q'
+    , Options.help "Quiet mode. Suppress normal diagnostic or result output."
+    ]
+
+-- | Flag for incrementing verbosity by one level. It can be used multiple
+-- times to increase it more.
+--
+-- > -v
+-- >     Increment verbosity by one level. Can be used multiple times.
+--
+-- See 'Verbosity.increment'' for more details.
+--
+-- Note that this definition uses 'Options.flag'' under the hood to allow using
+-- 'Control.Applicative.some' and 'Control.Applicative.many' combinators.  In
+-- other words, it will fail when used without these combinators or
+-- 'Control.Applicative.optional'.
+incrementVerbosityFlag :: HasVerbosity a => Options.Parser (a -> a)
+incrementVerbosityFlag =
+    Options.flag' (modifyVerbosity Verbosity.increment') $ mconcat
+        [ Options.short 'v'
+        , Options.help "Increment verbosity by one level. Can be used multiple times."
+        ]
+```
+
+[Hackage: verbosity]: http://hackage.haskell.org/package/verbosity "verbosity package on Hackage"
+[Haskell.org]: http://www.haskell.org "The Haskell Programming Language"
+[tl;dr Legal: BSD3]: https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29 "BSD 3-Clause License (Revised)"
diff --git a/dhall/Verbosity/Type b/dhall/Verbosity/Type
new file mode 100644
--- /dev/null
+++ b/dhall/Verbosity/Type
@@ -0,0 +1,3 @@
+< Silent : {} | Normal : {} | Verbose : {} | Annoying : {} >
+
+-- vim: ft=dhall
diff --git a/dhall/Verbosity/fold b/dhall/Verbosity/fold
new file mode 100644
--- /dev/null
+++ b/dhall/Verbosity/fold
@@ -0,0 +1,30 @@
+let Verbosity = ./Type
+
+in  -- Version of `merge` specialised to `Verbosity`.  This way we don't need
+    -- to pass that many parameters.
+    --
+    -- ```
+    -- fold
+    --   : ∀(r : Type)
+    --   → ∀ (handler
+    --         : { Silent : {} → r
+    --           , Normal : {} → r
+    --           , Verbose : {} → r
+    --           , Annoying : {} → r
+    --           }
+    --       )
+    --   → ∀(verbosity : Verbosity)
+    --   → r
+    -- ```
+      λ(r : Type)
+    → λ(handler
+          : { Silent : {} → r
+            , Normal : {} → r
+            , Verbose : {} → r
+            , Annoying : {} → r
+            }
+        )
+    → λ(verbosity : Verbosity)
+    → merge handler verbosity
+
+-- vim: ft=dhall
diff --git a/example/Example/Config.hs b/example/Example/Config.hs
deleted file mode 100644
--- a/example/Example/Config.hs
+++ /dev/null
@@ -1,28 +0,0 @@
--- |
--- Module:       $HEADER$
--- Description:  Example of hand written HasVerbosity instance.
--- Copyright:    (c) 2015, Peter Trško
--- License:      BSD3
---
--- Maintainer:   peter.trsko@gmail.com
---
--- Example of hand written HasVerbosity instance.
-module Example.Config
-    ( Config
-    , module Data.Verbosity.Class
-    )
-  where
-
-import Data.Functor ((<$>))
-
-import Data.Verbosity.Class
-
-
-data Config = Config
-    { _appVerbosity :: Verbosity
-    }
-  deriving Show
-
-instance HasVerbosity Config where
-    verbosity f c@Config{_appVerbosity = a} =
-        (\b -> c{_appVerbosity = b}) <$> f a
diff --git a/example/Example/ConfigGenericLens.hs b/example/Example/ConfigGenericLens.hs
new file mode 100644
--- /dev/null
+++ b/example/Example/ConfigGenericLens.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DerivingStrategies #-}
+-- |
+-- Module:       $HEADER$
+-- Description:  Example of using @DerivingStrategies@ along with default
+--               HasVerbosity implementation based on generic-lens package.
+-- Copyright:    (c) 2015-2019, Peter Trško
+-- License:      BSD3
+--
+-- Maintainer:   peter.trsko@gmail.com
+--
+-- Example of using @DerivingStrategies@ along with default 'HasVerbosity'
+-- implementation based on @generic-lens@ package.
+module Example.Config
+    ( Config
+    , module Data.Verbosity.Class
+    )
+  where
+
+import GHC.Generics (Generic)
+
+import Data.Verbosity.Class
+
+
+data Config = Config
+    { _appVerbosity :: Verbosity
+--  , ...
+    }
+  deriving stock (Generic, Show)
+  deriving anyclass (HasVerbosity)
diff --git a/example/Example/ConfigHandWrittenInstance.hs b/example/Example/ConfigHandWrittenInstance.hs
new file mode 100644
--- /dev/null
+++ b/example/Example/ConfigHandWrittenInstance.hs
@@ -0,0 +1,29 @@
+-- |
+-- Module:       $HEADER$
+-- Description:  Example of hand written HasVerbosity instance.
+-- Copyright:    (c) 2015, Peter Trško
+-- License:      BSD3
+--
+-- Maintainer:   peter.trsko@gmail.com
+--
+-- Example of hand written HasVerbosity instance.
+module Example.Config
+    ( Config
+    , module Data.Verbosity.Class
+    )
+  where
+
+import Data.Functor ((<$>))
+
+import Data.Verbosity.Class
+
+
+data Config = Config
+    { _appVerbosity :: Verbosity
+--  , ...
+    }
+  deriving Show
+
+instance HasVerbosity Config where
+    verbosity f c@Config{_appVerbosity = a} =
+        (\b -> c{_appVerbosity = b}) <$> f a
diff --git a/example/Example/ConfigTH.hs b/example/Example/ConfigTH.hs
--- a/example/Example/ConfigTH.hs
+++ b/example/Example/ConfigTH.hs
@@ -23,6 +23,7 @@
 
 data Config = Config
     { _appVerbosity :: Verbosity
+--  , ...
     }
   deriving Show
 
diff --git a/example/Main/Options.hs b/example/Main/Options.hs
new file mode 100644
--- /dev/null
+++ b/example/Main/Options.hs
@@ -0,0 +1,55 @@
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DerivingStrategies #-}
+module Main.Options
+    ( AppConfig(..)
+    , quietFlag
+    , incrementVerbosityFlag
+    )
+  where
+
+import GHC.Generics (Generic)
+
+import Data.Verbosity (Verbosity)
+import qualified Data.Verbosity as Verbosity (Verbosity(Silent), increment')
+import Data.Verbosity.Class (HasVerbosity, modifyVerbosity, setVerbosity)
+import qualified Options.Applicative as Options
+
+
+-- | Application configuration.
+data AppConfig = AppConfig
+    { verbosity :: Verbosity
+--  , ...
+    }
+  deriving stock (Generic, Show)
+  deriving anyclass (HasVerbosity)
+
+-- | Option for suppressing unnecessary output.
+--
+-- > -q, --quiet
+-- >     Quiet mode. Suppress normal diagnostic or result output.
+quietFlag :: HasVerbosity a => Options.Parser (a -> a)
+quietFlag = Options.flag id (setVerbosity Verbosity.Silent) $ mconcat
+    [ Options.long "quiet"
+    , Options.short 'q'
+    , Options.help "Quiet mode. Suppress normal diagnostic or result output."
+    ]
+
+-- | Flag for incrementing verbosity by one level. It can be used multiple
+-- times to increase it more.
+--
+-- > -v
+-- >     Increment verbosity by one level. Can be used multiple times.
+--
+-- See 'Verbosity.increment'' for more details.
+--
+-- Note that this definition uses 'Options.flag'' under the hood to allow using
+-- 'Control.Applicative.some' and 'Control.Applicative.many' combinators.  In
+-- other words, it will fail when used without these combinators or
+-- 'Control.Applicative.optional'.
+incrementVerbosityFlag :: HasVerbosity a => Options.Parser (a -> a)
+incrementVerbosityFlag =
+    Options.flag' (modifyVerbosity Verbosity.increment') $ mconcat
+        [ Options.short 'v'
+        , Options.help "Increment verbosity by one level. Can be used multiple times."
+        ]
diff --git a/src/Data/Verbosity.hs b/src/Data/Verbosity.hs
--- a/src/Data/Verbosity.hs
+++ b/src/Data/Verbosity.hs
@@ -1,13 +1,12 @@
 {-# LANGUAGE CPP #-}
-{-# LANGUAGE NoImplicitPrelude #-}
-
-#ifdef DERIVE_DATA_TYPEABLE
 {-# LANGUAGE DeriveDataTypeable #-}
-#endif
-
-#ifdef DERIVE_GHC_GENERICS
 {-# LANGUAGE DeriveGeneric #-}
-#endif
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE TypeOperators #-}
 
 #ifdef DECLARE_NFDATA_INSTANCE
 {-# LANGUAGE BangPatterns #-}
@@ -17,17 +16,19 @@
 {-# LANGUAGE TemplateHaskell #-}
 #endif
 
+#ifdef DECLARE_DHALL_INSTANCES
+{-# LANGUAGE DeriveAnyClass #-}
+#endif
+
 -- |
 -- Module:       $HEADER$
 -- Description:  Verbosity enum.
--- Copyright:    (c) 2015-2016 Peter Trško
+-- Copyright:    (c) 2015-2019 Peter Trško
 -- License:      BSD3
 --
 -- Maintainer:   peter.trsko@gmail.com
 -- Stability:    experimental
--- Portability:  BangPatterns (optional), CPP, DeriveDataTypeable (optional),
---               DeriveGeneric (optional), NoImplicitPrelude,
---               TemplateHaskell (optional)
+-- Portability:  GHC specific language extensions.
 --
 -- Simple enum that encodes application 'Verbosity'.
 module Data.Verbosity
@@ -35,9 +36,7 @@
     , increment
     , increment'
     , fromInt
-#ifdef DERIVE_DATA_TYPEABLE
     , parse
-#endif
     )
   where
 
@@ -50,22 +49,35 @@
     )
 
 import Data.Bool ((&&), otherwise)
+import Data.Data (Data)
 import Data.Eq (Eq)
 import Data.Int (Int)
-import Data.Maybe (Maybe(..), fromMaybe)
-import Data.Ord (Ord(..))
-import Text.Read (Read)
-import Text.Show (Show)
-
-#ifdef DERIVE_DATA_TYPEABLE
-import Data.Data (Data(toConstr), Typeable, showConstr)
+import Data.Kind (Type)
 import Data.List (lookup)
-import Data.String (IsString(fromString))
-#endif
-
-#ifdef DERIVE_GHC_GENERICS
-import GHC.Generics (Generic)
+import Data.Maybe (Maybe(Just, Nothing), fromMaybe)
+import Data.Ord
+    ( Ord
+    , (<)
+    , (<=)
+    , (>=)
+#ifdef DECLARE_LATTICE_INSTANCES
+    , max
+    , min
 #endif
+    )
+import Data.String (IsString, String, fromString)
+import GHC.Generics
+    ( (:+:)(L1, R1)
+    , C1
+    , Constructor
+    , D1
+    , Generic
+    , M1(M1)
+    , conName
+    , from
+    )
+import Text.Read (Read)
+import Text.Show (Show)
 
 #if defined(DECLARE_BINARY_INSTANCE) || defined(DECLARE_SERIALIZE_INSTANCE)
 import Control.Applicative ((<$>))
@@ -94,7 +106,26 @@
 import Control.DeepSeq (NFData(rnf))
 #endif
 
+#ifdef DECLARE_LATTICE_INSTANCES
+import Algebra.Lattice
+    ( BoundedJoinSemiLattice(bottom)
+    , BoundedLattice
+    , BoundedMeetSemiLattice(top)
+    , JoinSemiLattice((\/))
+    , Lattice
+    , MeetSemiLattice((/\))
+    )
+#endif
 
+#ifdef DECLARE_DHALL_INSTANCES
+import qualified Dhall (Inject, Interpret)
+#endif
+
+#ifdef DECLARE_SERIALISE_INSTANCE
+import Codec.Serialise (Serialise)
+#endif
+
+
 -- | Ordering:
 --
 -- @
@@ -121,15 +152,22 @@
     -- ^ Print anything that comes in to mind.
     | Annoying
     -- ^ Print debugging/tracing information.
-  deriving
-    ( Bounded, Enum, Eq, Ord, Read, Show
-#ifdef DERIVE_GHC_GENERICS
+  deriving stock
+    ( Bounded
+    , Data
+    , Enum
+    , Eq
     , Generic
+    , Ord
+    , Read
+    , Show
+    )
+#ifdef DECLARE_DHALL_INSTANCES
+  deriving anyclass (Dhall.Inject, Dhall.Interpret)
 #endif
-#ifdef DERIVE_DATA_TYPEABLE
-    , Data, Typeable
+#ifdef DECLARE_SERIALISE_INSTANCE
+  deriving anyclass (Serialise)
 #endif
-    )
 
 #ifdef DECLARE_DEFAULT_INSTANCE
 -- | @'def' = 'Normal'@
@@ -160,6 +198,27 @@
     rnf !_ = ()
 #endif
 
+#ifdef DECLARE_LATTICE_INSTANCES
+-- | @('\/') = 'max'@
+instance JoinSemiLattice Verbosity where
+    (\/) = max
+
+-- | @'bottom' = 'Silent'@
+instance BoundedJoinSemiLattice Verbosity where
+    bottom = minBound
+
+-- | @('/\') = 'min'@
+instance MeetSemiLattice Verbosity where
+    (/\) = min
+
+-- | @'top' = 'Annoying'@
+instance BoundedMeetSemiLattice Verbosity where
+    top = maxBound
+
+instance Lattice Verbosity
+instance BoundedLattice Verbosity
+#endif
+
 -- | Increment verbosity level. Return 'Nothing' if trying to icrement beyond
 -- 'maxBound'.
 increment :: Verbosity -> Maybe Verbosity
@@ -187,7 +246,6 @@
     minVerbosity = fromEnum (minBound :: Verbosity)
     maxVerbosity = fromEnum (maxBound :: Verbosity)
 
-#ifdef DERIVE_DATA_TYPEABLE
 -- | Generic 'Verbosity' parsing function.
 --
 -- Use <https://hackage.haskell.org/package/case-insensitive case-insensitive>
@@ -202,5 +260,23 @@
 parse :: (Eq string, IsString string) => string -> Maybe Verbosity
 parse = (`lookup` [(str v, v) | v <- [minBound..maxBound :: Verbosity]])
   where
-    str = fromString . showConstr . toConstr
-#endif
+    str = fromString . gDataConstructorName . from
+
+class HasDataConstructors (f :: Type -> Type) where
+    gDataConstructorName :: f x -> String
+
+instance HasDataConstructors f => HasDataConstructors (D1 c f) where
+    gDataConstructorName (M1 x) = gDataConstructorName x
+
+instance
+    ( HasDataConstructors x
+    , HasDataConstructors y
+    )
+    => HasDataConstructors (x :+: y)
+  where
+    gDataConstructorName = \case
+        L1 l -> gDataConstructorName l
+        R1 r -> gDataConstructorName r
+
+instance Constructor c => HasDataConstructors (C1 c f) where
+    gDataConstructorName = conName
diff --git a/src/Data/Verbosity/Class.hs b/src/Data/Verbosity/Class.hs
--- a/src/Data/Verbosity/Class.hs
+++ b/src/Data/Verbosity/Class.hs
@@ -1,21 +1,27 @@
+{-# LANGUAGE DefaultSignatures #-}
+{-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE NoImplicitPrelude #-}
 -- |
 -- Module:       $HEADER$
 -- Description:  Type class for accessing Verbosity.
--- Copyright:    (c) 2015-2016 Peter Trško
+-- Copyright:    (c) 2015-2019 Peter Trško
 -- License:      BSD3
 --
 -- Maintainer:   peter.trsko@gmail.com
 -- Stability:    experimental
--- Portability:  NoImplicitPrelude
+-- Portability:  GHC specific language extensions.
 --
 -- Type class for accessing 'Verbosity'.
 module Data.Verbosity.Class
     (
-    -- * Hand Written Instance Example
+    -- * GHC Generics Example
     --
     -- $basicUsageExample
 
+    -- * Hand Written Instance Example
+    --
+    -- $handWrittenInstance
+
     -- * TemplateHaskell Example
     --
     -- $thUsageExample
@@ -31,11 +37,13 @@
     )
   where
 
-import Control.Applicative (Const(..))
+import Control.Applicative (Const(Const, getConst))
 import Data.Function ((.), ($), const)
 import Data.Functor (Functor)
-import Data.Functor.Identity (Identity(..))
+import Data.Functor.Identity (Identity(Identity, runIdentity))
 
+import Data.Generics.Product.Typed (HasType, typed)
+
 import Data.Verbosity
 
 
@@ -43,6 +51,12 @@
     -- | Lens for accessing 'Verbosity' embedded in the type @s@.
     verbosity :: Functor f => (Verbosity -> f Verbosity) -> s -> f s
 
+    default verbosity
+        :: (HasType Verbosity s, Functor f)
+        => (Verbosity -> f Verbosity)
+        -> s -> f s
+    verbosity = typed
+
 instance HasVerbosity Verbosity where
     verbosity = ($)
 
@@ -67,6 +81,45 @@
 --     { _appVerbosity :: 'Verbosity'
 --     , ...
 --     }
+--   deriving ('GHC.Generics.Generic', Show, ...)
+-- @
+--
+-- Type class 'HasVerbosity' uses
+-- <https://hackage.haskell.org/package/generic-lens generic-lens> package and
+-- @DefaultSignatures@ language extension so that we can define instance of
+-- 'HasVerbosity' by simply stating:
+--
+-- @
+-- instance 'HasVerbosity' Config
+-- @
+--
+-- With @DerivingStrategies@ we can rewrite the above example as:
+--
+-- @
+-- {-\# LANGUAGE DeriveAnyClass \#-}
+-- {-\# LANGUAGE DeriveGeneric \#-}
+-- {-\# LANGUAGE DerivingStrategies \#-}
+--
+-- import "GHC.Generics" ('GHC.Generics.Generic')
+--
+--
+-- data Config = Config
+--     { _appVerbosity :: 'Verbosity'
+--     , ...
+--     }
+--   deriving stock ('GHC.Generics.Generic', Show, ...)
+--   deriving anyclass ('HasVerbosity')
+-- @
+
+-- $handWrittenInstance
+--
+-- Lets define simple data type that looks something like:
+--
+-- @
+-- data Config = Config
+--     { _appVerbosity :: 'Verbosity'
+--     , ...
+--     }
 --   deriving (Show, ...)
 -- @
 --
@@ -75,15 +128,17 @@
 -- @
 -- instance 'HasVerbosity' Config where
 --     verbosity f c@Config{_appVerbosity = a} =
---         (\b -> c{_appVerbosity = b}) 'Data.Functor.<$>' f a
+--         (\\b -> c{_appVerbosity = b}) 'Data.Functor.<$>' f a
 -- @
 
 -- $thUsageExample
 --
--- Package <https://hackage.haskell.org/package/lens lens> has TemplateHaskell
+-- Package [lens](https://hackage.haskell.org/package/lens) has TemplateHaskell
 -- functions that can define lenses for you:
 --
 -- @
+-- {-\# LANGUAGE TemplateHaskell \#-}
+--
 -- import Control.Lens.TH (makeLenses)
 --
 -- data Config = Config
@@ -93,13 +148,6 @@
 --   deriving (Show, ...)
 --
 -- makeLenses ''Config
--- @
---
--- Don't forget to to turn on TemplateHaskell by putting following pragma at
--- the beginning of your module:
---
--- @
--- {-\# LANGUAGE TemplateHaskell \#-}
 -- @
 --
 -- Now definition of 'HasVerbosity' instance will look like:
diff --git a/verbosity.cabal b/verbosity.cabal
--- a/verbosity.cabal
+++ b/verbosity.cabal
@@ -1,5 +1,5 @@
 name:                   verbosity
-version:                0.2.3.0
+version:                0.3.0.0
 synopsis:               Simple enum that encodes application verbosity.
 description:
   Simple enum that encodes application verbosity with various useful instances.
@@ -10,35 +10,35 @@
 license-file:           LICENSE
 author:                 Peter Trško
 maintainer:             peter.trsko@gmail.com
-copyright:              (c) 2015-2016 Peter Trško
+copyright:              (c) 2015-2019 Peter Trško
 category:               Data
 build-type:             Simple
 cabal-version:          >=1.10
 
 -- Examples require lens package in addition to this packackage's dependencies.
--- When using sandbox it is possible to use "cabal repl" to test examples by
+-- When using sandbox it is possible to use `cabal repl` to test examples by
 -- using following command:
 --
---     cabal repl --ghc-options="-iexample -package lens"
+--     cabal repl --ghc-options='-iexample -package lens -package optparse-applicative'
+--
+-- It's also possible to use `stack repl`:
+--
+--     stack repl --ghci-options='-package lens -package optparse-applicative'
 extra-source-files:
     ChangeLog.md
   , README.md
-  , example/Example/Config.hs
+  , dhall/Verbosity/Type
+  , dhall/Verbosity/fold
+  , example/Example/ConfigGenericLens.hs
+  , example/Example/ConfigHandWrittenInstance.hs
   , example/Example/ConfigTH.hs
+  , example/Main/Options.hs
 
 flag pedantic
   description:          Pass additional warning flags to GHC.
   default:              False
   manual:               True
 
-flag data-typeable
-  description:          Derive instances for Data and Typeable type classes.
-  default:              True
-
-flag ghc-generics
-  description:          Derive instances for Generic type class.
-  default:              True
-
 flag binary
   description:          Derive instances for Binary type class.
   default:              True
@@ -59,6 +59,21 @@
   description:          Define instance for SafeCopy type class.
   default:              False
 
+flag lattices
+  description:          Define instances for JoinSemiLattice, MeetSemiLattice,
+                        BoundedJoinSemiLattice, BoundedMeetSemiLattice,
+                        Lattice, and BoundedLattice.
+  default:              False
+
+flag dhall
+  description:          Define Verbosity instance for (Dhall) Interpret type
+                        class. Implies `ghc-generics` flag as well.
+  default:              True
+
+flag serialise
+  description:          Define instance for `Serialise` type class.
+  default:              True
+
 library
   hs-source-dirs:       src
   exposed-modules:      Data.Verbosity, Data.Verbosity.Class
@@ -68,38 +83,36 @@
       BangPatterns
     -- ^ With -fdeepseq
     , CPP
-    , NoImplicitPrelude
+    , DefaultSignatures
+    , DeriveAnyClass
+    -- ^ With -fdhall
     , DeriveDataTypeable
-    -- ^ With -fdata-typeable
     , DeriveGeneric
-    -- ^ With -fghc-generics
-
-  build-depends:        base >=4 && <5
-  ghc-options:          -Wall -fwarn-tabs
+    , DerivingStrategies
+    , FlexibleContexts
+    , FlexibleInstances
+    , KindSignatures
+    , LambdaCase
+    , NoImplicitPrelude
+    , TemplateHaskell
+    -- ^ With -fsafecopy
+    , TypeOperators
 
-  -- Package base bundled with GHC <7.10 (i.e. base <4.8) doesn't include
-  -- Data.Functor.Identity module.
-  if impl(ghc <7.10)
-    -- Versions of transformers <0.2 doesn't include Data.Functor.Identity,
-    -- which is used by this package, and version 0.4.0.0 of transformers is
-    -- deprecated.
-    build-depends:      transformers >=0.2 && <0.4 || >=0.4.1 && <0.6
+  -- Version 4.10 of base was bundled with GHC 8.2, which is the first version
+  -- that supports DerivingStrategies.
+  build-depends:        base >=4.10 && <5
+                      , generic-lens >=1.0.0.2 && <2
+  ghc-options:          -Wall
 
   if flag(pedantic)
-    ghc-options:        -fwarn-implicit-prelude
-
-  if flag(ghc-generics)
-    cpp-options:        -DDERIVE_GHC_GENERICS
-
-    -- GHC.Generics moved from ghc-prim to base with GHC 7.6 release.
-    if impl(ghc >=7.2 && <7.6)
-      build-depends:    ghc-prim
-
-  if flag(data-typeable)
-    cpp-options:        -DDERIVE_DATA_TYPEABLE
+    ghc-options:        -Wimplicit-prelude
+                        -Wmissing-export-lists
+                        -Wredundant-constraints
+                        -Wcompat
+                        -Werror
 
   if flag(binary)
-    build-depends:      binary >=0.5 && <0.9
+    build-depends:      binary >=0.5 && <0.11
     cpp-options:        -DDECLARE_BINARY_INSTANCE
 
   if flag(data-default)
@@ -125,6 +138,18 @@
     -- It's type signature hadn't changed since. Latest version of safecopy at
     -- the moment of writing this is 0.9.1.
 
+  if flag(lattices)
+    cpp-options:        -DDECLARE_LATTICE_INSTANCES
+    build-depends:      lattices >=1.4 && <2
+
+  if flag(dhall)
+    cpp-options:        -DDECLARE_DHALL_INSTANCES
+    build-depends:      dhall >=1.0.1 && <2
+
+  if flag(serialise)
+    cpp-options:        -DDECLARE_SERIALISE_INSTANCE
+    build-depends:      serialise >=0.2.1 && <1
+
 source-repository head
   type:                 git
   location:             git://github.com/trskop/verbosity
@@ -132,4 +157,4 @@
 source-repository this
   type:                 git
   location:             git://github.com/trskop/verbosity.git
-  tag:                  0.2.3.0
+  tag:                  0.3.0.0
