# Pig Latin Implement a program that translates from English to Pig Latin. Pig Latin is a made-up children's language that's intended to be confusing. It obeys a few simple rules (below), but when it's spoken quickly it's really difficult for non-children (and non-native speakers) to understand. - **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to the end of the word. Please note that "xr" and "yt" at the beginning of a word make vowel sounds (e.g. "xray" -> "xrayay", "yttria" -> "yttriaay"). - **Rule 2**: If a word begins with a consonant sound, move it to the end of the word and then add an "ay" sound to the end of the word. Consonant sounds can be made up of multiple consonants, a.k.a. a consonant cluster (e.g. "chair" -> "airchay"). - **Rule 3**: If a word starts with a consonant sound followed by "qu", move it to the end of the word, and then add an "ay" sound to the end of the word (e.g. "square" -> "aresquay"). - **Rule 4**: If a word contains a "y" after a consonant cluster or as the second letter in a two letter word it makes a vowel sound (e.g. "rhythm" -> "ythmrhay", "my" -> "ymay"). There are a few more rules for edge cases, and there are regional variants too. See for more details. ## Getting Started For installation and learning resources, refer to the [exercism help page](http://exercism.io/languages/haskell). ## Running the tests To run the test suite, execute the following command: ```bash stack test ``` #### If you get an error message like this... ``` No .cabal file found in directory ``` You are probably running an old stack version and need to upgrade it. #### Otherwise, if you get an error message like this... ``` No compiler found, expected minor version match with... Try running "stack setup" to install the correct GHC... ``` Just do as it says and it will download and install the correct compiler version: ```bash stack setup ``` ## Running *GHCi* If you want to play with your solution in GHCi, just run the command: ```bash stack ghci ``` ## Feedback, Issues, Pull Requests The [exercism/haskell](https://github.com/exercism/haskell) repository on GitHub is the home for all of the Haskell exercises. If you have feedback about an exercise, or want to help implementing a new one, head over there and create an issue. We'll do our best to help you! ## Source The Pig Latin exercise at Test First Teaching by Ultrasaurus [https://github.com/ultrasaurus/test-first-teaching/blob/master/learn_ruby/pig_latin/](https://github.com/ultrasaurus/test-first-teaching/blob/master/learn_ruby/pig_latin/) ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise.