module Data.Constructor.Extract.Options (ExtractOptions (..), defaultOptions) where

import Language.Haskell.TH (Name)

data ExtractOptions = MkExtractOptions
    { ExtractOptions -> String -> String
newDataName :: String -> String
    -- ^ Build the name of the `data` to generate using the constructor's name given as parameter
    , ExtractOptions -> String -> String
newConName :: String -> String
    -- ^ Build the name of the `constructor` to generate using the original constructor's name
    , ExtractOptions -> [Name]
deriveClasses :: [Name]
    -- ^ Add _deriving_ declaration when generating the new data type.
    -- **WARNING**: This is not guaranteed to type-check. Basic classes like 'Eq' and 'Ord' will work.
    }

defaultOptions :: ExtractOptions
defaultOptions :: ExtractOptions
defaultOptions = MkExtractOptions{[Name]
String -> String
forall {a}. [a]
forall {a}. a -> a
newDataName :: String -> String
newConName :: String -> String
deriveClasses :: [Name]
newDataName :: forall {a}. a -> a
newConName :: String -> String
deriveClasses :: forall {a}. [a]
..}
  where
    newDataName :: a -> a
newDataName = a -> a
forall {a}. a -> a
id
    newConName :: String -> String
newConName = (String
"Mk" String -> String -> String
forall a. [a] -> [a] -> [a]
++)
    deriveClasses :: [a]
deriveClasses = []