title: Haskell: Conflicting definitions in case
body: <p>I am getting <code>Conflicting definitions for 'boardSize'</code> in <code>isCornerPos</code> but not <code>isCornerPos'</code>. Why?</p>
  
  <pre><code>boardSize :: Int
  boardSize = 8
  
  isCornerPos :: Position -&gt; Bool
  isCornerPos (i, j) =
      case (i, j) of
          (1, 1)                  -&gt; True
          (1, boardSize)          -&gt; True
          (boardSize, 1)          -&gt; True
          (boardSize, boardSize)  -&gt; True -- problem with this line
          _ -&gt; False
  
  isCornerPos' :: Position -&gt; Bool
  isCornerPos' (i, j) =
      case (i, j) of
          (1, 1) -&gt; True
          (1, 8) -&gt; True
          (8, 1) -&gt; True
          (8, 8) -&gt; True
          _ -&gt; False
  </code></pre>