<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15"></head><body
 bgcolor="#FFFFFF" text="#000000">
My core questions are:<br>
  <br>
* Should variables representing the same thing always have the same 
unique?<br>
* If not how can one assert they actually represent the same thing?<br>
  <br>
Working on the pattern matching code I came across this assertion:<br>
  <br>
> <span style="color: rgb(0, 0, 0); font-family: monospace; 
font-size: 12px; font-style: normal; font-variant-ligatures: normal; 
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; 
orphans: 2; text-align: start; text-indent: 0px; text-transform: none; 
white-space: pre; widows: 2; word-spacing: 0px; 
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); 
text-decoration-style: initial; text-decoration-color: initial; display:
 inline !important; float: none;">ASSERT</span><span class="hl opt" 
style="color: rgb(0, 0, 0); font-family: monospace; font-size: 12px; 
font-style: normal; font-variant-ligatures: normal; font-variant-caps: 
normal; font-weight: normal; letter-spacing: normal; orphans: 2; 
text-align: start; text-indent: 0px; text-transform: none; white-space: 
pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; 
background-color: rgb(255, 255, 255); text-decoration-style: initial; 
text-decoration-color: initial;">(</span><span style="color: rgb(0, 0, 
0); font-family: monospace; font-size: 12px; font-style: normal; 
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 
normal; letter-spacing: normal; orphans: 2; text-align: start; 
text-indent: 0px; text-transform: none; white-space: pre; widows: 2; 
word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: 
rgb(255, 255, 255); text-decoration-style: initial; 
text-decoration-color: initial; display: inline !important; float: 
none;"> tvs1 `equalLength` ex_tvs </span><span class="hl opt" 
style="color: rgb(0, 0, 0); font-family: monospace; font-size: 12px; 
font-style: normal; font-variant-ligatures: normal; font-variant-caps: 
normal; font-weight: normal; letter-spacing: normal; orphans: 2; 
text-align: start; text-indent: 0px; text-transform: none; white-space: 
pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; 
background-color: rgb(255, 255, 255); text-decoration-style: initial; 
text-decoration-color: initial;">)</span><br>
<a class="moz-txt-link-freetext" href="http://git.haskell.org/ghc.git/blob/HEAD:/compiler/deSugar/MatchCon.hs#l125">http://git.haskell.org/ghc.git/blob/HEAD:/compiler/deSugar/MatchCon.hs#l125</a><br>
  <br>
tvs1 and ex_tvs are both the existentially quantified type variables of a
 pattern.<br>
One gained by taking apart the pattern itself and one by taking apart 
the ConLike in the pattern.<br>
  <br>
While as far as I can tell they always represent the same Types they 
don't always compare as equal.<br>
Is there any other stable way to compare them? (By name? Something 
else?). Or is them not being<br>
equal a bug to begin with.<br>
  <br>
Follow up question:<br>
The whole assert is essentially a unit test as ex_tvs isn't used outside
 of the assert.<br>
Is there a solution to check these invariants in tests instead of the 
source code?<br>
</body>
</html>