headroom-0.1.0.0: License Header Manager
Copyright(c) 2019-2020 Vaclav Svejcar
LicenseBSD-3
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.Types.Utils

Description

Utilities related to data types.

Synopsis

Documentation

allValues :: (Bounded a, Enum a) => [a] Source #

Returns all values of enum.

customOptions :: Options Source #

Custom Aeson options.

dropFieldPrefix :: String -> String Source #

Drops prefix from camel-case text.

>>> dropFieldPrefix "xxHelloWorld"
"helloWorld"

readEnumCI :: (Bounded a, Enum a, Show a) => ReadS a Source #

Parses enum value from its string representation.

symbolCase Source #

Arguments

:: Char

word separator symbol

-> String

input text

-> String

processed text

Transforms camel-case text into text cased with given symbol.

>>> symbolCase '-' "fooBar"
"foo-bar"