title: Haskell pattern not matched [_]
body: <p>I have been trying to make the following code work: </p>
  
  <pre><code>{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
  import Data.List
  format :: String -&gt; String
  format [] = []
  format (a:b:xs)
   | a == 'W' &amp;&amp; b == 'U' = " " ++ format (drop 1 xs) 
   | otherwise = a : format (b:xs)
  
  songDecoder :: String -&gt; String
  songDecoder xs = unwords. words . format $ xs
  </code></pre>
  
  <p>When I test with: </p>
  
  <blockquote>
    <p>songDecoder "AWUBBWUBC"</p>
  </blockquote>
  
  <p>I expect "ABC" as output. However, I'm getting an unusual pattern matching warning: </p>
  
  <pre><code>Pattern match(es) are non-exhaustive
  In an equation for ‘format’: Patterns not matched: [_]
  </code></pre>
  
  <p>I'm not sure why I need to match [_] when I have</p>
  
  <pre><code>format (a:b:xs)
  </code></pre>
  
  <p>Please help.</p>