Enable/fix more warnings for GHC 8+.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 7 Jul 2016 16:31:54 +0000 (12:31 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 7 Jul 2016 16:31:54 +0000 (12:31 -0400)
haeredes.cabal
src/CommandLine.hs
src/Main.hs
src/Timeout.hs
test/Doctests.hs

index c1362992f01694a32edbb5103ba528dd4bf86ac7..4ce5f67ac07e1781bf752d1f0f84d919ce9d025f 100644 (file)
@@ -101,16 +101,11 @@ executable haeredes
     Timeout
 
   ghc-options:
-    -Wall
-    -fwarn-hi-shadowing
-    -fwarn-missing-signatures
-    -fwarn-name-shadowing
-    -fwarn-orphans
-    -fwarn-type-defaults
-    -fwarn-tabs
-    -fwarn-incomplete-record-updates
-    -fwarn-monomorphism-restriction
-    -fwarn-unused-do-bind
+    -Weverything
+    -Wno-implicit-prelude
+    -Wno-safe
+    -Wno-unsafe
+    -Wno-all-missed-specialisations
     -rtsopts
     -threaded
     -optc-O3
@@ -129,16 +124,11 @@ test-suite doctests
 
   -- It's not entirely clear to me why I have to reproduce all of this.
   ghc-options:
-    -Wall
-    -fwarn-hi-shadowing
-    -fwarn-missing-signatures
-    -fwarn-name-shadowing
-    -fwarn-orphans
-    -fwarn-type-defaults
-    -fwarn-tabs
-    -fwarn-incomplete-record-updates
-    -fwarn-monomorphism-restriction
-    -fwarn-unused-do-bind
+    -Weverything
+    -Wno-implicit-prelude
+    -Wno-safe
+    -Wno-unsafe
+    -Wno-all-missed-specialisations
     -rtsopts
     -threaded
     -optc-O3
index bd8b2f984ccb9432cd7d69dab7c2a809beaa6258..5539605df406d64e428aed128a388418fd0c8f6a 100644 (file)
@@ -31,7 +31,7 @@ import System.Console.CmdArgs (
 import Paths_haeredes (version)
 import Data.Version (showVersion)
 
-import Timeout (Timeout(..))
+import Timeout (Timeout(seconds))
 
 
 -- | Description of the 'NS' mode.
index f513ec67ff62149c5ec1409940cedbdab1bae7e2..f7a56ea5fbdf3fd8b6d50f4b2316396a3afd16f6 100644 (file)
@@ -20,18 +20,19 @@ import Network.DNS (
   normalize,
   normalizeCase,
   withResolver )
-import System.Exit (ExitCode(..), exitWith)
+import System.Exit (ExitCode(ExitFailure), exitWith)
 import System.IO (hPutStrLn, stderr)
 
-
-import CommandLine (Args(..), get_args)
+import CommandLine (
+   Args(NS,MX,delegates,no_append_root,server,timeout),
+   get_args)
 import DNS (
   LookupResult,
   lookupMX',
   lookupNS',
   resolve_address )
 import ExitCodes (exit_bad_server)
-import Timeout (Timeout(..))
+import Timeout (Timeout(seconds))
 
 
 -- | Given a list of delegates, report results for this
index 0b0f2e12798d507737cdcf203c33c9957b2e4855..70cadf91d16152d9e10b8e646db429d8843fbee7 100644 (file)
@@ -7,7 +7,7 @@ module Timeout
 where
 
 import Data.Data (Data)
-import System.Console.CmdArgs.Default (Default(..))
+import System.Console.CmdArgs.Default (Default(def))
 
 newtype Timeout =
   Timeout { seconds :: Int }
index d183b4b664d289ea123da751f562a937c34ff1ae..0c9ec0a3fd7c7715df72fdf1382d85dedb7cc646 100644 (file)
@@ -1,7 +1,7 @@
 module Main
 where
 
-import Test.DocTest
+import Test.DocTest (doctest)
 import System.FilePath.Find ((==?), always, extension, find)
 
 find_sources :: IO [FilePath]