title: Error: Variable ... must occur on both sides of this | pattern
body: <p>I want to write a pattern matching like the follows:</p>
  
  <pre><code>match ... with
  ...
  | Const1 (r, c) | Const2 (m, n) 
    -&gt; expr
  </code></pre>
  
  <p>It returns an error: <code>Error: Variable c must occur on both sides of this | pattern</code>.</p>
  
  <p>Do I have to write <code>expr</code> twice (one time for <code>Const1</code>, the other time for <code>Const2</code>)? Could anyone help?</p>