-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Convert English words to title case
--
-- Capitalize all English words except articles (a, an, the),
-- coordinating conjunctions (for, and, nor, but, or, yet, so), and
-- prepositions (unless they begin or end the title). The prepositions
-- are taken from
-- https://en.wikipedia.org/wiki/List_of_English_prepositions.
@package titlecase
@version 0.1.0.3
-- | As the name implies, this module is meant to be used only if you want
-- to get access to the internals, say, if you're unhappy with the
-- provided titlecase function.
-- Data.Text.Titlecase.Internal doesn't prevent you from creating
-- improperly capitalized Titlecase values. In any other case,
-- Data.Text.Titlecase is what you're looking for.
module Data.Text.Titlecase.Internal
newtype Titlecase
Titlecase :: Text -> Titlecase
[unTitlecase] :: Titlecase -> Text
newtype Article
Article :: Text -> Article
[unArticle] :: Article -> Text
newtype Conjunction
Conjunction :: Text -> Conjunction
[unConjunction] :: Conjunction -> Text
data Preposition
OneWordPreposition :: Text -> Preposition
TwoWordPreposition :: Text -> Text -> Preposition
ThreeWordPreposition :: Text -> Text -> Text -> Preposition
FourWordPreposition :: Text -> Text -> Text -> Text -> Preposition
-- | Capitalize the first character. Note that this function behaves
-- differently than toTitle.
toTitle :: Text -> Text
(<#>) :: Text -> Text -> Text
uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
uncurry4 :: (a -> b -> c -> d -> e) -> (a, b, c, d) -> e
isElem :: (a -> Text) -> NonEmpty a -> Text -> Bool
isArticle :: Text -> Bool
isConjunction :: Text -> Bool
isOneWordPreposition :: Text -> Bool
isTwoWordPreposition :: Text -> Text -> Bool
isThreeWordPreposition :: Text -> Text -> Text -> Bool
isFourWordPreposition :: Text -> Text -> Text -> Text -> Bool
unPreposition :: Preposition -> Text
articles :: NonEmpty Article
conjunctions :: NonEmpty Conjunction
prepositions :: NonEmpty Preposition
-- | The words to not capitalize come from Wikipedia primarily, but
-- removing subordinating conjunctions generally.
oneWordPrepositions :: NonEmpty Preposition
twoWordPrepositions :: NonEmpty Preposition
threeWordPrepositions :: NonEmpty Preposition
fourWordPrepositions :: NonEmpty Preposition
instance GHC.Show.Show Data.Text.Titlecase.Internal.Preposition
instance GHC.Classes.Eq Data.Text.Titlecase.Internal.Preposition
instance GHC.Show.Show Data.Text.Titlecase.Internal.Conjunction
instance GHC.Classes.Eq Data.Text.Titlecase.Internal.Conjunction
instance GHC.Show.Show Data.Text.Titlecase.Internal.Article
instance GHC.Classes.Eq Data.Text.Titlecase.Internal.Article
instance GHC.Show.Show Data.Text.Titlecase.Internal.Titlecase
instance GHC.Classes.Eq Data.Text.Titlecase.Internal.Titlecase
instance Text.Blaze.ToMarkup Data.Text.Titlecase.Internal.Titlecase
module Data.Text.Titlecase
data Titlecase
-- | Capitalize all English words except articles (a, an, the),
-- coordinating conjunctions (for, and, nor, but, or, yet, so),
-- and prepositions (unless they begin or end the title). The
-- prepositions are taken from this list:
-- https://en.wikipedia.org/wiki/List_of_English_prepositions.
titlecase :: Text -> Titlecase