{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
#if __GLASGOW_HASKELL__ >= 706
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
{-# LANGUAGE AutoDeriveTypeable #-}
#endif
#if __GLASGOW_HASKELL__ >= 800
{-# LANGUAGE DeriveLift #-}
#endif
module TextShow.Options (Options(..), GenTextMethods(..), defaultOptions) where
import Data.Data (Data, Typeable)
import Data.Ix (Ix)
import GHC.Generics (Generic)
import Language.Haskell.TH.Lift
data Options = Options
{ genTextMethods :: GenTextMethods
, emptyCaseBehavior :: Bool
} deriving ( Data
, Eq
, Generic
, Ord
, Read
, Show
, Typeable
#if __GLASGOW_HASKELL__ >= 800
, Lift
#endif
)
data GenTextMethods
= AlwaysTextMethods
| SometimesTextMethods
| NeverTextMethods
deriving ( Bounded
, Data
, Enum
, Eq
, Generic
, Ix
, Ord
, Read
, Show
, Typeable
#if __GLASGOW_HASKELL__ >= 800
, Lift
#endif
)
defaultOptions :: Options
defaultOptions =
Options { genTextMethods = SometimesTextMethods
, emptyCaseBehavior = False
}
#if __GLASGOW_HASKELL__ < 800
$(deriveLift ''Options)
$(deriveLift ''GenTextMethods)
#endif