module Data.Registry.Options.FieldConfiguration where
import Data.Registry.Options.Text
import qualified Data.Text as T
import Protolude
import qualified Prelude
data FieldConfiguration = FieldConfiguration
{
FieldConfiguration -> Text -> Char
makeShortName :: Text -> Char,
FieldConfiguration -> Text -> Text
makeLongName :: Text -> Text,
FieldConfiguration -> Text -> Text
makeMetavar :: Text -> Text
}
defaultFieldConfiguration :: FieldConfiguration
defaultFieldConfiguration :: FieldConfiguration
defaultFieldConfiguration =
(Text -> Char)
-> (Text -> Text) -> (Text -> Text) -> FieldConfiguration
FieldConfiguration ([Char] -> Char
forall a. [a] -> a
Prelude.head ([Char] -> Char) -> (Text -> [Char]) -> Text -> Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> [Char]
forall a b. ConvertText a b => a -> b
toS (Text -> [Char]) -> (Text -> Text) -> Text -> [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Text
dropQualifier) (Text -> Text
camelCaseToHyphenated (Text -> Text) -> (Text -> Text) -> Text -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Text
dropQualifier) (Text -> Text
T.toUpper (Text -> Text) -> (Text -> Text) -> Text -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Text
dropQualifier)