title: Why can't I pattern match on the concatenation function (++) in Haskell?
body: <p>I'm trying to match <code>**String Newline String**</code> pattern in a function Split.</p>
  
  <pre><code>split::String -&gt; [String]
  split[] = []
  split (x++'\n':xs) = [x]++split(xs)
  </code></pre>
  
  <p>I'm getting this error:
  <code>Parse error in pattern: x ++ ('\n' : xs)</code></p>
  
  <p>What am I doing wrong here?</p>
  
  <p>I know there are other ways of achieving the same result but I'd like to understand what wrong with this pattern. I'm fairly new to Haskell BTW.</p>