<div>Thats a bit farther down the rabbit hole than the concern in question, though certainly related.</div>
<div> </div>
<div>
<div>An example of what you could write with polymorphic kinds, inventing a notation for polymorphic kind variables using &#39;x to denote a polymorphic kind x, which could subtitute in for a kind k = * | ** | k -&gt; k | ...</div>
</div>
<div> </div>
<div>type Id (f :: &#39;k) = f</div>
<div>type Const (a :: &#39;a) (b :: &#39;b) = a</div>
<div> </div>
<div>data True</div>
<div>data False</div>
<div> </div>
<div>type family If c (x :: &#39;k) (y :: &#39;k) :: &#39;k</div>
<div>type instance If True x y = x</div>
<div>type instance If False x y = y</div>
<div> </div>
<div>then you could safely apply Id and If types of different kinds. </div>
<div> </div>
<div>class Container x where</div>
<div>    type Elem x :: *</div>
<div>    type SearchOffersMultipleResults x :: *</div>
<div>    search :: x -&gt; SearchResult x</div>
<div> </div>
<div>
<div>type SearchResult x =  (If (SearchOffersMultipleResults x) [] Maybe) (Elem x)</div></div>
<div> </div>
<div>instance Container (SomeContainer a) where</div>
<div>    type Elem (SomeContainer a) = a</div>
<div>
<div>    type SearchOffersMultipleResults (SomeContainer a) = True</div></div>
<div> </div>
<div>I suppose once down this slippery slope you might consider classes that are parameterized on types with polymorphic kinds as well, but I definitely wouldn&#39;t start there. ;)</div>
<div> </div>
<div>-Edward</div>
<div> </div>
<div class="gmail_quote">On Mon, Mar 30, 2009 at 2:54 PM, John Van Enk <span dir="ltr">&lt;<a href="mailto:vanenkj@gmail.com">vanenkj@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>I suppose having a good description of what I&#39;d like to do might help: I&#39;d like to be able to make an N-Tuple an instance of a type class.</div>
<div> </div>
<div>class Foo a where</div>
<div>    ....</div>
<div> </div>
<div>instance Foo (,) where</div>
<div>    ....</div>
<div> </div>
<div>instance Foo (,,) where</div>
<div>    ....<br></div>
<div>The different kindedness of (,) and (,,) prevent this from working. </div>
<div> </div>
<div>/jve</div>
<div>
<div></div>
<div class="h5">
<div><br> </div>
<div class="gmail_quote">On Mon, Mar 30, 2009 at 2:00 PM, Martijn van Steenbergen <span dir="ltr">&lt;<a href="mailto:martijn@van.steenbergen.nl" target="_blank">martijn@van.steenbergen.nl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>John Van Enk wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> &gt; Haskell not having &#39;polymorphic kinds&#39;.<br> Is there a good description of why Haskell doesn&#39;t have polymorphic kinds?<br>
</blockquote><br></div>IANA expert but polymorphic kinds belong to a set of reasonably new influences (e.g. from dependently typed programming languages and generic programming) and they haven&#39;t been 1) polished enough to be a widely accepted standard or 2) simply haven&#39;t been implemented yet (low priority, etc).<br>
<br>Besides that, I sometimes see polymorphic kinds in GHC error messages, so I suspect that at least parts of GHC already support them.<br><font color="#888888"><br>Martijn.<br><br></font></blockquote></div><br><br clear="all">
<br></div></div>-- <br><font color="#888888">/jve<br></font></blockquote></div><br>