<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">This is correct behavior. The former has a CUSK, as all open type families have CUSKs with un-annotated kinds defaulting to Type. The latter does not have a CUSK, because the result kind is unknown. You therefore cannot specialize the k variable in the definition of the latter.</div><div class=""><br class=""></div><div class="">There is a ticket (#10141) about improving the error message here to educate the user about CUSKs, but there's no progress on it.</div><div class=""><br class=""></div><div class="">Richard</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 19, 2017, at 5:02 AM, Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com" class="">simonpj@microsoft.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><p class="MsoNormal" style="margin: 6pt 0cm; font-size: 11pt; font-family: Calibri, sans-serif;">Richard<span class="Apple-converted-space"> </span><o:p class=""></o:p></p><p class="MsoNormal" style="margin: 6pt 0cm; font-size: 11pt; font-family: Calibri, sans-serif;">This works<o:p class=""></o:p></p><p class="Code" style="margin: 6pt 0cm 0.0001pt 36pt; font-size: 10pt; font-family: 'Courier New';">type family F (a :: k)<o:p class=""></o:p></p><p class="Code" style="margin: 6pt 0cm 0.0001pt 36pt; font-size: 10pt; font-family: 'Courier New';">type instance F Maybe = Char<o:p class=""></o:p></p><p class="MsoNormal" style="margin: 6pt 0cm; font-size: 11pt; font-family: Calibri, sans-serif;">But this does not.  Surely it should?<o:p class=""></o:p></p><p class="Code" style="margin: 6pt 0cm 0.0001pt 36pt; font-size: 10pt; font-family: 'Courier New';">type family F (a :: k) where -- = r  | r -> a where<o:p class=""></o:p></p><p class="Code" style="margin: 6pt 0cm 0.0001pt 36pt; font-size: 10pt; font-family: 'Courier New';">  F Maybe = Char<o:p class=""></o:p></p><p class="MsoNormal" style="margin: 6pt 0cm; font-size: 11pt; font-family: Calibri, sans-serif;">The latter is rejected with<o:p class=""></o:p></p><p class="Code" style="margin: 6pt 0cm 0.0001pt 36pt; font-size: 10pt; font-family: 'Courier New';">Foo.hs:6:5: error:<o:p class=""></o:p></p><p class="Code" style="margin: 6pt 0cm 0.0001pt 36pt; font-size: 10pt; font-family: 'Courier New';">    * Expecting one more argument to `Maybe'<o:p class=""></o:p></p><p class="Code" style="margin: 6pt 0cm 0.0001pt 36pt; font-size: 10pt; font-family: 'Courier New';">      Expected kind `k', but `Maybe' has kind `* -> *'<o:p class=""></o:p></p><p class="Code" style="margin: 6pt 0cm 0.0001pt 36pt; font-size: 10pt; font-family: 'Courier New';">    * In the first argument of `F', namely `Maybe'<o:p class=""></o:p></p><p class="Code" style="margin: 6pt 0cm 0.0001pt 36pt; font-size: 10pt; font-family: 'Courier New';">      In the type family declaration for `F'<o:p class=""></o:p></p><p class="MsoNormal" style="margin: 6pt 0cm; font-size: 11pt; font-family: Calibri, sans-serif;">If you agree I’ll open a ticket.<o:p class=""></o:p></p><p class="MsoNormal" style="margin: 6pt 0cm; font-size: 11pt; font-family: Calibri, sans-serif;">Simon</p></div></div></blockquote></div><br class=""></body></html>