diff --git a/Text/Inflections/Camelize.hs b/Text/Inflections/Camelize.hs index f902291..5991524 100644 --- a/Text/Inflections/Camelize.hs +++ b/Text/Inflections/Camelize.hs @@ -47,5 +47,5 @@ camelizeCustom -> Text -- ^ The camelized 'Text' camelizeCustom _ [] = "" camelizeCustom c (x:xs) = T.concat $ - (mapWord (if c then T.toTitle else T.toLower) x) : (mapWord T.toTitle <$> xs) + mapWord (if c then T.toTitle else T.toLower) x : (mapWord T.toTitle <$> xs) {-# INLINE camelizeCustom #-} diff --git a/Text/Inflections/Parameterize.hs b/Text/Inflections/Parameterize.hs index 5a16705..7e96e81 100644 --- a/Text/Inflections/Parameterize.hs +++ b/Text/Inflections/Parameterize.hs @@ -38,7 +38,7 @@ parameterizeCustom :: Transliterations -> Text -> Text parameterizeCustom m txt = (T.intercalate "-" . T.words) (T.unfoldr f ("", txt)) where f ("", t) = uncurry g <$> T.uncons t - f ((x:xs), t) = Just (x, (xs, t)) + f (x:xs, t) = Just (x, (xs, t)) g x xs | (isAscii x && isAlphaNum x) || x == '_' = (toLower x, ("", xs)) | isPunctuation x = (' ', ("", xs)) diff --git a/Text/Inflections/Transliterate.hs b/Text/Inflections/Transliterate.hs index b030f0c..8aa5b6c 100644 --- a/Text/Inflections/Transliterate.hs +++ b/Text/Inflections/Transliterate.hs @@ -45,7 +45,7 @@ transliterateCustom transliterateCustom replacement m txt = T.unfoldr f ("", txt) where f ("", t) = uncurry g <$> T.uncons t - f ((x:xs), t) = Just (x, (xs, t)) + f (x:xs, t) = Just (x, (xs, t)) g x xs = if isAscii x then (x, ("", xs))