<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 23, 2018, at 6:56 AM, Alan & Kim Zimmerman <<a href="mailto:alan.zimm@gmail.com" class="">alan.zimm@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Is there any way to express that `pass` must be valid for each value of `Pass` in the following instance head?</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class="">No, there isn't. And for good reason: whatever you're trying to do likely requires some runtime decision-making, and that's impossible with just type-level information. (Even without that motivation, there's this: any way of doing this would likely break type soundness. See #7259 and #14420.)</div><div class=""><br class=""></div><div class="">My recommendation is to have</div><div class=""><br class=""></div><div class="">> class ValidPass p</div><div class="">> instance ValidPass Parsed</div><div class="">> instance ValidPass Renamed</div><div class="">> instance ValidPass Typechecked</div><div class=""><br class=""></div><div class="">My guess is that you'll need to add a method to ValidPass, anyway.</div><div class=""><br class=""></div><div class="">Richard</div></body></html>