aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2018-07-30 16:42:15 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2018-07-30 16:42:15 -0400
commit4256d1812062d566163e5797c75e4ede57669a7e (patch)
tree2932ecf1333e77d53b6109ea2fb2c72765475a8b /src
parent4e0ef35c509205def554d1f8e752f94215a9d770 (diff)
Enable `-Werror` and a reasonable set of warnings
Instead of using `-Weverything` and turning warnings off as they become problematic, enable `-Werror` and turn on a specific set of warnings judged to have high signal-to-noise ratio. Fix up all instances of those warnings in the code. These warnings are all available in GHC 8.0.1, which is the default in the current Debian (Debian 9).
Diffstat (limited to 'src')
-rw-r--r--src/Internal/Base.chs1
-rw-r--r--src/Internal/Digest.chs5
-rw-r--r--src/Internal/HMAC.chs5
3 files changed, 2 insertions, 9 deletions
diff --git a/src/Internal/Base.chs b/src/Internal/Base.chs
index c2e615a..f0b03cc 100644
--- a/src/Internal/Base.chs
+++ b/src/Internal/Base.chs
@@ -12,7 +12,6 @@
-- License for the specific language governing permissions and limitations under
-- the License.
-{-# OPTIONS_GHC -Wno-missing-methods #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
module Internal.Base where
diff --git a/src/Internal/Digest.chs b/src/Internal/Digest.chs
index 4708c47..bd331a7 100644
--- a/src/Internal/Digest.chs
+++ b/src/Internal/Digest.chs
@@ -13,7 +13,6 @@
-- the License.
{-# OPTIONS_GHC -Wno-missing-methods #-}
-{-# OPTIONS_GHC -Wno-orphans #-}
module Internal.Digest
( evpMD5, evpSHA1, evpSHA224, evpSHA256, evpSHA384, evpSHA512
@@ -22,9 +21,7 @@ module Internal.Digest
, evpMaxMDSize
) where
-import Foreign
- (FinalizerPtr, ForeignPtr, Ptr, Storable(alignment, sizeOf),
- addForeignPtrFinalizer, mallocForeignPtr, withForeignPtr)
+import Foreign (FinalizerPtr, ForeignPtr, Ptr, Storable(alignment, sizeOf))
import Foreign.C.Types
import Foreign.Ptr.Cast (asVoidPtr)
diff --git a/src/Internal/HMAC.chs b/src/Internal/HMAC.chs
index 88ac1fb..2151785 100644
--- a/src/Internal/HMAC.chs
+++ b/src/Internal/HMAC.chs
@@ -13,16 +13,13 @@
-- the License.
{-# OPTIONS_GHC -Wno-missing-methods #-}
-{-# OPTIONS_GHC -Wno-orphans #-}
module Internal.HMAC
( mallocHMACCtx
, hmacInitEx, hmacUpdate, hmacFinal
) where
-import Foreign
- (FinalizerPtr, ForeignPtr, Ptr, Storable(alignment, sizeOf),
- addForeignPtrFinalizer, mallocForeignPtr, withForeignPtr)
+import Foreign (FinalizerPtr, ForeignPtr, Ptr, Storable(alignment, sizeOf))
import Foreign.C.Types
import Foreign.Ptr.Cast (asVoidPtr)