diff --git a/dead-code-detection.cabal b/dead-code-detection.cabal
--- a/dead-code-detection.cabal
+++ b/dead-code-detection.cabal
@@ -3,7 +3,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           dead-code-detection
-version:        0.3
+version:        0.4
 synopsis:       detect dead code in haskell projects
 description:    detect dead code in haskell projects
 category:       Development
@@ -31,7 +31,7 @@
   build-depends:
       base == 4.*
     , silently
-    , getopt-generics
+    , getopt-generics == 0.12.*
     , ghc
     , Glob
     , string-conversions
@@ -60,7 +60,7 @@
   build-depends:
       base == 4.*
     , silently
-    , getopt-generics
+    , getopt-generics == 0.12.*
     , ghc
     , Glob
     , string-conversions
diff --git a/src/Ast/UsedNames.hs b/src/Ast/UsedNames.hs
--- a/src/Ast/UsedNames.hs
+++ b/src/Ast/UsedNames.hs
@@ -51,6 +51,7 @@
     SigPatIn pat _sig -> usedNames pat
     BangPat pat -> usedNames pat
     NPat{} -> []
+    LitPat{} -> []
     x -> o x
 
 instance UsedNames (HsConDetails (LPat Name) (HsRecFields Name (LPat Name))) where
diff --git a/src/Run.hs b/src/Run.hs
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -10,10 +10,9 @@
 import           Development.GitRev
 import           FastString
 import           GHC
-import qualified GHC.Generics
 import           OccName
-import           System.Console.GetOpt.Generics
 import           System.Exit
+import           WithCli
 
 import           Ast
 import           Files
@@ -28,31 +27,29 @@
     version :: Bool,
     includeUnderscoreNames :: Bool
   }
-  deriving (Show, Eq, GHC.Generics.Generic)
+  deriving (Show, Eq, Generic)
 
-instance Generic Options
-instance HasDatatypeInfo Options
+instance HasArguments Options
 
 run :: IO ()
 run = do
-  options <- modifiedGetArguments $
-    AddShortOption "sourceDirs" 'i' :
-    []
-  when (version options) $ do
-    putStrLn versionOutput
-    throwIO ExitSuccess
-  when (null $ root options) $
-    die "missing option: --root=STRING"
-  files <- findHaskellFiles (sourceDirs options)
-  deadNames <- deadNamesFromFiles
-    files
-    (map mkModuleName (root options))
-    (includeUnderscoreNames options)
-  case deadNames of
-    [] -> return ()
-    _ -> do
-      forM_ deadNames putStrLn
-      exitWith $ ExitFailure 1
+  let mods = [AddShortOption "sourceDirs" 'i']
+  withCliModified mods $ \ options -> do
+    when (version options) $ do
+      putStrLn versionOutput
+      throwIO ExitSuccess
+    when (null $ root options) $
+      die "missing option: --root=STRING"
+    files <- findHaskellFiles (sourceDirs options)
+    deadNames <- deadNamesFromFiles
+      files
+      (map mkModuleName (root options))
+      (includeUnderscoreNames options)
+    case deadNames of
+      [] -> return ()
+      _ -> do
+        forM_ deadNames putStrLn
+        exitWith $ ExitFailure 1
 
 versionOutput :: String
 versionOutput =
