diff --git a/OptDir.cabal b/OptDir.cabal
--- a/OptDir.cabal
+++ b/OptDir.cabal
@@ -1,5 +1,5 @@
 Name:           OptDir
-Version:        0.0.3
+Version:        0.0.4
 Cabal-Version:  >= 1.10
 License:        BSD3
 License-file:   LICENSE
@@ -7,9 +7,11 @@
 Maintainer:     Masahiro Sakai <masahiro.sakai@gmail.com>
 Category:       Data, Optimization, Optimisation
 Synopsis:       The OptDir type for representing optimization directions.
-Description:    The OptDir type for representing optimization directions.
+Description:    The OptDir type for representing optimization directions (i.e. minimization and maximization).
 Stability:      stable
 Build-Type:	Simple
+Extra-Source-Files:
+   README.md
 
 Source-Repository head
   type:     git
@@ -20,5 +22,5 @@
   Hs-Source-Dirs:     src
   Exposed-Modules:    Data.OptDir
   Default-Language:   Haskell2010
-  Other-Extensions:   DeriveDataTypeable, CPP
+  Other-Extensions:   DeriveDataTypeable, DeriveGeneric, CPP
   GHC-Options:        -Wall
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+OptDir
+======
+
+[![Build Status](https://travis-ci.org/msakai/haskell-optdir.svg?branch=master)](https://travis-ci.org/msakai/haskell-optdir)
+[![Hackage](https://img.shields.io/hackage/v/OptDir.svg)](https://hackage.haskell.org/package/OptDir)
+[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
+
+The OptDir type for representing optimization directions.
diff --git a/src/Data/OptDir.hs b/src/Data/OptDir.hs
--- a/src/Data/OptDir.hs
+++ b/src/Data/OptDir.hs
@@ -1,5 +1,6 @@
-{-# LANGUAGE DeriveDataTypeable, CPP #-}
-
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.OptDir
@@ -8,7 +9,7 @@
 -- 
 -- Maintainer  :  masahiro.sakai@gmail.com
 -- Stability   :  stable
--- Portability :  non-portable (DeriveDataTypeable, CPP)
+-- Portability :  non-portable
 --
 -- The OptDir type for representing optimization directions.
 --
@@ -21,8 +22,9 @@
 
 import Data.Ix
 import Data.Typeable
-import Data.Generics
+import Data.Generics hiding (Generic)
 import Data.Hashable
+import GHC.Generics
 
 {-|
 The 'OptDir' type represents optimization directions.
@@ -30,7 +32,7 @@
 data OptDir
   = OptMin -- ^ minimization 
   | OptMax -- ^ maximization
-  deriving (Bounded, Enum, Eq, Data, Ord, Read, Show, Ix, Typeable)
+  deriving (Bounded, Enum, Eq, Data, Ord, Read, Show, Ix, Generic, Typeable)
 
 instance Hashable OptDir where hashWithSalt = hashUsing fromEnum
 
