module Barbies.TH.Config
( DeclareBareBConfig(..)
, classic
, passthrough
) where
import Language.Haskell.TH
data DeclareBareBConfig = DeclareBareBConfig
{ DeclareBareBConfig -> [Name]
friends :: [Name]
, DeclareBareBConfig -> String -> Maybe String
bareName :: String -> Maybe String
, DeclareBareBConfig -> String -> Maybe String
coveredName :: String -> Maybe String
, DeclareBareBConfig -> String -> String
barbieName :: String -> String
, DeclareBareBConfig -> Q Name
switchName :: Q Name
, DeclareBareBConfig -> Q Name
wrapperName :: Q Name
}
classic :: DeclareBareBConfig
classic :: DeclareBareBConfig
classic = DeclareBareBConfig
{ friends :: [Name]
friends = []
, bareName :: String -> Maybe String
bareName = forall a b. a -> b -> a
const forall a. Maybe a
Nothing
, coveredName :: String -> Maybe String
coveredName = forall a b. a -> b -> a
const forall a. Maybe a
Nothing
, barbieName :: String -> String
barbieName = forall a. a -> a
id
, switchName :: Q Name
switchName = forall (m :: * -> *). Quote m => String -> m Name
newName String
"sw"
, wrapperName :: Q Name
wrapperName = forall (m :: * -> *). Quote m => String -> m Name
newName String
"h"
}
passthrough :: DeclareBareBConfig
passthrough :: DeclareBareBConfig
passthrough = DeclareBareBConfig
{ friends :: [Name]
friends = []
, bareName :: String -> Maybe String
bareName = forall a. a -> Maybe a
Just
, coveredName :: String -> Maybe String
coveredName = forall a. a -> Maybe a
Just forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. [a] -> [a] -> [a]
++String
"H")
, barbieName :: String -> String
barbieName = (forall a. [a] -> [a] -> [a]
++String
"B")
, switchName :: Q Name
switchName = forall (m :: * -> *). Quote m => String -> m Name
newName String
"sw"
, wrapperName :: Q Name
wrapperName = forall (m :: * -> *). Quote m => String -> m Name
newName String
"h"
}