<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 30, 2017 at 5:14 AM, Gabor Greif <span dir="ltr"><<a href="mailto:ggreif@gmail.com" target="_blank">ggreif@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">My original question, though, is not answered yet, namely why not to<br>
detect that we are about to pattern match on a GADT constructor and<br>
allow the programmer to capture the *refined* type with her type<br>
annotation. Sure this would necessitate a change to the type checker,<br>
but would also increase the expressive power a bit.<br>
<br>
Is there some fundamental problem with this? Or simply nobody wanted<br>
to do this yet? Would it be hard to implement type checking *after*<br>
refinement on GADT(-like) patterns?<br></blockquote></div><div><br></div><div>I wouldn't be surprised if type checking is precisely what enables refinement, making this a bit chicken-and-egg.</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>