diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+0.5.2.0
+
+* Switch to hpack
+* Add sane GHC compile options
+* Add Generic deriving to all types
+
 0.5.1.0
 
 * Add GZip compression support (thanks to Pavel Kučera @pavelkucera)
diff --git a/Network/Kafka.hs b/Network/Kafka.hs
--- a/Network/Kafka.hs
+++ b/Network/Kafka.hs
@@ -1,8 +1,3 @@
-{-# LANGUAGE ConstraintKinds #-}
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE TemplateHaskell #-}
-{-# LANGUAGE FlexibleContexts #-}
-
 module Network.Kafka where
 
 import Control.Applicative
@@ -19,6 +14,7 @@
 import qualified Data.List.NonEmpty as NE
 import Data.Monoid ((<>))
 import qualified Data.Pool as Pool
+import GHC.Generics (Generic)
 import System.IO
 import qualified Data.Map as M
 import Data.Set (Set)
@@ -52,7 +48,7 @@
                              , _stateTopicMetadata :: M.Map TopicName TopicMetadata
                                -- | Address cache
                              , _stateAddresses :: NonEmpty KafkaAddress
-                             } deriving (Show)
+                             } deriving (Generic, Show)
 
 makeLenses ''KafkaState
 
@@ -70,7 +66,7 @@
                       | KafkaInvalidBroker Leader
                       | KafkaFailedToFetchMetadata
                       | KafkaIOException IOException
-                        deriving (Eq, Show)
+                        deriving (Eq, Generic, Show)
 
 instance Exception KafkaClientError
 
@@ -81,25 +77,26 @@
                | EarliestTime
                  -- | A specific time.
                | OtherTime Time
+               deriving (Eq, Generic)
 
 data PartitionAndLeader = PartitionAndLeader { _palTopic :: TopicName
                                              , _palPartition :: Partition
                                              , _palLeader :: Leader
                                              }
-                                             deriving (Show, Eq, Ord)
+                                             deriving (Show, Generic, Eq, Ord)
 
 makeLenses ''PartitionAndLeader
 
 data TopicAndPartition = TopicAndPartition { _tapTopic :: TopicName
                                            , _tapPartition :: Partition
                                            }
-                         deriving (Eq, Ord, Show)
+                         deriving (Eq, Generic, Ord, Show)
 
 -- | A topic with a serializable message.
 data TopicAndMessage = TopicAndMessage { _tamTopic :: TopicName
                                        , _tamMessage :: Message
                                        }
-                       deriving (Eq, Show)
+                       deriving (Eq, Generic, Show)
 
 makeLenses ''TopicAndMessage
 
diff --git a/Network/Kafka/Consumer.hs b/Network/Kafka/Consumer.hs
--- a/Network/Kafka/Consumer.hs
+++ b/Network/Kafka/Consumer.hs
@@ -1,6 +1,3 @@
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE FlexibleContexts #-}
-
 module Network.Kafka.Consumer where
 
 import Control.Applicative
diff --git a/Network/Kafka/Producer.hs b/Network/Kafka/Producer.hs
--- a/Network/Kafka/Producer.hs
+++ b/Network/Kafka/Producer.hs
@@ -1,5 +1,3 @@
-{-# LANGUAGE FlexibleContexts #-}
-
 module Network.Kafka.Producer where
 
 import Data.Bits ((.&.))
diff --git a/Network/Kafka/Protocol.hs b/Network/Kafka/Protocol.hs
--- a/Network/Kafka/Protocol.hs
+++ b/Network/Kafka/Protocol.hs
@@ -1,9 +1,3 @@
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-{-# LANGUAGE GADTs #-}
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE TemplateHaskell #-}
-{-# LANGUAGE Rank2Types #-}
-
 module Network.Kafka.Protocol
   ( module Network.Kafka.Protocol
   ) where
@@ -22,6 +16,7 @@
 import Data.Serialize.Get
 import Data.Serialize.Put
 import GHC.Exts (IsString(..))
+import GHC.Generics (Generic)
 import System.IO
 import Numeric.Lens
 import Prelude hiding ((.), id)
@@ -63,12 +58,12 @@
 class Deserializable a where
   deserialize :: Get a
 
-newtype GroupCoordinatorResponse = GroupCoordinatorResp (KafkaError, Broker) deriving (Show, Eq, Deserializable)
+newtype GroupCoordinatorResponse = GroupCoordinatorResp (KafkaError, Broker) deriving (Show, Generic, Eq, Deserializable)
 
-newtype ApiKey = ApiKey Int16 deriving (Show, Eq, Deserializable, Serializable, Num, Integral, Ord, Real, Enum) -- numeric ID for API (i.e. metadata req, produce req, etc.)
-newtype ApiVersion = ApiVersion Int16 deriving (Show, Eq, Deserializable, Serializable, Num, Integral, Ord, Real, Enum)
-newtype CorrelationId = CorrelationId Int32 deriving (Show, Eq, Deserializable, Serializable, Num, Integral, Ord, Real, Enum)
-newtype ClientId = ClientId KafkaString deriving (Show, Eq, Deserializable, Serializable, IsString)
+newtype ApiKey = ApiKey Int16 deriving (Show, Eq, Deserializable, Serializable, Num, Integral, Ord, Real, Generic, Enum) -- numeric ID for API (i.e. metadata req, produce req, etc.)
+newtype ApiVersion = ApiVersion Int16 deriving (Show, Eq, Deserializable, Serializable, Num, Integral, Ord, Real, Generic, Enum)
+newtype CorrelationId = CorrelationId Int32 deriving (Show, Eq, Deserializable, Serializable, Num, Integral, Ord, Real, Generic, Enum)
+newtype ClientId = ClientId KafkaString deriving (Show, Eq, Deserializable, Serializable, Generic, IsString)
 
 data RequestMessage = MetadataRequest MetadataRequest
                     | ProduceRequest ProduceRequest
@@ -77,93 +72,93 @@
                     | OffsetCommitRequest OffsetCommitRequest
                     | OffsetFetchRequest OffsetFetchRequest
                     | GroupCoordinatorRequest GroupCoordinatorRequest
-                    deriving (Show, Eq)
+                    deriving (Show, Generic, Eq)
 
-newtype MetadataRequest = MetadataReq [TopicName] deriving (Show, Eq, Serializable, Deserializable)
-newtype TopicName = TName { _tName :: KafkaString } deriving (Eq, Ord, Deserializable, Serializable, IsString)
+newtype MetadataRequest = MetadataReq [TopicName] deriving (Show, Eq, Serializable, Generic, Deserializable)
+newtype TopicName = TName { _tName :: KafkaString } deriving (Eq, Ord, Deserializable, Serializable, Generic, IsString)
 
 instance Show TopicName where
   show = show . B.unpack . _kString. _tName
 
-newtype KafkaBytes = KBytes { _kafkaByteString :: ByteString } deriving (Show, Eq, IsString)
-newtype KafkaString = KString { _kString :: ByteString } deriving (Show, Eq, Ord, IsString)
+newtype KafkaBytes = KBytes { _kafkaByteString :: ByteString } deriving (Show, Eq, Generic, IsString)
+newtype KafkaString = KString { _kString :: ByteString } deriving (Show, Eq, Ord, Generic, IsString)
 
 newtype ProduceResponse =
   ProduceResp { _produceResponseFields :: [(TopicName, [(Partition, KafkaError, Offset)])] }
-  deriving (Show, Eq, Deserializable, Serializable)
+  deriving (Show, Eq, Deserializable, Serializable, Generic)
 
 newtype OffsetResponse =
   OffsetResp { _offsetResponseFields :: [(TopicName, [PartitionOffsets])] }
-  deriving (Show, Eq, Deserializable)
+  deriving (Show, Eq, Deserializable, Generic)
 
 newtype PartitionOffsets =
   PartitionOffsets { _partitionOffsetsFields :: (Partition, KafkaError, [Offset]) }
-  deriving (Show, Eq, Deserializable)
+  deriving (Show, Eq, Deserializable, Generic)
 
 newtype FetchResponse =
   FetchResp { _fetchResponseFields :: [(TopicName, [(Partition, KafkaError, Offset, MessageSet)])] }
-  deriving (Show, Eq, Serializable, Deserializable)
+  deriving (Show, Eq, Serializable, Deserializable, Generic)
 
-newtype MetadataResponse = MetadataResp { _metadataResponseFields :: ([Broker], [TopicMetadata]) } deriving (Show, Eq, Deserializable)
-newtype Broker = Broker { _brokerFields :: (NodeId, Host, Port) } deriving (Show, Eq, Ord, Deserializable)
-newtype NodeId = NodeId { _nodeId :: Int32 } deriving (Show, Eq, Deserializable, Num, Integral, Ord, Real, Enum)
-newtype Host = Host { _hostKString :: KafkaString } deriving (Show, Eq, Ord, Deserializable, IsString)
-newtype Port = Port { _portInt :: Int32 } deriving (Show, Eq, Deserializable, Num, Integral, Ord, Real, Enum)
-newtype TopicMetadata = TopicMetadata { _topicMetadataFields :: (KafkaError, TopicName, [PartitionMetadata]) } deriving (Show, Eq, Deserializable)
-newtype PartitionMetadata = PartitionMetadata { _partitionMetadataFields :: (KafkaError, Partition, Leader, Replicas, Isr) } deriving (Show, Eq, Deserializable)
-newtype Leader = Leader { _leaderId :: Maybe Int32 } deriving (Show, Eq, Ord)
+newtype MetadataResponse = MetadataResp { _metadataResponseFields :: ([Broker], [TopicMetadata]) } deriving (Show, Eq, Deserializable, Generic)
+newtype Broker = Broker { _brokerFields :: (NodeId, Host, Port) } deriving (Show, Eq, Ord, Deserializable, Generic)
+newtype NodeId = NodeId { _nodeId :: Int32 } deriving (Show, Eq, Deserializable, Num, Integral, Ord, Real, Enum, Generic)
+newtype Host = Host { _hostKString :: KafkaString } deriving (Show, Eq, Ord, Deserializable, IsString, Generic)
+newtype Port = Port { _portInt :: Int32 } deriving (Show, Eq, Deserializable, Num, Integral, Ord, Real, Enum, Generic)
+newtype TopicMetadata = TopicMetadata { _topicMetadataFields :: (KafkaError, TopicName, [PartitionMetadata]) } deriving (Show, Eq, Deserializable, Generic)
+newtype PartitionMetadata = PartitionMetadata { _partitionMetadataFields :: (KafkaError, Partition, Leader, Replicas, Isr) } deriving (Show, Eq, Deserializable, Generic)
+newtype Leader = Leader { _leaderId :: Maybe Int32 } deriving (Show, Eq, Ord, Generic)
 
-newtype Replicas = Replicas [Int32] deriving (Show, Eq, Serializable, Deserializable)
-newtype Isr = Isr [Int32] deriving (Show, Eq, Deserializable)
+newtype Replicas = Replicas [Int32] deriving (Show, Eq, Serializable, Deserializable, Generic)
+newtype Isr = Isr [Int32] deriving (Show, Eq, Deserializable, Generic)
 
-newtype OffsetCommitResponse = OffsetCommitResp [(TopicName, [(Partition, KafkaError)])] deriving (Show, Eq, Deserializable)
-newtype OffsetFetchResponse = OffsetFetchResp [(TopicName, [(Partition, Offset, Metadata, KafkaError)])] deriving (Show, Eq, Deserializable)
+newtype OffsetCommitResponse = OffsetCommitResp [(TopicName, [(Partition, KafkaError)])] deriving (Show, Eq, Deserializable, Generic)
+newtype OffsetFetchResponse = OffsetFetchResp [(TopicName, [(Partition, Offset, Metadata, KafkaError)])] deriving (Show, Eq, Deserializable, Generic)
 
-newtype OffsetRequest = OffsetReq (ReplicaId, [(TopicName, [(Partition, Time, MaxNumberOfOffsets)])]) deriving (Show, Eq, Serializable)
-newtype Time = Time { _timeInt :: Int64 } deriving (Show, Eq, Serializable, Num, Integral, Ord, Real, Enum, Bounded)
-newtype MaxNumberOfOffsets = MaxNumberOfOffsets Int32 deriving (Show, Eq, Serializable, Num, Integral, Ord, Real, Enum)
+newtype OffsetRequest = OffsetReq (ReplicaId, [(TopicName, [(Partition, Time, MaxNumberOfOffsets)])]) deriving (Show, Eq, Serializable, Generic)
+newtype Time = Time { _timeInt :: Int64 } deriving (Show, Eq, Serializable, Num, Integral, Ord, Real, Enum, Bounded, Generic)
+newtype MaxNumberOfOffsets = MaxNumberOfOffsets Int32 deriving (Show, Eq, Serializable, Num, Integral, Ord, Real, Enum, Generic)
 
 newtype FetchRequest =
   FetchReq (ReplicaId, MaxWaitTime, MinBytes,
             [(TopicName, [(Partition, Offset, MaxBytes)])])
-  deriving (Show, Eq, Deserializable, Serializable)
+  deriving (Show, Eq, Deserializable, Serializable, Generic)
 
-newtype ReplicaId = ReplicaId Int32 deriving (Show, Eq, Num, Integral, Ord, Real, Enum, Serializable, Deserializable)
-newtype MaxWaitTime = MaxWaitTime Int32 deriving (Show, Eq, Num, Integral, Ord, Real, Enum, Serializable, Deserializable)
-newtype MinBytes = MinBytes Int32 deriving (Show, Eq, Num, Integral, Ord, Real, Enum, Serializable, Deserializable)
-newtype MaxBytes = MaxBytes Int32 deriving (Show, Eq, Num, Integral, Ord, Real, Enum, Serializable, Deserializable)
+newtype ReplicaId = ReplicaId Int32 deriving (Show, Eq, Num, Integral, Ord, Real, Enum, Serializable, Deserializable, Generic)
+newtype MaxWaitTime = MaxWaitTime Int32 deriving (Show, Eq, Num, Integral, Ord, Real, Enum, Serializable, Deserializable, Generic)
+newtype MinBytes = MinBytes Int32 deriving (Show, Eq, Num, Integral, Ord, Real, Enum, Serializable, Deserializable, Generic)
+newtype MaxBytes = MaxBytes Int32 deriving (Show, Eq, Num, Integral, Ord, Real, Enum, Serializable, Deserializable, Generic)
 
 newtype ProduceRequest =
   ProduceReq (RequiredAcks, Timeout,
               [(TopicName, [(Partition, MessageSet)])])
-  deriving (Show, Eq, Serializable)
+  deriving (Show, Eq, Serializable, Generic)
 
 newtype RequiredAcks =
-  RequiredAcks Int16 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum)
+  RequiredAcks Int16 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum, Generic)
 newtype Timeout =
-  Timeout Int32 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum)
+  Timeout Int32 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum, Generic)
 newtype Partition =
-  Partition Int32 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum)
+  Partition Int32 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum, Generic)
 
 data MessageSet = MessageSet { _codec :: CompressionCodec, _messageSetMembers :: [MessageSetMember] }
-  deriving (Show, Eq)
+  deriving (Show, Eq, Generic)
 data MessageSetMember =
-  MessageSetMember { _setOffset :: Offset, _setMessage :: Message } deriving (Show, Eq)
+  MessageSetMember { _setOffset :: Offset, _setMessage :: Message } deriving (Show, Eq, Generic)
 
-newtype Offset = Offset Int64 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum)
+newtype Offset = Offset Int64 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum, Generic)
 
 newtype Message =
   Message { _messageFields :: (Crc, MagicByte, Attributes, Key, Value) }
-  deriving (Show, Eq, Deserializable)
+  deriving (Show, Eq, Deserializable, Generic)
 
-data CompressionCodec = NoCompression | Gzip deriving (Show, Eq)
+data CompressionCodec = NoCompression | Gzip deriving (Show, Eq, Generic)
 
-newtype Crc = Crc Int32 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum)
-newtype MagicByte = MagicByte Int8 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum)
-data Attributes = Attributes { _compressionCodec :: CompressionCodec } deriving (Show, Eq)
+newtype Crc = Crc Int32 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum, Generic)
+newtype MagicByte = MagicByte Int8 deriving (Show, Eq, Serializable, Deserializable, Num, Integral, Ord, Real, Enum, Generic)
+data Attributes = Attributes { _compressionCodec :: CompressionCodec } deriving (Show, Eq, Generic)
 
-newtype Key = Key { _keyBytes :: Maybe KafkaBytes } deriving (Show, Eq)
-newtype Value = Value { _valueBytes :: Maybe KafkaBytes } deriving (Show, Eq)
+newtype Key = Key { _keyBytes :: Maybe KafkaBytes } deriving (Show, Eq, Generic)
+newtype Value = Value { _valueBytes :: Maybe KafkaBytes } deriving (Show, Eq, Generic)
 
 data ResponseMessage = MetadataResponse MetadataResponse
                      | ProduceResponse ProduceResponse
@@ -172,14 +167,14 @@
                      | OffsetCommitResponse OffsetCommitResponse
                      | OffsetFetchResponse OffsetFetchResponse
                      | GroupCoordinatorResponse GroupCoordinatorResponse
-                     deriving (Show, Eq)
+                     deriving (Show, Eq, Generic)
 
-newtype GroupCoordinatorRequest = GroupCoordinatorReq ConsumerGroup deriving (Show, Eq, Serializable)
+newtype GroupCoordinatorRequest = GroupCoordinatorReq ConsumerGroup deriving (Show, Eq, Serializable, Generic)
 
-newtype OffsetCommitRequest = OffsetCommitReq (ConsumerGroup, [(TopicName, [(Partition, Offset, Time, Metadata)])]) deriving (Show, Eq, Serializable)
-newtype OffsetFetchRequest = OffsetFetchReq (ConsumerGroup, [(TopicName, [Partition])]) deriving (Show, Eq, Serializable)
-newtype ConsumerGroup = ConsumerGroup KafkaString deriving (Show, Eq, Serializable, Deserializable, IsString)
-newtype Metadata = Metadata KafkaString deriving (Show, Eq, Serializable, Deserializable, IsString)
+newtype OffsetCommitRequest = OffsetCommitReq (ConsumerGroup, [(TopicName, [(Partition, Offset, Time, Metadata)])]) deriving (Show, Eq, Serializable, Generic)
+newtype OffsetFetchRequest = OffsetFetchReq (ConsumerGroup, [(TopicName, [Partition])]) deriving (Show, Eq, Serializable, Generic)
+newtype ConsumerGroup = ConsumerGroup KafkaString deriving (Show, Eq, Serializable, Deserializable, IsString, Generic)
+newtype Metadata = Metadata KafkaString deriving (Show, Eq, Serializable, Deserializable, IsString, Generic)
 
 errorKafka :: KafkaError -> Int16
 errorKafka NoError                             = 0
@@ -217,7 +212,7 @@
                 | OffsetsLoadInProgressCode -- ^ @14@ The broker returns this error code for an offset fetch request if it is still loading offsets (after a leader change for that offsets topic partition).
                 | ConsumerCoordinatorNotAvailableCode -- ^ @15@ The broker returns this error code for consumer metadata requests or offset commit requests if the offsets topic has not yet been created.
                 | NotCoordinatorForConsumerCode -- ^ @16@ The broker returns this error code if it receives an offset fetch or commit request for a consumer group that it is not a coordinator for.
-                deriving (Eq, Show)
+                deriving (Bounded, Enum, Eq, Generic, Show)
 
 instance Serializable KafkaError where
   serialize = serialize . errorKafka
@@ -247,7 +242,7 @@
 
 instance Exception KafkaError
 
-newtype Request = Request (CorrelationId, ClientId, RequestMessage) deriving (Show, Eq)
+newtype Request = Request (CorrelationId, ClientId, RequestMessage) deriving (Show, Eq, Generic)
 
 instance Serializable Request where
   serialize (Request (correlationId, clientId, r)) = do
diff --git a/milena.cabal b/milena.cabal
--- a/milena.cabal
+++ b/milena.cabal
@@ -1,76 +1,79 @@
-name:                milena
+-- This file has been generated from package.yaml by hpack version 0.18.1.
+--
+-- see: https://github.com/sol/hpack
 
--- http://www.haskell.org/haskellwiki/Package_versioning_policy
--- PVP summary:      +-+------- breaking API changes
---                   | | +----- non-breaking API additions
---                   | | | +--- code changes with no API change
-version:             0.5.1.0
-synopsis:            A Kafka client for Haskell.
-description:
-  A Kafka client for Haskell.
-  The protocol module is stable (the only changes will be to support changes in the Kafka protocol). The API is functional but subject to change.
-license:             BSD3
-license-file:        LICENSE
-author:              Tyler Holien
-maintainer:          adam@adamflott.com
-copyright:           2014, Tyler Holien
-category:            Network
-build-type:          Simple
-stability:           alpha
-cabal-version:       >=1.10
-extra-source-files:  README.md
-bug-reports:         https://github.com/adamflott/milena/issues
-tested-with:         GHC == 7.10.3, GHC == 8.0.1
+name:           milena
+version:        0.5.2.0
+synopsis:       A Kafka client for Haskell.
+description:    A Kafka client for Haskell.
+                The protocol module is stable (the only changes will be to support changes in the Kafka protocol). The API is functional but subject to change.
+category:       Network
+stability:      alpha
+homepage:       https://github.com/adamflott/milena.git#readme
+bug-reports:    https://github.com/adamflott/milena.git/issues
+author:         Tyler Holien
+maintainer:     adam@adamflott.com
+copyright:      2014, Tyler Holien
+license:        BSD3
+license-file:   LICENSE
+tested-with:    GHC==7.10.3 GHC==8.0.1
+build-type:     Simple
+cabal-version:  >= 1.10
+
 extra-source-files:
     CHANGELOG.md
+    README.md
 
 source-repository head
   type: git
   location: https://github.com/adamflott/milena.git
 
-source-repository this
-  type: git
-  location: https://github.com/adamflott/milena.git
-  tag: 0.5.0.2
-
 library
+  default-extensions: ConstraintKinds DeriveGeneric FlexibleContexts GADTs GeneralizedNewtypeDeriving OverloadedStrings Rank2Types TemplateHaskell
+  ghc-options: -Wall -fwarn-unused-imports -Wincomplete-uni-patterns -Wincomplete-record-updates
+  build-depends:
+      base >=4.7 && <5
+    , bytestring >=0.10 && <0.11
+    , cereal >=0.4 && <0.6
+    , containers >=0.5 && <0.6
+    , digest >=0.0.1.0 && <0.1
+    , lens >=4.4 && <4.16
+    , lifted-base >=0.2.3.6 && <0.3
+    , monad-control >=1.0 && <1.1
+    , mtl >=2.1 && <2.3
+    , murmur-hash >=0.1.0.8 && <0.2
+    , network >=2.4 && <2.7
+    , random >=1.0 && <1.2
+    , resource-pool >=0.2.3.2 && <0.3
+    , semigroups >=0.16.2.2 && <0.19
+    , transformers >=0.3 && <0.6
+    , zlib >=0.6.1.2 && <0.7
+  exposed-modules:
+      Network.Kafka
+      Network.Kafka.Consumer
+      Network.Kafka.Protocol
+      Network.Kafka.Producer
+  other-modules:
+      Paths_milena
   default-language: Haskell2010
-  ghc-options:         -Wall -fwarn-incomplete-uni-patterns
-  exposed-modules:     Network.Kafka,
-                       Network.Kafka.Consumer,
-                       Network.Kafka.Protocol,
-                       Network.Kafka.Producer
-  build-depends:       base          >=4.7      && <5,
-                       mtl           >=2.1      && <2.3,
-                       cereal        >=0.4      && <0.6,
-                       bytestring    >=0.10     && <0.11,
-                       network       >=2.4      && <2.7,
-                       digest        >=0.0.1.0  && <0.1,
-                       containers    >=0.5      && <0.6,
-                       monad-control >=1.0      && <1.1,
-                       random        >=1.0      && <1.2,
-                       transformers  >=0.3      && <0.6,
-                       lens          >=4.4      && <4.16,
-                       resource-pool >=0.2.3.2  && <0.3,
-                       lifted-base   >=0.2.3.6  && <0.3,
-                       murmur-hash   >=0.1.0.8  && <0.2,
-                       semigroups    >=0.16.2.2 && <0.19,
-                       zlib          >=0.6.1.2  && <0.7
 
 test-suite test
+  type: exitcode-stdio-1.0
+  main-is: tests.hs
+  hs-source-dirs:
+      test
+  default-extensions: ConstraintKinds DeriveGeneric FlexibleContexts GADTs GeneralizedNewtypeDeriving OverloadedStrings Rank2Types TemplateHaskell
+  ghc-options: -Wall -fwarn-unused-imports -Wincomplete-uni-patterns -Wincomplete-record-updates -threaded -rtsopts
+  build-depends:
+      base
+    , milena
+    , mtl
+    , network
+    , QuickCheck
+    , bytestring
+    , lens
+    , semigroups
+    , tasty
+    , tasty-hspec
+    , tasty-quickcheck
   default-language: Haskell2010
-  ghc-options:         -Wall -threaded -fwarn-incomplete-uni-patterns
-  build-depends:       base,
-                       milena,
-                       mtl,
-                       network,
-                       QuickCheck,
-                       bytestring,
-                       lens,
-                       semigroups,
-                       tasty,
-                       tasty-hspec,
-                       tasty-quickcheck
-  hs-source-dirs:      test
-  main-is:             tests.hs
-  type:                exitcode-stdio-1.0
