#if __GLASGOW_HASKELL__ >= 702
#endif
#if __GLASGOW_HASKELL__ >= 706
#endif
#if __GLASGOW_HASKELL__ >= 708
#endif
#if __GLASGOW_HASKELL__ >= 800
#endif
module TextShow.Options (Options(..), GenTextMethods(..), defaultOptions) where
import Data.Data (Data, Typeable)
import Data.Ix (Ix)
#if __GLASGOW_HASKELL__ >= 702
import GHC.Generics (Generic)
#else
import qualified Generics.Deriving.TH as Generics
#endif
import Language.Haskell.TH.Lift
newtype Options = Options
{ genTextMethods :: GenTextMethods
} deriving ( Data
, Eq
, Ord
, Read
, Show
, Typeable
#if __GLASGOW_HASKELL__ >= 702
, Generic
#endif
#if __GLASGOW_HASKELL__ >= 800
, Lift
#endif
)
data GenTextMethods
= AlwaysTextMethods
| SometimesTextMethods
| NeverTextMethods
deriving ( Bounded
, Data
, Enum
, Eq
, Ix
, Ord
, Read
, Show
, Typeable
#if __GLASGOW_HASKELL__ >= 702
, Generic
#endif
#if __GLASGOW_HASKELL__ >= 800
, Lift
#endif
)
defaultOptions :: Options
defaultOptions = Options { genTextMethods = SometimesTextMethods }
#if __GLASGOW_HASKELL__ < 702
$(Generics.deriveAll ''Options)
$(Generics.deriveAll ''GenTextMethods)
#endif
#if __GLASGOW_HASKELL__ < 800
$(deriveLift ''Options)
$(deriveLift ''GenTextMethods)
#endif