title: nub not compiling when checking a list for duplicates
body: <p>Working on a sudoku inspired assignment and I need to implement a function that checks if a <code>Block Cell</code> has no repeated elements in it (to check if its a valid solution to the puzzle).</p>
  
  <pre><code>okBlock :: Block Cell -&gt; Bool
  okBlock b = okList $ filter (/= Nothing) b
   where
    okList :: [a]-&gt; Bool
    okList list
     | (length list) == (length (nub list)) = True
     | otherwise                            = False
  </code></pre>
  
  <ul>
  <li><code>Block a = [a]</code></li>
  <li><code>Cell = [Maybe Int]</code></li>
  </ul>
  
  <p>Haskell complains saying <code>No instance for (Eq a) arising from a use of "==" Possible fix: add (Eq a) to the context of the type signature for okList...</code></p>
  
  <p>Adding <code>Eq a</code> to the type signature does not help. I have tried the function in the terminal and it works fine for for lists, and for lists of lists (i.e the type I am feeding it in the function).</p>
  
  <p>What am I missing here?</p>