Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Multipart names and Prism
s for them.
- data MultipartName
- mkMultipartName :: [String] -> MultipartName
- mkMultipartNameFromWords :: String -> MultipartName
- isLegalSegment :: String -> Bool
- toSegments :: MultipartName -> [CI String]
- showLowerCamel :: MultipartName -> String
- showUpperCamel :: MultipartName -> String
- showLowerHyphenated :: MultipartName -> String
- showUpperHyphenated :: MultipartName -> String
- showLowerUnderscored :: MultipartName -> String
- showUpperUnderscored :: MultipartName -> String
- _LowerCamel :: Prism' String MultipartName
- _UpperCamel :: Prism' String MultipartName
- _Hyphenated :: Prism' String MultipartName
- _LowerHyphenated :: Prism' String MultipartName
- _UpperHyphenated :: Prism' String MultipartName
- _Underscored :: Prism' String MultipartName
- _LowerUnderscored :: Prism' String MultipartName
- _UpperUnderscored :: Prism' String MultipartName
Type
data MultipartName Source
An opaque type that represents a multipart name. The initial character of each segment must be a cased letter. Currently, only ASCII letters are allowed as first characters of segments.
Construction
mkMultipartName :: [String] -> MultipartName Source
Creates a multipart name from its segments.
mkMultipartNameFromWords :: String -> MultipartName Source
Creates a multipart name from words. Equivalent to
mkMultipartName . words
.
isLegalSegment :: String -> Bool Source
Is this string a legal segment for a MultipartName
?
Query
toSegments :: MultipartName -> [CI String] Source
Returns the segments of the name
Display
camel-case
showLowerCamel :: MultipartName -> String Source
Display as lowerCamelCased.
showUpperCamel :: MultipartName -> String Source
Display as UpperCamelCased.
hyphenated
showLowerHyphenated :: MultipartName -> String Source
Display as lower-hyphenated.
showUpperHyphenated :: MultipartName -> String Source
Display as UPPER-HYPHENATED.
underscored
showLowerUnderscored :: MultipartName -> String Source
Display as lower_underscored.
showUpperUnderscored :: MultipartName -> String Source
Display as UPPER_UNDERSCORED.
Prisms
camel-case
_LowerCamel :: Prism' String MultipartName Source
A Prism'
to convert lowerCamelCased String
s to
MultipartName
s.
_UpperCamel :: Prism' String MultipartName Source
A Prism'
to convert UpperCamelCased String
s to
MultipartName
s.
hyphenated
_Hyphenated :: Prism' String MultipartName Source
A Prism'
to convert case-insensitive-hyphenated String
s to
MultipartName
s.
_LowerHyphenated :: Prism' String MultipartName Source
A Prism'
to convert lower-hyphenated String
s to
MultipartName
s.
_UpperHyphenated :: Prism' String MultipartName Source
A Prism'
to convert UPPER-HYPHENATED String
s to
MultipartName
s.
underscored
_Underscored :: Prism' String MultipartName Source
A Prism'
to convert Case_Insensitive_Underscored String
s to
MultipartName
s.
_LowerUnderscored :: Prism' String MultipartName Source
A Prism'
to convert lower_underscored String
s to
MultipartName
s.
_UpperUnderscored :: Prism' String MultipartName Source
A Prism'
to convert UPPER_UNDERSCORED String
s to
MultipartName
s.