diff --git a/OptDir.cabal b/OptDir.cabal
--- a/OptDir.cabal
+++ b/OptDir.cabal
@@ -1,6 +1,6 @@
 Name:           OptDir
-Version:        0.0.1
-Cabal-Version:  >= 1.8
+Version:        0.0.2
+Cabal-Version:  >= 1.10
 License:        BSD3
 License-file:   LICENSE
 Author:         Masahiro Sakai
@@ -16,7 +16,9 @@
   location: git://github.com/msakai/haskell-optdir.git
 
 Library
-  Build-Depends:      base >=4 && <5, syb
+  Build-Depends:      base >=4 && <5, syb, hashable
   Hs-Source-Dirs:     src
   Exposed-Modules:    Data.OptDir
+  Default-Language:   Haskell2010
+  Other-Extensions:   DeriveDataTypeable
   GHC-Options:        -Wall
diff --git a/src/Data/OptDir.hs b/src/Data/OptDir.hs
--- a/src/Data/OptDir.hs
+++ b/src/Data/OptDir.hs
@@ -22,6 +22,7 @@
 import Data.Ix
 import Data.Typeable
 import Data.Generics
+import Data.Hashable
 
 {-|
 The 'OptDir' type represents optimization directions.
@@ -30,3 +31,5 @@
   = OptMin -- ^ minimization 
   | OptMax -- ^ maximization
   deriving (Bounded, Enum, Eq, Data, Ord, Read, Show, Ix, Typeable)
+
+instance Hashable OptDir where hashWithSalt = hashUsing fromEnum
