title: Haskell type mismatch
body: <p>I have the following functions:</p>
  
  <pre><code>encodeChar :: Int -&gt; [Char] -&gt; Char -&gt; Char
  encodeChar x y z = eChar (offsetChar x y) z
  
  encodeString :: Int -&gt; [Char] -&gt; String -&gt; String
  encodeString _ _ "" = ""
  encodeString x y z = encodeChar x y (head z) ++ encodeString x y (tail z)
  </code></pre>
  
  <p>Which returns</p>
  
  <pre><code>*** Expression     : encodeChar x y (head z) ++ encodeString x y (tail z)
  *** Term           : encodeChar x y (head z)
  *** Type           : Char
  *** Does not match : [Char]
  </code></pre>
  
  <p>However, as x and y match Int and [Char] and (head z) returns type Char I don't see what is causing the problem... Ideas? :S Thanks!</p>