Haskell - Pig Latin Translator
You can let it derive the  Functor declaration:

data PigLatin a = PigLatin a deriving Functor


foldl mappend mempty &lt;- You want fold.

break implements some of your stuff already.

I wouldn't introduce the types PigLatin a and English a in the first place. They just introduce wrapping without extra type-level structural info.

import Control.Monad (when)
import Data.Char (toLower, toUpper)
import System.IO (hFlush, stdout)
import Control.Cateogry ((&gt;&gt;&gt;)) -- flip (.)

--This turns empty words to yay, but words doesnt send empty words, right?
wordToPig :: String -&gt; String
wordToPig = break (`elem` "aeiou") &gt;&gt;&gt; \(initialConsonants, rest) -&gt;
  rest ++ initialConsonants ++ if null initialConsonants then "yay" else "ay"

-- Your pig latin rules drop the first character of each sentence at the end?
sentenceToPig :: String -&gt; String
sentenceToPig = capitalize . drop 1 . unwords . map wordToPig . words

capitalize :: String -&gt; String
capitalize (x:xs) = toUpper x : map toLower xs
capitalize [] = ""

main :: IO ()
main = do
  putStr "&gt; "
  hFlush stdout
  input &lt;- getLine
  when (input /= "\\q") $ do
    print $ sentenceToPig input
    main