diff --git a/cld2.cabal b/cld2.cabal
--- a/cld2.cabal
+++ b/cld2.cabal
@@ -1,9 +1,9 @@
 name: cld2
-version: 0.1.0.1
+version: 0.1.1.0
 synopsis: Haskell bindings to Google's Compact Language Detector 2
 description: This package provides simple Haskell bindings for Compact Language
              Detector 2, a language-detection library used by Google Chrome.
-             See https://code.google.com/p/cld2/ for more information on CLD2.
+             See <https://code.google.com/p/cld2/> for more information on CLD2.
 homepage: https://github.com/dfoxfranke/haskell-cld2
 license: Apache-2.0
 license-file: LICENSE
@@ -45,6 +45,7 @@
         location: https://github.com/dfoxfranke/haskell-cld2.git
 
 library
+        ghc-options: -Wall
         c-sources: cbits/cld2_generated_cjk_compatible.cc,
                    cbits/cld2_generated_deltaocta0122.cc,
                    cbits/cld2_generated_distinctocta0122.cc,
@@ -70,10 +71,12 @@
                    cbits/scoreonescriptspan.cc,
                    cbits/tote.cc,
                    cbits/utf8statetable.cc
+        cc-options: -std=c++98
         extra-libraries: stdc++
         exposed-modules: Text.CLD2
         build-depends: base ==4.*,
                        bytestring < 0.11,
+                       hashable,
                        text < 1.3
         hs-source-dirs: src
         default-language: Haskell2010
diff --git a/src/Text/CLD2.hs b/src/Text/CLD2.hs
--- a/src/Text/CLD2.hs
+++ b/src/Text/CLD2.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE Trustworthy, DeriveDataTypeable #-}
+{-# LANGUAGE Trustworthy, DeriveDataTypeable, DeriveAnyClass, DeriveGeneric #-}
 {-# OPTIONS_HADDOCK show-extensions #-}
 
 {-
@@ -37,20 +37,21 @@
 
 import Control.Exception(AsyncException(..),AssertionFailed(..),mask_,throwIO)
 import Data.Bits(Bits(..), (.|.))
-import Data.ByteString(ByteString)
 import Data.ByteString.Unsafe(unsafeUseAsCStringLen)
 import Data.Data(Data)
 import Data.Functor((<$>))
+import Data.Hashable(Hashable)
 import Data.Text(Text)
 import Data.Text.Encoding(encodeUtf8)
 import Data.Typeable(Typeable)
 import Foreign.C.Error(Errno(..), eNOMEM, eOK)
 import Foreign.C.String(CString, withCString)
 import Foreign.C.Types(CShort(..),CInt(..),CChar(..),CDouble(..),CSize(..))
-import Foreign.Ptr(Ptr(..), nullPtr)
+import Foreign.Ptr(Ptr, nullPtr)
 import Foreign.Marshal.Alloc(alloca, free)
 import Foreign.Marshal.Array(peekArray, allocaArray)
 import Foreign.Storable(peek)
+import GHC.Generics(Generic)
 import System.IO.Unsafe(unsafePerformIO)
 
 -- | An enumeration of all languages recognized by CLD2
@@ -669,7 +670,7 @@
   | Cld2Language_X_Sharada
   | Cld2Language_X_Sora_Sompeng
   | Cld2Language_X_Takri
-  deriving (Eq,Ord,Show,Bounded,Enum,Typeable,Data)
+  deriving (Eq,Ord,Show,Bounded,Enum,Typeable,Data,Generic,Hashable)
 
 -- | An enumeration of character encodings which can be included in 'Hints'
 data Encoding =
@@ -748,7 +749,7 @@
   | Cld2Encoding_SOFTBANK_SHIFT_JIS
   | Cld2Encoding_KDDI_ISO_2022_JP
   | Cld2Encoding_SOFTBANK_ISO_2022_JP
-  deriving (Eq,Ord,Show,Bounded,Enum,Typeable,Data)
+  deriving (Eq,Ord,Show,Bounded,Enum,Typeable,Data,Generic,Hashable)
 
 -- | A collection of contextual clues which can help improve the
 -- accuracy of language detection
@@ -761,7 +762,7 @@
             hintEncoding :: Encoding,
             -- | A hint from any other available context
             hintLanguage :: Language }
-             deriving (Eq,Ord,Show,Typeable,Data)
+             deriving (Eq,Ord,Show,Typeable,Data,Generic,Hashable)
 
 -- | The default set of hints, which is @Hints@ @Nothing@ @Nothing@ @Cld2Encoding_UNKNOWN_ENCODING@ @Cld2Language_UNKNOWN_LANGUAGE@
 defaultHints :: Hints
@@ -774,7 +775,7 @@
                                debugFlagVerbose :: Bool,
                                debugFlagQuiet :: Bool,
                                debugFlagEcho :: Bool }
-                  deriving (Eq,Ord,Show,Typeable,Data)
+                  deriving (Eq,Ord,Show,Typeable,Data,Generic,Hashable)
 
 -- | The default set of debugging flags, all @False@
 defaultDebugFlags :: DebugFlags
@@ -788,7 +789,7 @@
             chunkSize :: Int,
             -- | The detected language of this chunk
             chunkLanguage :: Language }
-             deriving (Eq,Ord,Show,Typeable,Data)
+             deriving (Eq,Ord,Show,Typeable,Data,Generic,Hashable)
 
 -- | The result of performing language detection on a corpus
 data Result = Result {
@@ -806,7 +807,7 @@
       resultTextBytes :: Int,
       -- | Whether this result should be considered reliable
       resultIsReliable :: Bool }
-              deriving (Eq,Ord,Show,Typeable,Data)
+              deriving (Eq,Ord,Show,Typeable,Data,Generic,Hashable)
 
 foreign import ccall "cld2_haskell_shim" c_cld2_haskell_shim ::
   Ptr CInt -> Ptr CChar -> CInt -> CInt -> CString -> CString -> CInt -> CInt
@@ -824,7 +825,7 @@
 
 takeBit :: (Bits a) => a -> Bool -> a
 takeBit x True = x
-takeBit x False = zeroBits
+takeBit _x False = zeroBits
 
 flagsToCInt :: DebugFlags -> CInt
 flagsToCInt (DebugFlags a b c d e f) =
@@ -911,7 +912,7 @@
                                 peekArray 3 cPercent3
                             [cScore0, cScore1, cScore2] <-
                                 peekArray 3 cScore3
-                            cNumChunks <- fromEnum <$> peek cNumChunksPtr
+                            _cNumChunks <- fromEnum <$> peek cNumChunksPtr
                             cTextBytes <- peek cTextBytesPtr
                             cIsReliable <- peek cIsReliablePtr
                             let theSimple =
@@ -942,6 +943,7 @@
                                    theSimple theTop3 theTop3Percent
                                    (theScore0, theScore1, theScore2)
                                    theChunks theTextBytes theIsReliable
+
 
 -- | Call 'detectLanguageDebug' with all debug flags disabled and
 -- call 'unsafePerformIO' on the result. This is the recommended
