slugify :: String -> Slug
slugify = Slug . (mkSlug True)
  where
    mkSlug _ [] = []
    mkSlug replace (x:xs)
      | toLower x `elem` slugChars = toLower x:mkSlug True xs
      | otherwise                  = (if replace then ['-'] else []) ++ mkSlug False xs
slugify :: String -> Slug
slugify = Slug . (mkSlug True)
  where
    mkSlug _ [] = []
    mkSlug replace (x:xs)
      | toLower x `elem` slugChars = toLower x:mkSlug True xs
      | otherwise                  = (if replace then ['-'] else []) ++ mkSlug False xs
slugify = Slug . (mkSlug True)
  where
    mkSlug _ [] = []
    mkSlug replace (x:xs)
      | toLower x `elem` slugChars = toLower x:mkSlug True xs
      | otherwise                  = (if replace then ['-'] else []) ++ mkSlug False xs