{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Data.OptDir -- Copyright : (c) Masahiro Sakai 2012 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : masahiro.sakai@gmail.com -- Stability : stable -- Portability : non-portable -- -- The OptDir type for representing optimization directions. -- ----------------------------------------------------------------------------- module Data.OptDir ( OptDir (..) ) where import Control.DeepSeq import Data.Ix import Data.Typeable import Data.Generics hiding (Generic) import Data.Hashable import GHC.Generics {-| The 'OptDir' type represents optimization directions. -} data OptDir = OptMin -- ^ minimization | OptMax -- ^ maximization deriving (Bounded, Enum, Eq, Data, Ord, Read, Show, Ix, Generic, Typeable) instance NFData OptDir where rnf = rwhnf instance Hashable OptDir where hashWithSalt = hashUsing fromEnum