<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Actually, with existential types and type equality constraints, GADTs</div>
are redundant. <br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The algorithm is pretty simple:<br>
- existentially quantify over all type variables mentioned in the GADT<br>
constructor<br>
- add a type equality constraint to match the result type<br>
- (optional) simplify</blockquote><div><br></div><div>While true, this nevertheless doesn't let me perform </div><div><br></div><div>> unify ''MyGADTType</div><div><br></div><div>when MyGADTType was defined with GADT syntax in the first place. GADT handling for TH is, for the moment, Somebody Else's Problem, and not something I'm going to be able to deal with without hacking on TH itself.</div>
<div><br></div><div>Louis</div></div><br>